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 | 955 | 2.703125 | 3 | [] | no_license | package raceinggame;
import game.engine.*;
//import raceinggame.RacingLayer;
public class Racing extends GameEngine
{
private static final int SCREEN_WIDTH = 1024;
private static final int SCREEN_HEIGHT = 768;
public Racing()
{
gameStart( SCREEN_WIDTH, SCREEN_HEIGHT, 32 );
}
@Override
public boolean build... |
Markdown | UTF-8 | 2,641 | 3.234375 | 3 | [] | no_license | # ReinforcementNavigation
# Project 1: Navigation
# by Peerajak Witoonchart as a project for Udacity deep reinforcement learning nano degree.
Suppose you are to build an automatic banana eating monkey robot, how could you do?. Suppose there are two kinds of banana, the yellow bananas which taste good, and the dark blue... |
C# | UTF-8 | 4,815 | 2.5625 | 3 | [] | no_license | #region PRE_SCRIPT
using System.Collections.Generic;
using Sandbox.ModAPI.Ingame;
using Sandbox.ModAPI.Interfaces;
public class TurretEvader : MyGridProgram
{
#endregion PRE_SCRIPT
//auto turret evasion script
//
// if you travel too fast towards the turret, it will catch your predictable vector.
... |
Java | UTF-8 | 2,826 | 2.71875 | 3 | [] | no_license | package rosa.archive.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Columns:
* Standard Name, Alternate Name 1, Alternate Name 2, Alternate Name 3, Alternate Name 4, Alternate Name 5, Bibl. Informa... |
Rust | UTF-8 | 5,383 | 3.234375 | 3 | [
"Unlicense"
] | permissive | //! Definition of the WAM.
use functor::Functor;
use self::mem::{Cell, Memory, Pointer, Slot, Register};
pub mod mem;
#[cfg(test)]
mod test;
#[derive(Debug)]
pub struct Machine {
mem: Memory,
mode: Mode,
}
#[derive(Debug)]
enum Mode {
Read(Slot),
Write,
}
pub type Fallible = Result<(),()>;
pub t... |
C | UTF-8 | 2,511 | 3.21875 | 3 | [
"MIT"
] | permissive | /* logical words */
void andfunc()
{
if (data_stack_ptr < 2)
{
printf("'and' needs two elements on the stack!\n");
return;
}
push((DCLANG_INT) dclang_pop() & (DCLANG_INT) dclang_pop());
}
void orfunc()
{
if (data_stack_ptr < 2)
{
printf("'or' needs two elements on the st... |
C++ | UTF-8 | 4,295 | 2.65625 | 3 | [] | no_license | #include <windows.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
HANDLE OpenComPort(char* PortName)
{
HANDLE hCom = CreateFileA(PortName, //port name
GENERIC_READ | GENERIC_WRITE, //Read/Write
0, /... |
Python | UTF-8 | 488 | 2.5625 | 3 | [] | no_license | import re
def get_res():
res = {}
re_for_extracting_number_of_results = re.compile('[0-9]+')
re_for_extracting_number_of_views_and_replies = re_for_extracting_number_of_results
re_for_extracting_search_id = re.compile('searchid=[0-9]+')
res['extracting_number_of_results'] = re_for_extracting_number_of_results... |
Markdown | UTF-8 | 443 | 2.625 | 3 | [] | no_license | # Daily-reading-assistant
“Daily reading assistant”technical support
Books are the ladder of human progress, and opening a book is useful, such as reading useful famous sayings. Daily reading assistant can help you record your reading situation, by setting an alarm clock, remind yourself to read daily, and develop a go... |
Java | UTF-8 | 934 | 2.5625 | 3 | [] | no_license | package org.usfirst.frc.team7634.robot.commands;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team7634.robot.Robot;
import org.usfirst.frc.team7634.robot.RobotMap;
import org.usfirst.frc.team7634.robot.RobotSettings;
public class CubeLowerCommand extends Command {
public static double cur... |
C++ | UTF-8 | 1,534 | 3.265625 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define dump(x) cerr << #x << " = " << (x) << endl;
static const int INF = 999;
int N = 4;
struct Edge {
int from, to, cost;
Edge(int f, int t, int c) : fr... |
Java | UTF-8 | 670 | 3.015625 | 3 | [] | no_license | package jaspreet;
import java.util.Scanner;
public class int2roman {
public static void main(String[] args) {
// TODO Auto-generated method stub
String ones[] = {"","I","II","III","IV","V","VI","VII","VIII","IX"};
String tens[] = {"","X","XX","XXX","XL","L","LX","LXX","LXXX","XC"};
String hun[] = {"... |
Java | UTF-8 | 747 | 2.453125 | 2 | [] | no_license | package com.example.demo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
@RestController
public class SwaggerAPIController
{
@RequestMapping( value = "... |
Markdown | UTF-8 | 5,301 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | # Baggage API
**Status**: [Feature-freeze](../document-status.md).
<details>
<summary>
Table of Contents
</summary>
- [Overview](#overview)
- [Baggage](#baggage)
- [Get baggages](#get-all)
- [Get baggage](#get-baggage)
- [Set baggage](#set-baggage)
- [Remove baggage](#remove-baggage)
- [Clear](#clear)
- ... |
C | UTF-8 | 763 | 2.9375 | 3 | [] | no_license | #include "test_utils/test_utils.h"
#include "../include/WAM.h"
#define TEST "WAM"
void TEST_WAM_1() {
matrix* mat;
vector* v;
vector* tmp;
int n = 7;
int m = 9;
int i, j;
mat = matrix_init(n, 0);
v = vector_init_zero(n);
for (i=0; i<n; i++) {
v->values[i] = i;
}
for (i=0; i<m; i++) {
tmp = vector_co... |
C++ | UTF-8 | 925 | 3.21875 | 3 | [] | no_license | #define _CRT_SECURE_NO_WARNINGS
/*The define above is very important.
Without it,strcat and strcpy will crash.
*/
#include<iostream>
#include<vector>
#include<string>
#include<initializer_list>// new operations!
#include <system_error> // std::error_code, std::generic_category
// std::error_condition
#incl... |
Java | UTF-8 | 3,036 | 2.3125 | 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 com.socialNetwork.socialNetwork.Entity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.socialNetwo... |
Java | UTF-8 | 709 | 3.625 | 4 | [] | no_license | package swtich_case;
import java.util.Scanner;
public class Test02 {
public static void main(String[] args) {
// 사용자에게 월을 정수로 입력받아서 해당하는 월의 날짜수를 화면에 출력
Scanner sc = new Scanner(System.in);
System.out.println("월을 입력하세요.");
int month = sc.nextInt();
sc.close();
//계산 : 만약에 2월이라면 30일까지 있습니다.
... |
JavaScript | UTF-8 | 1,313 | 2.515625 | 3 | [] | no_license | import React from 'react';
import get from 'lodash.get';
const StatTable = ({ statType, ranking, selectedStat, selectedAttribute }) => {
const fighterStatPath = statType === 'official' ?
`stats.official.${selectedStat}`:
`stats.unofficial.${statType}.${selectedStat}`;
return(
<table className='ranking-table'>
... |
PHP | UTF-8 | 969 | 2.625 | 3 | [] | no_license | <?php
/*****************************************************************************************************
get our passed data.
data can either be passed in xml via the apidata= parameter, or as a request variable.
To pass arrays of data, either use field[] notation for request vars, or use the
variable name... |
Markdown | UTF-8 | 3,043 | 2.9375 | 3 | [] | no_license | ---
layout: page
title: Artwork
permalink: /artwork/
banner: /images/post-assets/oil-blur.jpg
---
1. [Microcosm](#microcosm)
2. [The Illustrated Man](#the-illustrated-man)
3. [Glitch Art](#glitch-art)
## Microcosm
Tiny worlds surround us just out sight. I have always been fascinated with the small and unseen. Advance... |
Java | UTF-8 | 1,885 | 1.65625 | 2 | [] | no_license | package com.techsoft.client.service.struct;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.techsoft.common.BaseClientService;
import com.techsoft.common.BusinessException;
import com.techsoft.common.SQLException;
import com.techsoft.common.CommonParam;
import com.techsoft.common.persistence.... |
Java | UTF-8 | 2,222 | 3.546875 | 4 | [] | no_license | package hr.fer.zemris.java.hw17.jvdraw.geometry;
import java.awt.Color;
import java.awt.Point;
import java.util.Objects;
import hr.fer.zemris.java.hw17.jvdraw.geometry.editor.GeometricalObjectEditor;
import hr.fer.zemris.java.hw17.jvdraw.geometry.editor.LineEditor;
import hr.fer.zemris.java.hw17.jvdraw.geometry.visit... |
Python | UTF-8 | 1,927 | 3.171875 | 3 | [] | no_license | x = input().split()
a, b, c, d = x
a = int(a) // hora inicial
b = int(b) // minuto inicial
c = int(c) // hora final
d = int(d) // minuto final
if c < 12 and a < 12 and d != b and c - a >= 2:
horas = c - a
if d < b:
minutos = (d - b) + 60
print(f'O JOGO DUROU {horas} HORA(S) E {minutos} MINUTO(... |
SQL | UTF-8 | 1,438 | 3.8125 | 4 | [] | no_license |
1) Customers of particular city
select c_name,date,amount from (customer as c join customer_transaction as ct ON (c.cid=ct.cid) ) where c_city='udaipur';
2)customers who buy paricular product
select c_name from( (customer as c join billing as b ON(c.cid=b.cid)) as r0 join
product_info as p1 ON(r0.bill_id=p1.bill_... |
Java | UTF-8 | 4,547 | 2.640625 | 3 | [] | no_license | package org.blep.poc.hcq;
import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.hibernate.transform.Transformers;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import javax.annotation.Nullable;
import javax.persistence.EntityManager... |
SQL | UTF-8 | 1,782 | 3.671875 | 4 | [] | no_license | /****************************************************
* Procudure to write the contents of the
* new_transaction table into a delimited
* text file.
* Authors: Jocelyn Wegen & Matthew Lee
* Date: December 3, 2019
****************************************************/
CREATE OR REPLACE PROCEDURE WRITE_FILE_SP
(p_di... |
Python | UTF-8 | 2,766 | 2.703125 | 3 | [] | no_license | from bots.black_bot import black_bot
from bots.telegram_bot import telegram_bot
import config
from colors import *
def update_grid():
# attempt to retrieve order history from matcher
try:
history = black_bot.wallet.getOrderHistory(black_bot.asset_pair)
except:
history = []
if history:... |
Java | UTF-8 | 1,560 | 3.046875 | 3 | [] | no_license | package com.atguigu.JUC;
import java.util.concurrent.*;
public class MyThreadPoolDemo_13 {
public static void main(String[] args) {
//线程池线程数配置
//cpu密集型 最大线程数 比cpu线程多1到2 io密集型 cpu线程数除阻塞系数
System.out.println(Runtime.getRuntime().availableProcessors());
ExecutorService threadPoll = new ThreadPoolExecutor... |
Java | UTF-8 | 114 | 1.539063 | 2 | [] | no_license | package com.kasun.kasun_demo_crud.services;
public interface CountryServices {
String findAllCountries();
}
|
C++ | UTF-8 | 2,760 | 3.5625 | 4 | [] | no_license | #ifndef LIB_OPTIONAL_HEADER
#define LIB_OPTIONAL_HEADER
/** \file
* \brief Header for the \ref lib::sparse_optional "sparse_optional" template class
*/
namespace lib {
/** \brief Similar to C++17's std::optional, but stores the data in
* dynamic memory.
*
* sparse_optional is useful to save memory if it ... |
Python | UTF-8 | 12,850 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | # Copyright (c) 2020 Horizon Robotics and ALF Contributors. 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... |
Java | UTF-8 | 1,910 | 3.203125 | 3 | [] | no_license | package JavaBasicTrain;
import com.sun.corba.se.impl.orbutil.concurrent.Sync;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import java.util.concurrent.locks.ReentrantLock;
/**
* builder设计模式
*/
public class User {
private final String name;
priva... |
SQL | UTF-8 | 18,834 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 08, 2021 at 09:58 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
C# | UTF-8 | 877 | 2.828125 | 3 | [
"MIT"
] | permissive | using System;
namespace BenchmarkDotNet.Diagnosers
{
public class PerfCollectProfilerConfig
{
/// <param name="performExtraBenchmarksRun">When set to true, benchmarks will be executed one more time with the profiler attached. If set to false, there will be no extra run but the results will contain ove... |
Java | UTF-8 | 5,795 | 1.960938 | 2 | [] | no_license | package com.htstar.ovms.enterprise.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.h... |
Java | UTF-8 | 1,306 | 2.359375 | 2 | [] | no_license |
package com.capgemini.heskuelita.service.impl;
import com.capgemini.heskuelita.core.beans.User;
import com.capgemini.heskuelita.data.IUserDao;
import com.capgemini.heskuelita.service.ISecurityService;
import com.capgemini.heskuelita.service.SecurityException;
public class SecurityServiceImpl implements ISecuritySe... |
Java | UTF-8 | 141 | 1.5625 | 2 | [] | no_license | package com.example.appuidroid.ui.letterlist;
public interface LetterListViewListener {
public void onTouchingLetterChanged(String chr);
}
|
C | UTF-8 | 365 | 3.8125 | 4 | [] | no_license | # include <stdio.h>
int main (void)
{
int a;
int b;
int c;
int d;
printf("please input two number:\n");
scanf("%d%d",&a,&b);
printf("your input is: %4d%4d\n",a,b);
if(b!=0)
{ c = a/b;
d = a%b;
printf("%d divided by %d is %d and the reminder is %d \n",a,b,c,d);
}
else
{
print... |
C# | UTF-8 | 2,116 | 2.578125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // Copyright 2017 Google Inc. 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 applicabl... |
Java | UTF-8 | 10,301 | 2.21875 | 2 | [
"MIT"
] | permissive | package net.ausiasmarch.dao.genericdao;
import net.ausiasmarch.dao.daointerface.DaoInterface;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import net.ausiasmarch.bean.BeanInterface;
import ... |
Python | UTF-8 | 3,864 | 3.171875 | 3 | [] | no_license | # ----------------------------------------------------------------------------------------------------------------------
import numpy as np
# ----------------------------------------------------------------------------------------------------------------------
"""
@author Julian Salinas, Armando Lopez, Andrey Mendoz... |
Python | UTF-8 | 2,374 | 3.125 | 3 | [] | no_license | ###############################################################################
# File name: execute.py #
# Author: Milton Straw #
# Date created: 12/4/2019 #
... |
Markdown | UTF-8 | 1,893 | 2.765625 | 3 | [] | no_license | ---
layout: post
title: "junit mockmvc 한글깨짐 처리시 restdocs 에러"
date: 2021-08-11 11:37 +0900
comments: true
tags : ["spring restdocs","junit 한글깨짐","restdocs","REST Docs configuration not found","Did you forget to apply a MockMvcRestDocumentationConfigurer when building the MockMvc instance"]
categories : ["java"]
sitemap ... |
TypeScript | UTF-8 | 6,472 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
import { interaction, Renderer } from "pixi.js";
import InteractionEvent = interaction.InteractionEvent;
import InteractionManager = interaction.InteractionManager;
import { EShape } from "../e-shape";
import { EShapeRuntime } from... |
C | UTF-8 | 1,872 | 2.546875 | 3 | [] | no_license | // vim: nu et ts=8 sts=2 sw=2
typedef struct Environment {
SDL_Window* window;
SDL_Surface* screen;
SDL_Renderer* renderer;
PxSz screenSize;
int shortDimension;
bool isOrientationHorizontal;
bool haveJoystick;
} Environment;
#define dieSDL(FAILED_FUNCTION_NAME) \
die("%s: %s", (FAILED_FUN... |
PHP | UTF-8 | 1,416 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use App\Models\Cliente;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Maatwebsite\Excel\Concerns\WithValidation;
use PhpOffice\PhpSpreadsheet\Shared\Date;
class ClientesImport implements ToModel,WithValidation
{
public functi... |
Markdown | UTF-8 | 474 | 2.515625 | 3 | [] | no_license | # Summary
* [Introduction](README.md)
* [环境心理学:为什么 是什么 怎么做](chapter1.md)
* [自然与人类本性](chapter2.md)
* [环境知觉和环境认知](chapter3.md)
* [脑神经](chapter3.1.md)
* [环境——行为关系理论](chapter4.md)
* [噪声](chapter5.md)
* [声音传播原理相关](chapter5.1.md)
* [天气、气候和行为](chapter6.md)
* [灾难、有毒物质及污染](chapter7.md)
* [个人空间与领地性](chapter8.md)
|
C | UTF-8 | 844 | 3.46875 | 3 | [] | no_license | #include <iostream>
using namespace std;
int max(int a, int b, int c);
int max4(int a, int b, int c, int d);
int main()
{
int a, b, c ,d;
cin>>a>>b>>c>>d;
//max(a, b, c);
cout<<max4( a, b, c, d) <<endl;
return 0;
}
int max4(int a, int b, int c, int d)
{
int tmp = max(a, b, c);
if(tmp>d)
... |
C++ | UTF-8 | 344 | 2.515625 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
long long n, m;
long long g( long long x ){
if( x % 2 ) return x * ( ( x + 1 ) / 2 );
return ( x / 2 ) * ( x + 1 );
}
int main( ){
cin >> n >> m;
cout << ( g( ( n / m ) - 1 ) * ( m - ( n % m ) ) ) + ( g( ( ( n + m - 1 ) / m ) - 1 ) ) * ( n % m ) << " " << g... |
C# | UTF-8 | 2,025 | 2.703125 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum Characters
{
Vegan, DJ, Master, Tiger, Hagbard, Olle, Asp, Fitkin
}
[System.Serializable]
public class CharacterData
{
[SerializeField]
Characters m_type;
public Characters Type
{
get { return m_typ... |
PHP | UTF-8 | 1,074 | 2.578125 | 3 | [] | no_license | <?php
require '../../controllers/customerController.php';
$key=$_GET["key"];
$customers = searchCustomer($key);
?>
<table>
<?php
foreach($customers as $customer)
{
echo "<tr>";
... |
Java | UTF-8 | 6,307 | 2.625 | 3 | [] | no_license | package com.bsb.hike.ios.tests.groupChat;
import org.testng.Assert;
import org.testng.Reporter;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.bsb.hike.ios.base.AppiumCapabilities;
import com.bsb.hike.ios.library.HikeLibrary;
import c... |
Java | UTF-8 | 445 | 1.695313 | 2 | [] | no_license | package com.example.przelewy24.controller;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.springframework.lang.NonNull;
@AllArgsConstructor
@Getter
@Setter
public class ClientTransactionRequest {
@NonNull
private int amount;
@NonNull
private String currency;
... |
C | ISO-8859-1 | 544 | 4.3125 | 4 | [] | no_license | #include <stdio.h>
/*
8. Faa uma funo que receba como parmetro um
nmero inteiro positivo e retorne o fatorial do mesmo.
*/
int fat(int N)
{
if(N==1||N==0)
{
return 1;
}
else
{
return N*fat(N-1);
}
}
int fatorial(int N)
{
int i,fat=1;
for(i=N;i>=1;i--)
{
f... |
Markdown | UTF-8 | 855 | 2.8125 | 3 | [] | no_license | ### Hi there 👋
My name is Oleg, and I'm a software geek 👨💻
🔭 I’m currently working on:
- The biggest container registry in the world 🐳 https://hub.docker.com
- Docker Hub, Docker Desktop & Docker CLI
💬 Ask me about:
- Docker, Containers, Kubernetes & Go / Golang
📫 How to reach me:
- I'm on [LinkedIn](htt... |
Java | UTF-8 | 82 | 1.75 | 2 | [] | no_license | package ru.gasheva.client;
public interface PhotoObserver {
void update();
}
|
C++ | UTF-8 | 1,883 | 3.328125 | 3 | [] | no_license | #include "Rook.h"
// Constructor
Rook::Rook(char type) : Piece(type)
{
}
// Destructor
Rook::~Rook()
{
}
/*
Function will get coordinates and will check if this move is valid by Rook's possible moves.
Input:
int (&coordinates)[4] --> The 4 coordinates: (x, y) current, (x, y) target.
Output:
... |
Python | UTF-8 | 550 | 3.421875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
'''
Created on 06/12/2012
@author: Maria
'''
import tkinter as tk
def result():
print( " this sum of 2+2 is : ", 2+2)
mainWindow = tk.Tk()
mainWindow = root.tk("Password Generator")
win = tk.Frame()
win.pack()
label1 = tk.Label( win, text = "click New to create ... |
Java | UTF-8 | 6,177 | 2.4375 | 2 | [] | no_license | /**
* Copyright (C) 2010 Leon Blakey <lord.quackstar at gmail.com>
*
* This file is part of PircBotX.
*
* PircBotX is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License... |
Python | UTF-8 | 3,949 | 3.6875 | 4 | [] | no_license | # Robin Camille Davis
# February 28, 2014
# Methods II
# Homework 1
# Section B: Open-ended programming problem
# This script compares one text to another text
from nltk.book import *
from math import log
import nltk.data
sentsplitter = nltk.data.load('tokenizers/punkt/english.pickle')
#
# Following compares word ... |
Shell | UTF-8 | 549 | 2.828125 | 3 | [
"MIT"
] | permissive | # 通过 readlink 获取绝对路径,再取出目录
work_path=$(dirname $(readlink -f $0))
systemctl stop saynice-api
systemctl stop saynice-web
mv $work_path/saynice-api-amd64-linux-v1 /usr/local/bin/saynice-api
mv $work_path/saynice-web-amd64-linux /usr/local/bin/saynice-web
mv $work_path/saynice-api.service /lib/systemd/system
mv $work_pa... |
Java | UTF-8 | 3,080 | 2.234375 | 2 | [] | no_license | package com.wtd.ddd.controller.study;
import com.wtd.ddd.controller.ApiResult;
import com.wtd.ddd.model.commons.Id;
import com.wtd.ddd.model.study.Apply;
import com.wtd.ddd.model.study.Post;
import com.wtd.ddd.model.study.StudyCode;
import com.wtd.ddd.service.StudyService;
import org.springframework.beans.factory.anno... |
TypeScript | UTF-8 | 1,244 | 2.578125 | 3 | [
"MIT"
] | permissive | import { Get, Post, Res, Param, Body, HttpCode, Controller, Patch, Put, Delete } from '@nestjs/common';
import { PostsService } from '../../service/posts/posts.service';
import { Posts } from '../../model/entity/posts.entity';
@Controller('posts')
export class PostsController {
constructor(private readonly postServ... |
SQL | UTF-8 | 460 | 3.40625 | 3 | [] | no_license | --
-- @lc app=leetcode.cn id=180 lang=mysql
--
-- [180] 连续出现的数字
--
# Write your MySQL query statement below
select distinct l1.Num as ConsecutiveNums
from Logs l1
join Logs l2 on l1.Id = l2.Id-1
join Logs l3 on l1.Id = l3.Id-2
where l1.Num = l2.Num and l1.Num = l3.Num;
-- select distinct l1.Num as ConsecutiveNums
-- ... |
JavaScript | UTF-8 | 313 | 2.6875 | 3 | [] | no_license | const bcrypt = require("bcrypt");
const saltRounds = 11;
module.exports = {
async generate(password) {
return await bcrypt.hash(password, saltRounds).then(hash => hash);
},
async compare(password, passwordHash) {
const match = await bcrypt.compare(password, passwordHash);
return match;
}
} |
Go | UTF-8 | 9,536 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | /*
* Cadence - The resource-oriented smart contract programming language
*
* Copyright 2019-2020 Dapper Labs, 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.ap... |
Java | UTF-8 | 676 | 1.945313 | 2 | [] | no_license | package com.bawei.caolina201907.contract;
import com.bawei.caolina201907.model.HomeModel;
import com.bawei.lib_core.base.mvp.BaseModel;
import com.bawei.lib_core.base.mvp.BasePresenter;
import com.bawei.lib_core.base.mvp.BaseView;
public interface HomeContract
{
abstract class HomePresenter extends BasePresente... |
Python | UTF-8 | 677 | 2.796875 | 3 | [] | no_license | import os, requests, zipfile
class FileDownloader:
def __init__(self, url, path):
self.url = url
self.path = path
def __enter__(self):
get_file = requests.get(self.url)
with open(self.path, 'wb') as file:
file.write(get_file.content)
return self
def _... |
Java | UTF-8 | 191 | 1.820313 | 2 | [] | no_license | package Ex2;
public class MainEx2App {
public static void main(String[] args) {
//Ceamos un objeto de la clase que hemos creado.
Peliculas ventana = new Peliculas();
}
}
|
C# | UTF-8 | 422 | 2.71875 | 3 | [] | no_license | using System;
namespace Cashbox.Data.Entities
{
public abstract class BaseEntity
{
public BaseEntity(Guid id)
{
if (Guid.Equals(id, default(Guid)))
throw new ArgumentException("The id can't be the default value.");
this.Id = id;
}
... |
Markdown | UTF-8 | 1,314 | 2.859375 | 3 | [] | no_license | ---
title: "Relaunch!"
layout: "post"
categories: [Jekyll, LESS]
---
After nearly a year of inactivity, I have finally returned to my blog.
I had neglected it for so long primarily because I don't like Blogger's compose options. After spending so much time on StackOverflow and GitHub, I find Markdown far more conven... |
C | UTF-8 | 2,591 | 3.25 | 3 | [] | no_license |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "utils.h"
#include "pboDataTypes.h"
#include "pboExtractor.h"
#define VERSION "0.1"
static void version(char *myself) {
printf("%s version %s (compiled %s)\n", myself, VERSION, __DATE__);
}
static void help(char *myself) {
... |
Shell | UTF-8 | 432 | 3.296875 | 3 | [] | no_license | #!/bin/bash
if [ -z "$1" ]; then
echo "call : pmshutdown <workflow>"
echo "example: pmshutdown modis.py"
exit 1
fi
if [ "$CALVALUS_INST" == "" ]; then CALVALUS_INST=.; fi
workflow=$(basename ${1%.py})
workflow=${workflow%.sh}
if [ ! -e $CALVALUS_INST/${workflow}.pid ]; then
echo "missing ${workflow... |
PHP | UTF-8 | 8,114 | 2.65625 | 3 | [] | no_license | <?php
namespace Admin\Controller;
use Think\Controller;
class OrderController extends PubController {
// public function batAddOrder(){
// $model = M('Order');
// $startTime = strtotime('-50 day');//先获取50天前的时间戮
// for($i=0;$i<500;$i++){
// $startTime += mt_rand(2,8640);//在循环里让时间... |
Java | UTF-8 | 397 | 1.65625 | 2 | [
"Apache-2.0"
] | permissive | package com.agri.monitor.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class WorkBenchController {
@RequestMapping("/workbench")
public String index() {
return "/workbench";
}
@RequestMapping("/dat... |
PHP | UTF-8 | 1,070 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Add news</title>
</head>
<body>
<form method="post" action="add.php">
<p>Название новости:</p>
<input type="text" name="title">
<p>Текст новости:</p>
<textarea cols="40" rows="10" name="text"></textarea>
<p>Автор новости:</p>
<input type="text" name="author">
<!-- <input... |
Java | UTF-8 | 1,202 | 3.125 | 3 | [
"Apache-2.0"
] | permissive | package ru.asemenov.Tracker;
/**
* Class StartUI решение задачи части 002 урока 4.
* @author asemenov
* @version 1
*/
public class StartUI {
/**
* this.input.
*/
private Input input;
/**
* this.tracker.
*/
private Tracker tracker;
/**
* StartUI.
* @param input input.
* @pa... |
Markdown | UTF-8 | 10,632 | 2.84375 | 3 | [] | no_license | # Politic-Thoery
## Anti-Enlightenment
Burkean Outlook
Irish, Edmund Burke (1729 - 1797), conservative (time-heritage)
Outlook
Hostility to science (1789 French Revolution, rebuild the whole regime) Aristotle
Decentering of the individual (Kennedy)
Burke’s selection on the French Revolution
Time could change
Valu... |
Python | UTF-8 | 2,935 | 4 | 4 | [] | no_license | # wire-spin: simple animated 3d objects in Python
def tetrahedron():
'''
Return a hashed set containing the line segments of a tetrahedron.
Form: {[(x,y,z),(x,y,z)], [(x,y,z),(x,y,z)], ...}
i.e., {[(point), (vector)], ... }
Each element of the set is a list containing six numerical elements.
... |
JavaScript | UTF-8 | 4,224 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | /**
*
* Copyright 2014-present Basho Technologies, 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 app... |
C++ | UTF-8 | 3,908 | 2.625 | 3 | [] | no_license | //#include <Arduino.h>
/*
Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleServer.cpp
Ported to Arduino ESP32 by Evandro Copercini
updates by chegewara
*/
/*
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#incl... |
Shell | UTF-8 | 471 | 2.84375 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env bash
OLD_DIR=$(pwd)
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
SRC_DIR=$(cd $SCRIPT_DIR/../src; pwd)
echo "SRC_DIR=$SRC_DIR"
cd $SRC_DIR/main/java
echo -n ' => Compiling proto for java... '
protoc --java_out=. \
com/ctrip/ferriswheel/proto/workbook.proto \
com/ctrip/ferriswheel/proto/action.proto \
... |
Python | UTF-8 | 866 | 2.546875 | 3 | [] | no_license | #! /usr/bin/env python3
import socket
import os
import time
import sys
import signal
import time
def sig_handler(signum,frame):
print("Stopping application")
exit(0)
signal.signal(signal.SIGINT,sig_handler)
soc = socket.socket()
soc.bind(('',1632))
#help(soc.listen)
soc.listen(1)
while(True):
c,addr = soc.accept(... |
C++ | UTF-8 | 281 | 2.765625 | 3 | [] | no_license | #include<iostream>
int main()
{
std::string str = "HI THIS IS BRAIN";
std::string *pointString = &str;
std::string &refString = str;
std::cout << str << std::endl;
std::cout << *pointString << std::endl;
std::cout << refString << std::endl;
return 0;
} |
Python | UTF-8 | 2,790 | 2.5625 | 3 | [] | no_license | # Copyright 2012 Davoud Taghawi-Nejad
#
# Module Author: Davoud Taghawi-Nejad
#
# ABCE is open-source software. If you are using ABCE for your research you are
# requested the quote the use of this software.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compli... |
Python | UTF-8 | 549 | 2.921875 | 3 | [] | no_license | import matplotlib.pyplot as plt
import numpy as np
import cv2
def getImage(nome):
return cv2.imread(nome, cv2.IMREAD_COLOR)
def filterBlue(img):
for line in img:
for pix in line:
pix[0] = 0
def filterGreen(img):
for line in img:
for pix in line:
pix[1] = 0
def filterRed(img):
for line in img:
for p... |
Java | UTF-8 | 5,867 | 3.109375 | 3 | [] | no_license | package com.mvj.estruturadados;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertThrows;
class VetorTest {
//https://assertj.github.io/doc/#assertj-overview
@Test
void deveAdicionarElementoNoVetor() {
var ... |
PHP | UTF-8 | 956 | 2.5625 | 3 | [] | no_license | <?php namespace App\Observers;
/**
* @author: wanghui
* @date: 2017/4/20 下午4:23
* @email: hank.huiwang@gmail.com
*/
use App\Cache\UserCache;
use App\Models\Company\CompanyData;
use App\Models\UserInfo\ProjectInfo;
use Illuminate\Contracts\Queue\ShouldQueue;
class UserProjectObserver implements ShouldQueue {
... |
C++ | GB18030 | 615 | 2.703125 | 3 | [] | no_license | #pragma once
/*=============================================================================
Object.h: Direct base class for alpha Lyrae Engine
=============================================================================*/
// mapмصĶ̳д࣬缸壬
// ʵ˻ļÿΨһid
class Object {
private:
static unsigned int g_count; //objectĸ... |
PHP | UTF-8 | 6,476 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: calumwillis
* Date: 14/02/2020
* Time: 17:02
*/
ini_set("session.save_path", "/home/unn_w17006735/sessionData");
session_start();
require_once("functions.php");
$input = array();
$errors = false;
//Gathers the variables from the form and sets stor... |
Python | UTF-8 | 6,987 | 2.578125 | 3 | [] | no_license | import scrapy
import re
def remove_tags(text):
tag_re = re.compile(r"<[^>]+>")
return tag_re.sub("", text)
class MorizonSpider(scrapy.Spider):
name = "morizon"
def start_requests(self):
for i in range(1, 35):
yield scrapy.Request(
f"https://www.morizon.pl/dzialki... |
Swift | UTF-8 | 1,365 | 2.90625 | 3 | [] | no_license | //
// EventDetailViewModel.swift
// SeatGeekEvents
//
// Created by Анастасия Ковалева on 3/24/20.
// Copyright © 2020 Anastasia Rodzik. All rights reserved.
//
import Foundation
import Bond
import ReactiveKit
protocol EventViewModel {
var isFavorite: Observable<Bool> { get }
var eventViewModel: Event... |
Markdown | UTF-8 | 6,252 | 2.53125 | 3 | [
"CC-BY-4.0",
"MIT"
] | permissive | ---
title: Troubleshoot cluster validation reporting
description: Troubleshoot cluster validation reporting and validate QoS settings configuration for Azure Stack HCI clusters
author: jasongerend
ms.topic: troubleshooting
ms.date: 04/17/2023
ms.author: jgerend
---
# Troubleshoot cluster validation reporting
> Applie... |
Python | UTF-8 | 929 | 2.890625 | 3 | [] | no_license | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 11 10:34:32 2018
@author:
"""
import csv
import MySQLdb
connection = MySQLdb.connect(db="----",user="root",passwd="------",host='localhost')
cursor=connection.cursor()
count = 0;
#table 作成
sql = 'create table name (id int, content varchar(32), c... |
Java | UTF-8 | 1,219 | 2.46875 | 2 | [] | no_license | package cn.itcast.bookstore.category.service;
import java.util.List;
import cn.itcast.bookstore.category.dao.CategoryDao;
import cn.itcast.bookstore.category.domain.Category;
public class CategoryService {
private static final String String = null;
private CategoryDao categoryDao=new CategoryDao();
public List<C... |
Markdown | UTF-8 | 8,606 | 2.671875 | 3 | [
"MIT"
] | permissive | # Phrase\TagsApi
All URIs are relative to *https://api.phrase.com/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**tagCreate**](TagsApi.md#tagCreate) | **POST** /projects/{project_id}/tags | Create a tag
[**tagDelete**](TagsApi.md#tagDelete) | **DELETE** /projects/{project_id}/... |
Rust | UTF-8 | 10,252 | 2.90625 | 3 | [] | no_license | use super::BlockAllocator;
use crate::alloc::changeset::ChangeSet;
use std::mem::{size_of, ManuallyDrop};
use std::ptr::NonNull;
pub const CHUNK_DEGREE: usize = 24;
pub const CHUNK_SIZE: usize = 1 << CHUNK_DEGREE; // 16MB per block
#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq)]
pub struct Handle(u32)... |
Java | UTF-8 | 2,847 | 2.296875 | 2 | [
"Apache-2.0"
] | permissive | package org.esupportail.smsuapiadmin.dto.beans;
import java.util.Date;
import org.esupportail.smsuapi.domain.beans.sms.SmsStatus;
/**
* UISms is the representation on the web side of the Sms persistent.
*
* @author MZRL3760
*
*/
public class UISms extends UIObject {
/**
* identifier (databa... |
Python | UTF-8 | 679 | 2.859375 | 3 | [] | no_license | import dash
from dash.dependencies import Input, Output, State
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div([
dcc.Input(id='my-id', value='initial value', type="text"),
html.Button('Click Me', id='button'),
html.Div(id='my-div')
])
@app.ca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.