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 |
|---|---|---|---|---|---|---|---|
Java | UTF-8 | 1,711 | 2.0625 | 2 | [] | no_license | package co.com.myproject.delivereatspersistence.service;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import co.com.myproject.delivereatspersistence.entity.Mailestadotipo;
import co.com.myproject.deliver... |
C | UTF-8 | 1,579 | 3.859375 | 4 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
void print_list(char ** data);
int main(int argc, char* argv[]) {
/*CS306 Assignment 2.1:
*Program accepts string(s) from command line and converts letters to
*uppercase or lowercase based on the case of the first letter*/
int inc=1;
char ** ret2=(ch... |
C++ | UTF-8 | 1,773 | 3.03125 | 3 | [] | no_license | //Functions that use the servo to look in different directions and compare/save readings.
void LookAhead() //Unused at d mo...
{
servo1.write(90);// angle to look forward
delay(175); // wait 0.175 seconds
ping();
centerDist = cm; //get the center distance
}
bool checkRoute()
{
servo1.write(135); // angl... |
JavaScript | UTF-8 | 3,095 | 3.046875 | 3 | [] | no_license | /**
* 回复组件
* @class Component:Reply
*
*/
function Reply(db, totalChar) {
this.db = db; // 数据库连接
this.user = this.db.getLoginUser(); // 当前登录用户
this.util = new Util(); // 工具类示例
this.left = totalChar; // 剩余输入字数
this.totalChar = totalChar; // 总... |
C++ | UTF-8 | 4,219 | 3.484375 | 3 | [] | no_license | #include<iostream>
#include<vector>
#include<cstdlib>
int BOARD_SIZE = 6;
class Point{
public:
int x;
int y;
int step;
Point(int x = 0, int y = 0, int step = 0){
this->x = x;
this->y = y;
this->step = step;
}
/*Point operator+(Poi... |
Java | UTF-8 | 2,231 | 2.234375 | 2 | [] | no_license | /**
* FailProcessor.java
* com.uxuexi.web.common.chain
* Copyright (c) 2012, 北京聚智未来科技有限公司版权所有.
*/
package com.uxuexi.core.web.chain;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.mvc.ActionContext;
import org.nutz.mvc.ActionInfo;
import org.nutz.mvc.NutConfig;
import org.nutz... |
TypeScript | UTF-8 | 3,183 | 2.609375 | 3 | [
"MIT"
] | permissive | import { Injectable } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { InjectModel } from "@nestjs/mongoose";
import { SupportersService } from "../supporters/supporters.service";
import {
FeedSchedule,
FeedScheduleModel,
} from "./entities/feed-schedule.entity";
interface FeedDetail... |
Python | UTF-8 | 3,111 | 3.375 | 3 | [] | no_license | import csv
import sys
from collections import defaultdict,Counter
def read_file(input_file):
"""
Function to read the input file
:param input_file: input filename
:return: results : list of list containing complaints
"""
result=[]
with open(input_file) as csvfile:
readCSV = csv.re... |
C# | UTF-8 | 415 | 2.671875 | 3 | [] | no_license | using System;
namespace Last_K_Numbers_Sums_Sequence
{
class Program
{
static void Main(string[] args)
{
long n = long.Parse(Console.ReadLine());
int k = int.Parse(Console.ReadLine());
long[] seq = new long[k];
seq[0] = 1;
for (int ... |
Java | UTF-8 | 607 | 2.328125 | 2 | [] | no_license | package com.zhujie.study.mybatis._02_Configuration;
import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.plugin.Invocation;
import org.apache.ibatis.plugin.Plugin;
import java.util.Properties;
/**
* Created by zhujie on 15/9/25.
*/
public class ExamplePlugin implements Interceptor {
@Override
... |
JavaScript | UTF-8 | 3,379 | 2.71875 | 3 | [] | no_license | var idSeleccionarConstanciaRecuperar=0;
function actionRead(){
$.ajax({
url: "php/validar-constancias.php",
method: "GET",
data: {
accion: "Read"
},
success: function(resultado) {
alert(resultado);
var objetoJSON=JSON.parse(result... |
Java | GB18030 | 141 | 1.828125 | 2 | [] | no_license | package adapter1;
public interface Target {
public void socket2();//йײ
public int volt220();//й220V
}
|
Java | UTF-8 | 1,773 | 2.515625 | 3 | [] | no_license | package entities;
import java.io.Serializable;
import javax.persistence.*;
/**
*
* @author Igor Sarcevic(igisar@gmail.com)
* Entity implementation class for Entity: Kupljeno
*
* za detalje pogledati diagram u fajlu diagram.png
*/
@Entity
@NamedQueries ({
@NamedQuery( name="Kupljeno.findByKorisnik",
query... |
Markdown | UTF-8 | 16,660 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | # Lesson 4 - RecyclerView

## Index
- [RecyclerView](#recyclerview)
- [ViewHolder](#viewholder)
- [Adapter](#adapter)
- [LayoutManager](#layoutmanager)
- [Handling click events](#handling-click-events)... |
Java | UTF-8 | 682 | 2.234375 | 2 | [] | no_license | package com.example.androidswipetoshowbutton.adapter;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.androidswipetoshowbutton.R;
class MyRecyclerViewHolder extends Rec... |
Java | UTF-8 | 3,229 | 2.203125 | 2 | [
"Apache-2.0"
] | permissive | package jp.s64.android.viewability.viewarea;
import android.app.Activity;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import jp.s64.android.viewability.ViewUtils;
import jp.s64.android.viewability.core.gaps.ContentGaps;
import jp.s64.android.viewabi... |
Markdown | UTF-8 | 413 | 2.578125 | 3 | [] | no_license | # PW-2019-01
## Programação Web 2019
## Demonstrações da disciplina de Programação para Web.
## Para fazer clone do repositório:
git clone + Link de seu repositório.
# Links
* [Curso de Git](https://www.youtube.com/playlist?list=PLQCmSnNFVYnRdgxOC_ufH58NxlmM6VYd1) - Do professor do Rodrigo Branas.
* [Guia Markdown... |
Java | UTF-8 | 195 | 1.570313 | 2 | [] | no_license | package me.loki2302.expectations.element.typereference;
import me.loki2302.dom.DOMTypeReference;
public interface TypeReferenceExpectation {
void check(DOMTypeReference domTypeReference);
} |
Java | UTF-8 | 1,231 | 2.453125 | 2 | [] | no_license | package io.rolgalan.musicsearch.view;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.TransitionDrawable;
import io.rolgalan.musicsearch.util.CompatUtils;
/**
* Created by Roldán Galán on 14/11/2016.
*/
public class PlayPauseTransition extends Transition... |
Python | UTF-8 | 1,400 | 3.234375 | 3 | [] | no_license | #!/usr/bin/env python3
import sys
def calculate(**kw):
for id1,salary in kw.items():
insurance = salary * (0.08 + 0.02 + 0.005 + 0.06)
TaxAmount = salary - insurance - 3500
if TaxAmount < 0:
TaxRate = 0
deduction = 0
elif TaxAmount <= 1500:
TaxRat... |
Markdown | UTF-8 | 1,426 | 3.453125 | 3 | [] | no_license | Pretty-prints a binary tree with child fields `left` and `right`. Each node contains a `data` field, which is printed.
Run `python tree.py` and check out the results.
The tree may be of any depth, but usually after 6 levels it's too wide for most screens.
Looks best when the nodes' printed values are under 3 charact... |
PHP | UTF-8 | 1,781 | 2.640625 | 3 | [] | no_license | <?php
class ValidationFactory
{
public function __construct(PDO $db)
{
$this->db = $db;
}
public function checkRoundIdAndUser($HorseRaceLinkId, $UserId)
{
$q = $this->db->prepare("
SELECT
Race.RoundId
FROM Ra... |
Python | UTF-8 | 1,045 | 3.875 | 4 | [] | no_license | # coding=utf-8
"""
@project: Everyday_LeetCode
@Author:Charles
@file: 01.字符串消消乐游戏.py
@date:2022/12/15 11:12
"""
# 题目描述 https://blog.csdn.net/forest_long/article/details/125803208
# 输入一个只包含英文字母的字符串,字符串中的两个字母如果相邻且相同,就可以消除。
# 在字符串上反复执行消除的动作,直到无法继续消除为止,此时游戏结束。
# 输出最终消除完后留下的字符串。
while True:
try:
... |
Shell | UTF-8 | 511 | 2.625 | 3 | [] | no_license |
#alias inkscape='C:/Users/40027000/PortableApps/InkscapePortable/App/Inkscape/inkscape.exe'
if [ $# -eq 0 ]
then
# Convert everything
for f in *.svg; do
inkscape $f --export-pdf `basename $f svg`pdf;
# inkscape $f --export-pdf `basename $f svg`pdf;
done
else
# Convert specified ... |
C# | UTF-8 | 1,271 | 2.765625 | 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 Assignment_17
{
public partial class UpdateStudent : Form
{
public UpdateStude... |
Java | UTF-8 | 3,925 | 1.960938 | 2 | [
"Apache-2.0"
] | permissive | /*
* JPPF.
* Copyright (C) 2005-2019 JPPF Team.
* http://www.jppf.org
*
* 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 re... |
Python | UTF-8 | 3,604 | 2.984375 | 3 | [] | no_license | #!/usr/bin/env python
# coding: utf-8
""" Sentiment Analysis using PTT movie articles """
import logging
import numpy as np
from random import shuffle
import sys
from time import time
import matplotlib.pyplot as plt
from glob import glob
import jieba
from sklearn.feature_extraction.text import TfidfVectorizer
from skl... |
C++ | UTF-8 | 1,361 | 2.875 | 3 | [] | no_license | //Codeforces - Nephren gives a riddle - 897C
#include <bits/stdc++.h>
using namespace std;
const int N = 100'010;
const string BASE = "What are you doing at the end of the world? Are you busy? Will you save us?";
const string s1 = "What are you doing while sending \"";
const string s2 = "\"? Are you busy? Will you sen... |
C++ | UTF-8 | 4,875 | 3.015625 | 3 | [] | no_license | #include "procfs.h"
#include <dirent.h>
#include <cstring>
#include <string>
#include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdlib>
const static char* const PROCFS_PATH_SEPARATOR = "/";
Direntry::Direntry (struct dirent* de, Direntry* parent) :
m_parent (parent) {
m_pathName = 0;
... |
Markdown | UTF-8 | 1,583 | 3.265625 | 3 | [] | no_license | # Getting-and-Cleaning-data-Project
This repository contains the final week project of Getting and Cleaning Data.
### DESCRIBING THE DATA
The data-set is basically consisting of an experiment that has been carried out with a group of 30 volunteers within an age bracket of 19-48 years.
Each person performed six activi... |
Python | UTF-8 | 932 | 3.03125 | 3 | [] | no_license | from auth import authenticate
from datetime import datetime
album = None # You can also enter an album ID here
image_path = 'static/images/daisy.jpg'
def upload_image(client):
"""
Uploads an image to imgur.
"""
# Here's the metadata for the upload. All of these are optional, including
# this config dic... |
Markdown | UTF-8 | 297 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | ## Size Enum
### Import
```
from ArchicadDG.Font import Size
```
## Example
```
from ArchicadDG import *
ft1=Font.Large
ft2=Font.Size.ExtraSmall
```
### Values
* **Large**:Large font size.
* **Small**:Small font size.
* **ExtraSmall**:Extrasmall font size.
* **DefaultSize**:Default font size. |
PHP | UTF-8 | 65 | 2.765625 | 3 | [] | no_license | <?php
$arr = [1,2,3,4,5,6,7,8,9,10];
echo(array_product($arr)); |
Python | UTF-8 | 4,403 | 2.53125 | 3 | [] | no_license | #!/usr/bin/env python
import twitter
# import apiKey
from resources import apiKey
from _datetime import datetime, timedelta
from newsapi import NewsApiClient
import pyEX
import json
import requests
import csv
import ml.classifier
########
# init API key Settings
########
# init Twitter API keys
api = twitter.Api(con... |
JavaScript | UTF-8 | 3,970 | 2.515625 | 3 | [
"MIT"
] | permissive |
$(document).ready(function () {
//on navigation between upper links
$('.mainNavLink').click(function (e) {
e.preventDefault();
$('.main-navigationContainer .main-navigation li').removeClass('active');
$(this).parent().addClass("active");
var id = $(this).attr('href');
$(... |
Markdown | UTF-8 | 2,431 | 3.234375 | 3 | [] | no_license | # RockScissorsPaper
Добавте код в редактор и запустите. Игра Камень-Ножницы-Бумага
import random
hum_ch = True
random_choice = ['r', 's', 'p']
while hum_ch:
print('Камень - Ножныци - Бумага')
print('Камень - Rock - R \nНожницы - Scissors - S \nБумага - Paper - P')
computer_random = random.choice(ra... |
Java | UTF-8 | 5,951 | 2.484375 | 2 | [] | no_license | package com.example.logincadastro;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.example.logincadastro.m... |
Java | UTF-8 | 535 | 2.4375 | 2 | [] | no_license | package Fenetres;
import javax.swing.JFrame;
import LDVH.Livre;
public class Menu extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
public PanelMenu p;
public Livre l;
public Menu() {
this.setTitle("LDVH");
this.setSize(1024,768 );
this.setLocationRelativeTo(null);
this.set... |
C++ | UTF-8 | 14,701 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | // -*- C++ -*-
// A basic LSTM implementation in C++. All you should need is clstm.cc and
// clstm.h. Library dependencies are limited to a small subset of STL and
// Eigen/Dense
#ifndef ocropus_lstm_
#define ocropus_lstm_
#include <vector>
#include <string>
#include <iostream>
#include <typeinfo>
#include <memory>
... |
Python | UTF-8 | 604 | 2.90625 | 3 | [] | no_license | import tcod as libtcod
def render_all(con, entities, screen_width, screen_height):
for entity in entities:
draw_entity(con, entity)
libtcod.console_blit(con, 0, 0, screen_width, screen_height, 0, 0, 0)
def clear_all(con, entities):
for entity in entities:
clear_entity(con, entity)
def dr... |
Java | UTF-8 | 762 | 3.125 | 3 | [] | no_license | package example1;
import java.util.List;
import example1.Book.Chapter;
public class Mainclass {
public static void main(String[] args) {
Chapter introChapter = new Book().new Chapter(1, "Alice");
Book book = new Book("Alice is in Wonderland", 2007, introChapter);
book.setIntroPage();
FirstPa... |
C | UTF-8 | 2,779 | 2.578125 | 3 | [
"Apache-2.0",
"SHL-0.51",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
* Copyright (C) 2018 ETH Zurich and University of Bologna
*
* 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... |
Python | UTF-8 | 11,111 | 2.59375 | 3 | [
"MIT"
] | permissive | import uuid
from pprint import pformat
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
import pandas as pd
from .utils import add_default_to_data
from .utils import create_db_folders
from .utils import dump_cached_schema
from .utils import dump_db
from .utils impor... |
Python | UTF-8 | 1,408 | 3.078125 | 3 | [] | no_license | # """
# PyAudio Example: Make a wire between input and output (i.e., record a
# few samples and play them back immediately).
#
# This is the callback (non-blocking) version.
# """
#
# import pyaudio
# import time
#
# WIDTH = 2
# CHANNELS = 2
# RATE = 44100
#
# p = pyaudio.PyAudio()
#
# def callback(in_data, frame_count... |
Markdown | UTF-8 | 4,630 | 2.90625 | 3 | [
"MIT"
] | permissive | ---
layout: post
cover: 'assets/images/covers/internet-archive.png'
title: The Internet Archive
date: 2018-08-26
tags: [internet,npo]
author: jaken
description: >
The Internet Archive là một kho lưu trữ khổng lồ phi lợi nhuận được tạo ra để lưu trữ dữ liệu trên internet: văn bản, hình ảnh, âm thanh, phần mềm. Họ tự đ... |
PHP | UTF-8 | 3,275 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Task 1</title>
<style type="text/css">
body {
font-family: 'Open Sans', sans-serif;
background-color: darkgrey;
}
div.container {
border-radius: 0.5em;
background-co... |
Markdown | UTF-8 | 1,040 | 3.390625 | 3 | [] | no_license | # 概念
移动设备上的viewport就是设备的屏幕上能用来显示我们的网页的那一块区域,在具体一点,就是浏览器上(也可能是一个app中的webview)用来显示网页的那部分区域,但viewport又不局限于浏览器可视区域的大小,它可能比浏览器的可视区域要大,也可能比浏览器的可视区域要小。
# layout viewport
移动端浏览器的默认宽度,通过document.documentElement.clientWidth可获得
# visual viewport
可视视口,可通过window.innerWidth获取
# ideal viewport
先不需要用户缩放和横向滚动条就能正常的查看网站的所有内容;第二,显示的文字的... |
Java | UTF-8 | 6,119 | 2.140625 | 2 | [] | no_license | package com.jointeach.iauditor.common;
import android.graphics.Bitmap;
import android.widget.ImageView;
import com.jointeach.iauditor.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.Im... |
JavaScript | UTF-8 | 410 | 3.03125 | 3 | [] | no_license | var lis=document.querySelectorAll('ul:first-child>li')
var imgs=document.querySelectorAll('ul:last-child>li')
lis.forEach(function (value,index) {
value.onclick=function () {
for(i=0;i<lis.length;i++){
lis[i].classList.remove('active')
imgs[i].classList.remove('active')
}
... |
Markdown | UTF-8 | 435 | 2.71875 | 3 | [] | no_license | TLDR - strace
==========
Overview
--------
[strace] is a command that traces system calls and signals
Examples
--------
- **Trace** the execution of the ls command:
$ strace ls
- **Trace** a specific system call in an executable:
$ strace -e open ls
- **Save** the trace execution into a file:
$ s... |
TypeScript | UTF-8 | 1,089 | 2.53125 | 3 | [] | no_license | import { NextFunction, Request, Response } from "express";
import { IRequest } from "../Request&Response/IRequest";
import { IResponse } from "../Request&Response/IResponse";
import jwt from "jsonwebtoken";
import { HTTP_STATUS_CODES } from "../utils/HttpResponses";
import { getRawTokenFromAuthHeader } from "./utils/ge... |
C# | UTF-8 | 537 | 2.96875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace SolidPrinciplesExample
{
class TemporaryEmployee : Employee,IEmployee
{
public TemporaryEmployee()
{
}
public TemporaryEmployee(int Id,string Name):base(Id,Name)
{
}
public ov... |
Java | UTF-8 | 610 | 3.0625 | 3 | [] | no_license | package ooProgramming_Class_Hierachies.PersonManagement;
public abstract class Employee extends Person {
protected int test;
private String jobTitle;
public Employee(String jobTitle, String name, String socialsecurity, int age, GenderType gender) {
super(name, socialsecurity, age, gender);
this.jobTitl... |
Python | UTF-8 | 322 | 3.0625 | 3 | [] | no_license | class Solution:
#动态规划
def maxSubArray1(self, nums):
if nums == []:
return 0
else:
for i in range(1, len(nums)):
nums[i] = max(nums[i] + nums[i - 1], nums[i])
return max(nums)
sol = Solution()
a = [1,-1,-2,3]
print(sol.maxSubArray(a))
|
Python | UTF-8 | 1,915 | 2.515625 | 3 | [] | no_license | import numpy as np
import matplotlib.pyplot as plt
from dateutil.parser import parse
# Load timestamp and position strings
filename = '/home/kampff/Dropbox/LC_THESIS/ARK/shader_vs_crop/BallTracking.csv'
split_data = np.genfromtxt(filename, delimiter=[33,100], dtype='unicode')
timestamp_strings = split_data[:,0]
positi... |
Python | UTF-8 | 2,267 | 2.609375 | 3 | [
"MIT"
] | permissive | import xml.etree.ElementTree as ET
from os import getcwd
classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]
def convert_annotation(fo, image_id, list_file):
x... |
Java | UTF-8 | 2,316 | 2.25 | 2 | [] | no_license | /*
* Copyright (C) 2013 Code-House, Lukasz Dywicki.
*
* 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 applicab... |
C# | UTF-8 | 2,334 | 3.1875 | 3 | [
"MIT"
] | permissive | namespace Chris03.CodeSnippets.LinqFilterExpressions
{
using System;
using System.Linq;
using System.Linq.Expressions;
/// <summary>
/// Search a date
/// </summary>
public class DateAdvancedSearch : DateSearch
{
/// <summary>
/// Gets the supported comparators.
... |
JavaScript | UTF-8 | 12,836 | 2.59375 | 3 | [
"MIT"
] | permissive | import React, { useState, useEffect } from 'react';
import './QuizCreationView.css';
import QuestionEdit from './QuestionEdit';
import Axios from 'axios';
import PageTypeEdit from './PageTypeEdit';
const API_HOST = process.env.REACT_APP_API_URL;
const API_PORT = process.env.REACT_APP_API_PORT;
const API_URL = `${API_H... |
JavaScript | UTF-8 | 1,312 | 2.734375 | 3 | [] | no_license | const express = require('express');
const router = express.Router();
const fs = require('fs');
const path = require('path');
// 设定读取的文件的路径
const study = '/public/students.json';
// 获取数据接口
router.get('/readitem',function(req,res){
// 读取study文件,给用户返回
fs.readFile(path.join(__dirname + study),'utf8',function(err,d... |
JavaScript | UTF-8 | 1,810 | 3.375 | 3 | [
"MIT"
] | permissive | function validateForm(){
var name = document.forms["form1"]["name"].value;
if (name == ""){
alert("Please enter your name");
return false;
}
var year = document.forms["form1"]["age"].value;
var day = new Date();
var currentYear = day.getFullYe... |
Java | UTF-8 | 154 | 1.625 | 2 | [] | no_license | package com.bird.demo.infrastructure.drl;
/**
* @author youly
* 2019/8/2 11:05
*/
public interface IConverter {
String process(Object object);
}
|
Markdown | UTF-8 | 15,301 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | # 2022.05.30-2022.06.05
## Algorithm
### 1. 题目
```
448. 找到所有数组中消失的数字
```
### 2. 题目描述
```
给你一个含 n 个整数的数组 nums ,其中 nums[i] 在区间 [1, n] 内。请你找出所有在 [1, n] 范围内但没有出现在 nums 中的数字,并以数组的形式返回结果。
示例 1:
输入:nums = [4,3,2,7,8,2,3,1]
输出:[5,6]
示例 2:
输入:nums = [1,1]
输出:[2]
```
### 3. 解答:
```golang
func findDisappearedNumbers(nums ... |
C# | UTF-8 | 4,262 | 3.109375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Text;
namespace ACO_TSP
{
public class OptimizationTSP
{
int[,] dist;
public OptimizationTSP(int[,] dist)
{
this.dist = dist;
}
public void opt2(int[] tour)
{
int i, j, k;
... |
PHP | UTF-8 | 1,315 | 2.515625 | 3 | [] | no_license | <?php
/**
* Copyright 2010 - 2013, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2010 - 2013, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.open... |
Java | ISO-8859-9 | 5,376 | 2.59375 | 3 | [] | no_license | // J5i_13.java: MultiListener (okluDinleyici) rnei.
import java.awt.Color;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.Dimension;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.SwingUtilities;
import... |
C++ | UTF-8 | 569 | 3.078125 | 3 | [] | no_license | #include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main() {
int T[2];
srand(time(NULL));
for (int i = 0; i < 20; i++) {
T[0] = (rand() % 900) + 100; //(zakres 100 - 1000)
T[1] = (rand() % 900) + 100;
cout << T[0] << " " << T[1] << endl;
if (T[0] % T[1] == 0) cout << "Lic... |
C++ | WINDOWS-1250 | 1,353 | 2.75 | 3 | [] | no_license | ////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Tank
//
// Germn Martnez
//
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef ___Tank_h___
#define ___Tank_h___
#include <src/entities/Entity.h>
#include ... |
Java | UTF-8 | 1,633 | 2.078125 | 2 | [] | no_license | package com.lavector.collector.crawler.project.article.tianya;
import com.lavector.collector.crawler.base.BaseCrawler;
import com.lavector.collector.crawler.base.CrawlerInfo;
import com.lavector.collector.crawler.base.CrawlerType;
import com.lavector.collector.crawler.base.MySpider;
import com.lavector.collector.crawl... |
C++ | UTF-8 | 2,153 | 2.65625 | 3 | [] | no_license | //Segment tree - lazy propagation
#include<cstdio>
#include<algorithm>
#include<cstring>
#define TREESIZE 400000
#define SIZE 100005
using namespace std;
int t, choice;
long long segtree[TREESIZE], lazy[TREESIZE], dif;
long n, c, i;
long st, nd; //for range sum and range update query
// -- RANGE SUM --
l... |
Python | UTF-8 | 3,936 | 3.65625 | 4 | [] | no_license | #Import the two sets of revenue data (`budget_data_1.csv` and `budget_data_2.csv`).
import os
import csv
data_1_path = os.path.join(".", "budget_data_1.csv")
combined_data = {}
#function to re-format dates
def format_date(full_date):
split = full_date.rpartition("-")
month = split[0]
year = split[2]
... |
Markdown | UTF-8 | 1,245 | 2.59375 | 3 | [
"MIT"
] | permissive | ---
title: "PowerShell 实现 curl 的用户名和密码逻辑"
author: lindexi
date: 2021-1-16 8:42:55 +0800
CreateTime: 2021/1/16 8:39:45
categories:
---
在使用 curl 时,可以采用 -u 加上用户名和密码,这个对应在 PowerShell 也就是不到 10 句话的事情
<!--more-->
<!-- CreateTime:2021/1/16 8:39:45 -->
<!-- 发布 -->
假定使用 curl 输入的是如下代码
```
curl -ulindexi:AP7doYUzM7WApXobRb... |
Markdown | UTF-8 | 3,400 | 2.859375 | 3 | [] | no_license | # Main Viewer

When openend, AMP will display its main image viewer. This window will contain figures generated
by plugins as well as direct images loaded in via the 'Open Cohort' menu option.
### Cohort Loading
To load a cohort of images into the viewer, find the `Open Cohort...` ... |
PHP | UTF-8 | 2,690 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class EditUserRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get t... |
C# | UTF-8 | 5,625 | 3.1875 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Sixeyed.Mapping.MappingStrategies;
using Sixeyed.Mapping.MatchingStrategies;
using Sixeyed.Mapping.Spec;
namespace Sixeyed.Mapping
{
/// <summary>
/// Automap for populating an object from another object
/// </... |
C++ | GB18030 | 30,425 | 2.65625 | 3 | [] | no_license | // FtpFile.cpp : ʵļ
//
#include "stdafx.h"
#include "FtpFile.h"
//#include ".\ftpfile.h"
// CFtpFile
CFtpFile::CFtpFile()
{
}
CFtpFile::~CFtpFile()
{
}
// ϴļ
BOOL CFtpFile::UploadFiletoFile(CString strLocalFilePath, CString strServerFilePath, FtpConnectInfo info)
{
CString strFtp=info.strFtp;
CString str... |
Java | UTF-8 | 2,225 | 1.851563 | 2 | [] | no_license | package cn.com.isurpass.securityplatform.service;
import cn.com.isurpass.securityplatform.dao.ZwaveSubDeviceDAO;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework... |
Rust | UTF-8 | 4,139 | 3.078125 | 3 | [
"MIT"
] | permissive | use crate::char::CharExt;
pub trait StrExt {
fn column_count(&self, tab_column_count: usize) -> usize;
fn indentation(&self) -> Option<&str>;
fn longest_common_prefix(&self, other: &str) -> &str;
fn graphemes(&self) -> Graphemes<'_>;
fn grapheme_indices(&self) -> GraphemeIndices<'_>;
fn split_w... |
Markdown | UTF-8 | 2,811 | 3.234375 | 3 | [] | no_license | # Spring courses at Pluralsight
This repository contains the code written while following [Spring Java Framework](https://spring.io/) at [Pluralsight](https://app.pluralsight.com/).
## Repository Structure
There's a folder in this repository for each project created while following the Spring courses available at **... |
Java | UTF-8 | 616 | 2.890625 | 3 | [] | no_license | package night;
import java.util.Iterator;
import java.util.LinkedList;
public class LightList {
private LinkedList<Light> ligths;
private LightList() {
ligths = new LinkedList<Light>();
}
private final static LightList instance = new LightList();
public static final LightList getInstan... |
JavaScript | UTF-8 | 225 | 3.296875 | 3 | [
"MIT"
] | permissive | var nombre = "Julián", edad = "37";
function GetName(n,e) {
console.log(`${n} tiene ${e}`);
}
const nombreYEdad = (n, e) => {
console.log(`${n} tiene ${e}`);
};
nombreYEdad(nombre,edad);
GetName(nombre, edad);
|
PHP | UTF-8 | 632 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Mohammed Elamin
* Date: 02/12/2018
* Time: 06:01
*/
class Sanitizer
{
public function sanitizeString($data)
{
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
$data = $conn->real_escape_strin... |
C++ | UTF-8 | 8,523 | 3.125 | 3 | [] | no_license | /*
* TriangleSet.cpp -- implementation of the triangle matching algorithm
*
* (c) 2016 Prof Dr Andreas Müller, Hochschule Rapperswil
*/
#include <AstroTransform.h>
#include <cmath>
namespace astro {
namespace image {
namespace transform {
/**
* \brief Triangle set constructor
*/
TriangleSet::TriangleSet() {
_a... |
TypeScript | UTF-8 | 793 | 2.546875 | 3 | [
"MIT"
] | permissive | import request from "supertest";
const server = request("http://localhost:3000/dev");
describe("Handler with error handler middleware", () => {
describe("with a search query method", () => {
const query = "/hello?search=x";
it("returns 500 and JSON with an Internal server error message", async () => {
... |
JavaScript | UTF-8 | 1,779 | 2.59375 | 3 | [
"MIT"
] | permissive | 'use strict'
const expect = require('chai').expect
const pathUtils = require('../../../lib/utils/path')
const ValueWrapper = pathUtils.ValueWrapper
describe('utils/path', () => {
describe('ValueWrapper class', () => {
var wrapper
beforeEach(function () {
wrapper = new ValueWrapper({
foo: {
... |
Java | UTF-8 | 2,851 | 2.234375 | 2 | [] | no_license | package template.solainteractive.com.androidsolatemplate.Utils;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Typeface;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.V... |
Markdown | UTF-8 | 628 | 2.84375 | 3 | [] | no_license | # Terraform-Aws
Course URL : https://www.youtube.com/watch?v=Hh2LMacslms
Terraform basics & usage with AWS.
Step 1 : copy the terraform.exe inside your local directory ex: C:\terraform (folder)
Step 2 : Add the path C:\terraform to the system/user environment variable.
Step 3 : Open command prompt and type te... |
Java | UTF-8 | 686 | 2.296875 | 2 | [] | no_license | package com.example.joke.controllers;
import com.example.joke.services.JokesServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public... |
Java | UTF-8 | 2,690 | 2.390625 | 2 | [
"Apache-2.0"
] | permissive | /*
* Copyright © 2020 IBM Corp. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
C++ | UTF-8 | 3,968 | 3.875 | 4 | [
"MIT"
] | permissive | // https://www.hackerrank.com/challenges/reverse-a-linked-list/problem
#include <bits/stdc++.h>
using namespace std;
class SinglyLinkedListNode {
public:
int data;
SinglyLinkedListNode *next;
SinglyLinkedListNode(int node_data) {
this->data = node_data;
this->next ... |
JavaScript | UTF-8 | 1,015 | 2.890625 | 3 | [] | no_license | import humps from 'humps'
/**
* Transform Object with camelCase keys
* into object with snake_case keys
*/
export function decamelizeObjectKeys (obj) {
return Object.keys(obj).reduce((newObj, camelKey) => {
newObj[humps.decamelize(camelKey)] = obj[camelKey]
return newObj
}, {})
}
/**
* Transform Objec... |
C++ | UTF-8 | 3,598 | 3.90625 | 4 | [] | no_license | /**
* Array-Based Union-Find Datastructure
*
* Author: Spencer Whitt
*/
#ifndef UNION_FIND_H
#define UNION_FIND_H
#include <vector>
#include <iostream>
using namespace std;
class UFarray {
private:
// Array which holds label -> set equivalences.
// The array index is the node
// The value at that i... |
Java | UTF-8 | 1,041 | 2.484375 | 2 | [
"Apache-2.0"
] | permissive | package Main;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
public class Main_PhysicsMomentum extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
Momentum m = new Momentum();
Main_PhysicsMome... |
JavaScript | UTF-8 | 506 | 4.4375 | 4 | [] | no_license | //Create a load event to show the object on screen
document.addEventListener('load',objectCreation(),false);
function objectCreation(){
//Create the object then print to the screen
function person (firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
this.fullName = function() {
... |
Java | UTF-8 | 2,067 | 3.140625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | /*
* MIT License
* Copyright (c) 2021 cegredev
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, m... |
C++ | UTF-8 | 4,417 | 2.59375 | 3 | [] | no_license | #include "level.h"
namespace core { namespace tmx {
Level::Level(TmxMap* tmxMap, std::string filePath, unsigned int winWidth, unsigned int winHeight)
{
std::string directory = StringUtils::getFolderFromPath(filePath);
this->m_TileSetName = tmxMap->getTileset()->getName();
this->m_TileSetWidth = tmxMap->getTi... |
Python | UTF-8 | 3,982 | 2.78125 | 3 | [] | no_license | import datetime
import psycopg2
class DBManager:
dbname = None
user = None
password = None
host = 'localhost'
cursor = None
conn = None
def __init__(self, dbname, user, password):
self.dbname = dbname
self.user = user
self.password = password
self.conn = p... |
Java | UTF-8 | 2,138 | 2.34375 | 2 | [] | no_license | package service;
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
i... |
Java | UTF-8 | 3,459 | 2.640625 | 3 | [] | no_license | package com.java.coolsound.model;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColum... |
Java | UTF-8 | 285 | 2.765625 | 3 | [] | no_license |
public class Link extends Object
{
Point px;
Point py;
public Link (Point p1, Point p2)
{
// un lien est composé de deux point
px = p1;
py = p2;
}
void affiche()
{
System.out.println(px.h+"=>"+py.h);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.