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 |
|---|---|---|---|---|---|---|---|
C++ | UTF-8 | 1,471 | 2.890625 | 3 | [] | no_license | //
// EventBase.h
// ObserverPattern
//
// Created by Mike Allison on 3/28/15.
//
//
#pragma once
using EventType = std::string;
using EventBaseRef = std::shared_ptr<class EventBase>;
class EventBase {
public:
const double& getTimeStamp(){ return mTimeStamp; }
virtual const EventType& getT... |
Java | UTF-8 | 789 | 2.046875 | 2 | [] | no_license | package com.edu.feicui.uidc.retrofit;
import android.app.Activity;
import android.os.Bundle;
/**
* Created by Administrator on 2017-1-9.
*/
public class RetrofitActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
/... |
C++ | UTF-8 | 1,463 | 3.203125 | 3 | [] | no_license | // ConsoleApplication12.cpp : Este archivo contiene la función "main". La ejecución del programa comienza y termina ahí.
//
#include "pch.h"
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
//variables
int sueldo;
char tipoV, tarjetaC, cargaF;
int puntoS, puntosTv, puntosT... |
Java | UTF-8 | 793 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | package com.communote.server.core.common.caching;
/**
* Common cache key class for cases where there is only one element per application that can be
* cached.
*
* @author Communote GmbH - <a href="http://www.communote.com/">http://www.communote.com/</a>
*/
public class ApplicationSingleElementCacheKey im... |
C# | UTF-8 | 1,887 | 2.59375 | 3 | [] | no_license | using RealPage.Properties.Domain.Entity;
using RealPage.Properties.Domain.Interface;
using RealPage.Properties.Infrastructure.Interface;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace RealPage.Properties.Domain.Core
{
public class UsersDomain : IUsersDomain
{
p... |
Markdown | UTF-8 | 2,981 | 3.34375 | 3 | [] | no_license | ## Week Three - Module 4 Recap
Fork this respository. Answer the questions to the best of your ability. Try to answer them with limited amount of external research. These questions cover the majority of what we've learned this week.
Note: When you're done, submit a PR.
1. At a high level, what is Node?
- Node is a ... |
Markdown | UTF-8 | 922 | 3.390625 | 3 | [] | no_license | # 1217
有 n 个筹码。第 i 个筹码的位置是 position[i] 。
我们需要把所有筹码移到同一个位置。在一步中,我们可以将第 i 个筹码的位置从 position[i] 改变为:
position[i] + 2 或 position[i] - 2 ,此时 cost = 0
position[i] + 1 或 position[i] - 1 ,此时 cost = 1
返回将所有筹码移动到同一位置上所需要的 最小代价 。
示例 1:
输入:position = [1,2,3]
输出:1
解释:第一步:将位置3的筹码移动到位置1,成本为0。
第二步:将位置2的筹码移动到位置1,成本= 1。
总成本是1。
示例 ... |
Python | UTF-8 | 37,187 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | # Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
Java | UTF-8 | 1,608 | 1.914063 | 2 | [] | no_license | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.05.30 at 11:14... |
Markdown | UTF-8 | 14,213 | 2.625 | 3 | [] | no_license | # MM_GMCP_Mapper_GMCP
*Author: Ruthgul*<br />
*Original plugin by [Nick Gammon](http://www.gammon.com.au/forum/?id=10667)*
### A visual mini-map for towns and dungeons
---
#### Features:
* A visual map of towns, cities, and dungeons with a complete database of all Alyria and its planes.
* GMCP-driven auto-ma... |
JavaScript | UTF-8 | 2,038 | 2.609375 | 3 | [] | no_license | /*
*
* 李文爽 2017/06/01
* 基于layer_mobile.js
* 功能:封装了一些layer-mobile 的功能
*
*/
//关闭所有
function l_closeAll () {
layer.closeAll();
}
//提示信息 参数 (1内容,2时间 整数秒)
function l_msg (txt,t){
var arg=arguments;
if(arg.length>3){
console.error('l_msg()参数过多,最多3位');
return;
}else if(arg.length==0){
console.e... |
Ruby | UTF-8 | 386 | 2.546875 | 3 | [] | no_license | module TodoManager
module Commands
class Complete < TodoManager::Commands::Base
def run!
todo = find(index)
if todo
todo.complete!
database.dump(todos)
puts "Completed #{index + 1}."
else
raise TodoManager::Errors::ModelNotFound, "No model f... |
Java | UTF-8 | 1,004 | 2.546875 | 3 | [] | no_license | package ifmo.lab1;
import ifmo.lab3.exception.CountriesServiceFault;
import ifmo.lab3.exception.IllegalArgumentException;
import ifmo.lab3.exception.NotFoundException;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService(serviceName = "CountriesService")
public class Countries... |
C# | UTF-8 | 1,952 | 3.375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace libetruga
{
/// <summary>
/// Clase tortuga hereda de la clase corredor
/// </summary>
class Tortuga:Corredor
{
/// <summary>
/// Se obtiene e... |
JavaScript | UTF-8 | 85 | 2.84375 | 3 | [] | no_license | let bool1 = 1;
let bool2 = 2;
let bool3 = '';
console.log(bool1 || bool2 || bool3); |
Java | UTF-8 | 441 | 1.960938 | 2 | [] | no_license | package com.epam.olukash.manager;
import java.util.List;
import java.util.Set;
import com.epam.olukash.dto.Booking;
import com.epam.olukash.dto.Seat;
import com.epam.olukash.dto.Ticket;
/**
* @author Oleksii_Lukash
*/
public interface TicketManager extends BeanManager<Ticket>
{
List<Ticket> findByCinemaSessionID(... |
Java | UTF-8 | 138 | 2.375 | 2 | [] | no_license | package project.polimorfism;
public class Cat extends Pet {
void sleep(){
System.out.println("Cat is Sleeping");
}
}
|
Java | UTF-8 | 252 | 1.78125 | 2 | [] | no_license | package gitTest;
public class TestGit {
public static void main(String[] args) {
System.out.println("sb");
System.out.println("吴浩鹏");
System.out.println("吴浩鹏");
System.out.println("是王雨松爸爸");
}
}
|
Markdown | UTF-8 | 361 | 2.5625 | 3 | [] | no_license | # simple-coin-detection
This is an implementation of coin detection and counting on Python 3 and OpenCV.
In addition to detecting the number of coins, the code also identifies and draws its borders and the center of each one.
The results are as follows:

)
s = input()
k = int(input())
replace = s[k - 1]
for i in range(n):
if s[i] == replace:
print(s[i],end="")
else:
print("*",end="")
print() |
Markdown | UTF-8 | 2,822 | 3 | 3 | [] | no_license | # What is this?
Hides and extracts arbitrary payloads in PNG images without adding any additional data to the image by using **L**east **S**ignificant **B**it (LSB) steganography.
Steganography is the practice of hiding information within plain sight via another piece of information so that the existence of a secret ... |
Java | UTF-8 | 5,380 | 2.03125 | 2 | [] | no_license | package cn.v6.sixrooms.room.adapter;
import android.content.Context;
import android.net.Uri;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import cn.v6.sixrooms.R;
import cn.v6.sixrooms.room.bean.OnHeadlineBe... |
Markdown | UTF-8 | 5,157 | 3.234375 | 3 | [] | no_license | ## 常规的图像主要包括:Bitmap(位图)、Ectorgraph(矢量图)
- Bitmap(位点图): 简单的说就是由很多像素点组成的图像,当放大位图时,可以看见很多像素方块,也就是马赛克形状。
- (EctorGraph)矢量图: 是用线段或曲线的特性来描述图像,可以将它缩放到任意大小和任意分辨率在输出设备打印出来,都不会影响清晰度。
- (graysacle value)灰度值: 一般来说,我们通过成像设备得到的图像都是位图,而灰度值是组成位图的像素点的特性,不同制式的图片可能会有不同的灰度值范围。灰度值梯度越高,显示的图像效果越细腻。
- 值得注意的是,成像设备拍摄的图... |
Markdown | UTF-8 | 26,169 | 2.609375 | 3 | [] | no_license | # Projeto - Entrega Final
Link para o vídeo de apresentação: https://drive.google.com/file/d/1xflGr16gFOXJ_c8EqaECpAKUpvsCMGvj/view?usp=sharing
## 1. Grupo
- Guilherme Locca Salomão - 758569
## 2. Especificações
Para este projeto, foram requisitadas as seguintes etapas:
- Criação do repositório remoto no github
-... |
C# | UTF-8 | 2,320 | 2.65625 | 3 | [
"Unlicense"
] | permissive | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyInitializer : MonoBehaviour
{
public GameObject greenSlime; // the game object of green slime
public List<Vector3Int> greenSlimeLocations; // the array of vector 3s corosponding with the positions to spawn in gree... |
Java | UTF-8 | 828 | 2.0625 | 2 | [] | no_license | package tickets.client;
import java.util.List;
import tickets.common.DestinationCard;
import tickets.common.Lobby;
import tickets.common.Route;
import tickets.common.TrainCardWrapper;
import tickets.common.UserData;
public interface ITaskManager {
void register(UserData userData);
void login(UserData userD... |
Python | UTF-8 | 814 | 3.125 | 3 | [] | no_license | __author__ = 'Lonja'
import socket
import sys
import time
HOST, PORT = "localhost", 9999
data = " ".join(sys.argv[1:])
# Create a socket (SOCK_STREAM means a TCP socket)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
sock.connect((HOST, PORT))
except:
pass
print("could not connect to socket... |
Python | UTF-8 | 1,297 | 2.53125 | 3 | [] | no_license | import discord
from discord.ext import commands
import os
import random
import common
class Overwatch(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command()
async def owlootboxfarm(self, ctx):
await ctx.send('<@' + str(ctx.message.author.id) + '> Have that itc... |
Python | UTF-8 | 1,456 | 3.5625 | 4 | [] | no_license | from typing import List
class Solution:
def __init__(self):
self.nums1 = None
self.nums2 = None
def findKthOfTwo(self, l1: int, l2: int, k: int) -> int:
nums1 = self.nums1
nums2 = self.nums2
n = len(nums1)
m = len(nums2)
# nums1 is empty
if l1 =... |
Java | UTF-8 | 837 | 2.796875 | 3 | [] | no_license | package com.cl.test;
public class Knapsack{
public static void main(String[] args) {
int[]w={1,4,3};
int[]val={1500,3000,2000};
int m=4;
int n=val.length;
int[][] v=new int[n+1][m+1];
int path[][]=new int[n+1][m+1];
for(int i=1;i<v.length;i++... |
Python | UTF-8 | 1,286 | 3.359375 | 3 | [] | no_license | class Solution:
# @param board, a list of lists of 1 length string
# @param word, a string
# @return a boolean
def exist(self, board, word):
m = len(board)
n = len(board[0])
current = [[ False for i in range(n)] for j in range(m) ]
board = [ [x for x in item] for item in... |
Python | UTF-8 | 2,670 | 3.875 | 4 | [
"MIT"
] | permissive | # Practice Activity 2 for Principles of Computing class, by k., 07/07/2014
# simplified Nim (Monte Carlo solver) (see https://class.coursera.org/principlescomputing-001/wiki/view?page=nim_mc )
# template: http://www.codeskulptor.org/#poc_nim_mc_template.py
# official solution: http://www.codeskulptor.org/#poc_nim_mc_st... |
Java | UTF-8 | 908 | 1.90625 | 2 | [] | no_license | package com.fmcna.fhpckd.beans.staging;
/**
*
* @author vidhishanandhikonda
*
*/
public class MemberSplitMergeResponse {
private String type;
private Long fhpId;
private boolean success;
private String failureCode;
private String failureReason;
public String getType() {
return type;
}
public void se... |
Java | UTF-8 | 2,019 | 2.125 | 2 | [
"Apache-2.0"
] | permissive | package com.example.wealther.app.service;
import com.example.wealther.app.receiver.AutoUpdateReceiver;
import com.example.wealther.app.util.HttpCallbackListener;
import com.example.wealther.app.util.HttpUtil;
import com.example.wealther.app.util.Utility;
import android.app.AlarmManager;
import android.app.PendingInte... |
Java | UTF-8 | 1,147 | 3.21875 | 3 | [] | no_license | class Solution {
private class Node {
String word;
Node[] succ;
Node() {
succ = new Node[26];
}
Node getSuccNode(char ch) {
return succ[ch - 'a'];
}
Node getOrCreateNode(char ch) {
if (getSuccNode(ch) == null) succ[ch - 'a'] = new Node();
return getSuccNode(ch);
}
}
public List<String> f... |
Java | UTF-8 | 433 | 2.34375 | 2 | [
"Apache-2.0"
] | permissive | package team.lj.Tetris;
public class I extends Tetromino {
/**
* �ṩ�����������г�ʼ��
* T�͵��ĸ��λ��
* */
public I() {
cells[0]=new Cell(0,4,Tetris.I);
cells[1]=new Cell(0,3,Tetris.I);
cells[2]=new Cell(0,5,Tetris.I);
cells[3]=new Cell(0,6,Tetris.I);
states = new State[] {
new State(0, 0, 0, -1,... |
PHP | UTF-8 | 3,497 | 2.953125 | 3 | [] | no_license | <?php declare(strict_types = 1);
/**
* PHP version 7.4
*
* @category PHP
* @package Madsoft\Library
* @author Gyula Madarasz <gyula.madarasz@gmail.com>
* @copyright 2020 Gyula Madarasz
* @license Copyright (c) All rights reserved.
* @link this
*/
namespace Madsoft\Library;
use RuntimeException;... |
Ruby | UTF-8 | 2,679 | 3.078125 | 3 | [] | no_license | require_relative 'questions_database'
require_relative 'user'
require_relative 'reply'
require_relative 'question_follow'
require_relative 'question_like'
class Question
attr_reader :id
attr_accessor :title, :body, :author_id
def self.all
data = QuestionsDatabase.instance.execute("SELECT * FROM qu... |
Python | UTF-8 | 2,358 | 2.875 | 3 | [] | no_license | __author__ = 'sdlee'
import urllib
import os
import filecmp
import re
import hashlib
import xml.etree.ElementTree as ET
def string_to_md5(string):
md5 = hashlib.md5(string)
return md5.hexdigest()
def print_site_title(rss_filename):
tree = ET.parse(rss_filename)
root = tree.getroot()
channel = r... |
Java | UTF-8 | 1,073 | 3.875 | 4 | [] | no_license | package com.colin.mode;
import java.util.Scanner;
public class Goods {
public Goods(Scanner input){
//构造方法,对每个需要存入的货物进行赋值,方法参数是Scanner input;
System.out.print("请输入商品的名称:");
this.name = input.next();
System.out.print("请输入商品的价格:");
this.price = input.nextDouble();
... |
Markdown | UTF-8 | 2,473 | 2.71875 | 3 | [] | no_license | # Zabracadabra
capstone project
# Team name:
Zabracadabra
# Team members:
- **Yurui Mu**: Yurui received her B.S. degree in Applied Mathematics and Statistics at SUNY Stony Brook. And she is now a second year full-time graduate student at NYU Center for Data Science. She has ... |
Python | UTF-8 | 1,714 | 3.390625 | 3 | [] | no_license | import numpy as np
"""Checks to see if tree is valid."""
def check_tree(edges):
if not len(edges) or edges.min() != 0 or edges.max() != len(edges):
return False
seen = set()
for edge in edges:
if edge[0] in seen and edge[1] in seen:
return False
else:
seen.add(edge[0])
seen.add(edge[1])
return True
... |
C | UTF-8 | 2,876 | 2.921875 | 3 | [] | no_license | /*
** main.c for in /home/gomes_m//svn/google/arthrose-sensiblement-matricielle
**
** Made by mickael gomes
** Login <gomes_m@epitech.net>
**
** Started on Tue Mar 26 20:34:12 2013 mickael gomes
** Last update Thu Mar 28 22:06:17 2013 mickael gomes
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>... |
Markdown | UTF-8 | 2,991 | 3.375 | 3 | [
"Apache-2.0"
] | permissive |
The plan for this report was to analyze the various ways big data is used in the sports betting industry both by bookmakers to determine the odds and by gamblers to gain a competitive edge while betting. It was started by examining the way big data is used by the bookmakers. Many of the algorithms and methods bookmake... |
Markdown | UTF-8 | 1,295 | 2.765625 | 3 | [] | no_license | # Laravel Dusk Demo
This is a demo project for the Alpha version of [Laravel Dusk](https://github.com/laravel/dusk). It basically tests the register and login functionality from the default application scaffold from Laravel running `php artisan make:auth` using Dusk.
You can find the tests in the `tests/Browser` dire... |
JavaScript | UTF-8 | 887 | 3.71875 | 4 | [] | no_license | var A=[];
A.push([1]);
// A.push([4,5,6]);
// A.push([7,8,9]);
function spiral(A){
var a=[];
var row=A.length;
var col=A[0].length;
var dir=0;
var t=0;
var b=row-1;
var l=0;
var r= col-1;
while(t<=b&&l<=r){
if(dir===0){
for(var i=l;i<=r;i++){
a.pus... |
C | UTF-8 | 1,628 | 2.53125 | 3 | [] | no_license | //
// UART0_BLE_TEST_LCD : BLE Device Test Command with LCD
//
// EVB : NuMaker Uni
// MCU : NANO100NE3BN
// BLE : ITON_DM BT2710
// UART0 to Bluetooth module
// PB0/UART0-RX to BT2710's TX
// PB1/UART0-TX to BT2710's RX
// JP2 connections (I2C0 to LCD)
// PA9/I2C0-SCL to LCD's SCL
// PA8/I2C0-SDA to LCD's SDA
#incl... |
C++ | UTF-8 | 1,455 | 3 | 3 | [
"MIT"
] | permissive | #pragma once
#include <string>
#include <vector>
#include "BasicTile.h"
#include "Tile.h"
namespace sim {
class Maze {
public:
Maze();
int getWidth() const;
int getHeight() const;
bool withinMaze(int x, int y) const;
Tile* getTile(int x, int y);
const Tile* getTile(int x, int y) const;
... |
C# | UTF-8 | 1,962 | 2.8125 | 3 | [
"MIT"
] | permissive | using System.Collections;
using System.Collections.Generic;
namespace EuclideanGeometryLib.Collections.Finite.Natural
{
public sealed class NfcChainedEnumerator<T> : IEnumerator<T>
{
private readonly NfcChained<T> _chain;
private int _currentCollectionIndex;
private FiniteCollection<T... |
Java | UTF-8 | 907 | 2.359375 | 2 | [] | no_license | package com.music.wiraazharan.dcprojects.toptracks;
/**
* Created by wiraazharan on 7/17/15.
*/
public class DataTracker {
String trackname;
String trackplaycount;
String artistname;
public DataTracker(String name , String playcount ,String artist)
{
this.trackname = name;
this... |
Swift | UTF-8 | 6,933 | 2.859375 | 3 | [] | no_license | //
// HypeEventDetailView.swift
// HypedList
//
// Created by Natalia Stele on 11/04/2021.
//
import SwiftUI
struct HypeEventDetailView: View {
@Environment(\.horizontalSizeClass) var horizontalSizeClass
@ObservedObject var hypeEvent: HypedEvent
@State var showingCreatingView = false
@State var d... |
C | UTF-8 | 7,404 | 3.109375 | 3 | [] | no_license | #pragma once
#include "database.h"
#include "test_runner.h"
#include "condition_parser.h"
void TestDatabase() {
istringstream empty_is("");
auto empty_condition = ParseCondition(empty_is);
auto empty_predicate = [empty_condition](const Date& date, const string& event) {
return empty_condition->Eval... |
PHP | UTF-8 | 6,088 | 2.765625 | 3 | [] | no_license | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace ... |
Java | UTF-8 | 2,116 | 2.21875 | 2 | [] | no_license | package com.example.xiezilailai.headfootrecyclerview;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import java.util.List;
/**
* Created by 19459 on 2016/9/21.
... |
C | UTF-8 | 3,711 | 2.703125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | #include "debug.h"
#include "dictionary.h"
#include "hex_utils.h"
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define CHUNK_SIZE_BUFFER_SIZE 10
int readLine(int fd, char *buffer, int maxLen);
int read_body(int in, dictionaryType *headers, unsigned char **body_data,
int m... |
Python | UTF-8 | 276 | 3.203125 | 3 | [] | no_license | import pdb
class simple_class:
def __init__(self):
self.astr = []
def get_str(self):
self.astr = input("type again: ")
def print_str(self):
print(self.astr)
if __name__ == '__main__':
blah = simple_class()
blah.get_str()
blah.print_str()
pdb.set_trace()
|
Java | UTF-8 | 4,648 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | package org.rcl.theor.chord;
import java.util.ArrayList;
import java.util.regex.Matcher;
import org.rcl.theor.TheorException;
import org.rcl.theor.interval.Interval;
/**
* A ChordTemplate is a way of making chords from a template. Template tokens are text ways of representing chords relative
* to a toni... |
Java | UTF-8 | 1,739 | 3.5625 | 4 | [] | no_license | package ie.gmit.sw;
import java.io.*;
import java.util.concurrent.BlockingQueue;
/**
* Each thread reads a separate file line by line, strips out punctuation, divides separate words
* takes each word and puts it into a queue of words
*/
public class FileParser implements Runnable {
private File file;
priv... |
Java | UTF-8 | 3,668 | 2.171875 | 2 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | /*
* 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 org.thespheres.betula.services.implementation.ui.impl;
import java.awt.Color;
import java.awt.Font;
import javax.swing.Default... |
Java | UTF-8 | 2,402 | 2.0625 | 2 | [] | no_license | package com.example.dheoclaveria.projectos;
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.wi... |
Markdown | UTF-8 | 1,297 | 2.5625 | 3 | [] | no_license | # Отчёт о тестировании приложения "Precision"
## Краткое описание
22.02.2020 было проведено тестирование Precision.
На тестирование затрачено: ~ 1 часа.
В результате тестирования выявлен следующий дефект - [Итоговое значение в выводе программы - неверное](https://github.com/viktoria-sap/Precision/issues/1)
## Описа... |
Java | UTF-8 | 1,129 | 1.960938 | 2 | [] | no_license | package tn.test;
//copied from GameMethod
import tn.Demand;
import tn.TrafficNetwork;
public class TrialError {
private TrafficNetwork trafficNetwork;//<R>instance of the traffic network class
private Demand demand;//<R>link demands on each link
/* Public void run(){
for (int i=1; i<=numLinks; i++) {
failu... |
Java | UTF-8 | 371 | 3.546875 | 4 | [] | no_license | /**
* EX6_1
*/
public class EX6_1 {
public static void main(String[] args) {
for (int i = 1; i <= 100; i++) {
System.out.printf("%7d", getPentagonalNumber(i));
if (i % 10 == 0)
System.out.println();
}
}
public static int getPentagonalNumber(int num... |
Java | UTF-8 | 3,114 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | package com.twu.biblioteca;
import com.twu.biblioteca.MenuOptions.*;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
class Console {
private final ConsolePrinter consolePrinter;
private ConsoleReader consoleReader;
private ConsoleHelper consoleHelper;
private UserVal... |
Markdown | UTF-8 | 4,459 | 2.640625 | 3 | [] | no_license | ## 简介
> IOS10中已经自带了homekit程序。现在由于支持该框架的硬件设备有限,所以homekit应用还是比较少的。
- HomeKit库是用来沟通和控制家庭自动化配件的,这些家庭自动化配件都支持苹果的HomeKit Accessory Protocol。
- HomeKit应用程序可让用户发现兼容配件并配置它们。用户可以创建一些action来控制智能配件(例如恒温或者光线强弱),对其进行分组,并且可以通过Siri触发。
- HomeKit 对象被存储在用户iOS设备的数据库中,并且通过iCloud还可以同步到其他iOS设备。
- HomeKit支持远程访问智能配件,并支持多个用户设备和多个用户。HomeKit 还对用... |
Java | UTF-8 | 13,232 | 2.15625 | 2 | [] | no_license | package org.team3132.rkouchoo.main;
import javax.swing.JFrame;
import java.awt.List;
import javax.swing.JTextField;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import com.google.gson.Gson;
import com.goog... |
C | UTF-8 | 704 | 3.328125 | 3 | [] | no_license | #define N 3
int main() {
int arrayIn[N][N];
for (int i = 0; i < N; i++) {//перебираємо елементи масиву
for (int j = 0;j < N; j++) {
arrayIn[i][j] = i * N + j;
}
}
for (int i = 0; i < N; i++) {//за допомгою додаткової змінної k перебираємо строки заданої матриці
int k = arrayIn[i][0];
for (int j = 0; j < ... |
Markdown | UTF-8 | 578 | 2.515625 | 3 | [] | no_license | # Mutual Aid Questions Form
A very simple form to submit best effort anonymous questions on mutual aid and security.
This is deployed automatically via Netlify to [https://mutual-aid-questions.netlify.com/](https://mutual-aid-questions.netlify.com/)
## Development
This is raw HTML, but uses [Bulma](https://bulma.io... |
Markdown | UTF-8 | 1,522 | 2.953125 | 3 | [] | no_license | # Social-Web
A twitter analysis report
Nikolas Ioannou
Paris Sfikouris
Arsh Sadana
Omer
Osman
Extracted from project Report
"""
...
Explanation of the code
Our code for the project is Python object-oriented. We have
two classes each of them responsible for distinct uses. In
the first class, TwitterClient is responsi... |
C# | UTF-8 | 806 | 3.453125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
namespace Teamers
{
public static class Worker
{
public static List<string> getList(string prefix, int count)
{
List<string> list = new List<string> {
"ONE",
"TWO",
"THREE",
... |
C | UTF-8 | 3,409 | 2.578125 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* coreio.c :+: :+: :+: ... |
Java | UTF-8 | 2,343 | 2.828125 | 3 | [] | no_license | package com.jb.cs.model;
import java.time.LocalDate;
public class Coupon {
//Fileds
//Default argument for filed
public static final int NO_ID = -1;
private long id = NO_ID;
private String title;
private LocalDate startDate;
private LocalDate endDate;
private int amount;
private int category;
private S... |
C# | UTF-8 | 7,223 | 2.765625 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Quantum_Gate.Game_Objects
{
class RoomBuilder //TODO: This is set to no build action, delete once Quantum Gate 1 initializer is working
{
private List<String> imageList = new L... |
Java | UTF-8 | 2,011 | 2.265625 | 2 | [] | no_license | package project.modules.Airplane.View.ActionListener;
import project.modules.Application.Entity.ConfigurationEntity;
import project.modules.Application.View.ActionListener.AbstractActionListener;
import project.modules.Airplane.View.AirplaneRegisterRasterizeView;
import java.awt.event.ActionEvent;
import java.awt.Comp... |
Markdown | UTF-8 | 669 | 3.671875 | 4 | [] | no_license | # Randomly Group people
The implemented code takes in the names of people to group in comma seperated format and also number of people per group and then group them randomly based on the entered parameters
Example Code:
Please enter the names you want to group together in comma seperated format
Ti... |
C# | UTF-8 | 8,551 | 2.890625 | 3 | [
"BSD-2-Clause"
] | permissive | #region Copyright
/*Copyright (c) 2015, Katascope
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and th... |
Python | UTF-8 | 1,678 | 3.25 | 3 | [] | no_license | '''
中国票房网数据:
url = http://www.cbooo.cn/
'''
import pandas as pd
import requests
from bs4 import BeautifulSoup
url = 'http://www.cbooo.cn/year?year=2018'
datas = requests.get(url).text
# print(datas)
soup = BeautifulSoup(datas,'lxml')
movies_table = soup.find_all('table',{'id':'tbContent'})[0]
# print(movies_table)
... |
Shell | UTF-8 | 1,072 | 3.953125 | 4 | [] | no_license | #!/bin/bash
main_menu() {
echo -e "Main menu\n"
echo -e "1. Browse ERRORS"
echo -e "2. Browse WARNINGS"
echo -e "3. EXIT"
}
handle_main_menu() {
case $choice in
[1])
attention="ERROR"
;;
[2])
attention="WARNING"
;;
*)
exit 0
;... |
Java | UTF-8 | 1,647 | 2.5 | 2 | [] | no_license | /**
*
*/
package com.esb.network.client;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
/**
* @author GongY... |
PHP | UTF-8 | 426 | 3.09375 | 3 | [] | no_license | <?php
namespace Casts;
class Datetime implements Cast
{
public static function cast($value, $args=[]) {
if (!isset($value)) return $value;
$args['format'] = array_key_exists('format', $args) ? $args['format'] : "Y-m-d H:i:s";
$value = str_replace("/", "-", $value);
$value = date_create(date('Y-m-d', strtoti... |
Java | UTF-8 | 4,297 | 2 | 2 | [] | no_license | package com.buffalocart.pages;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import com.buffalocart.utilities.Pag... |
TypeScript | UTF-8 | 618 | 2.890625 | 3 | [] | no_license | module TextRight {
enum NodeType {
Heading,
Style,
Quote,
Text,
UnorderedList,
OrderedList,
Html,
}
/**
* Represents a chunk of the document that has been parsed into a single block
*/
class Node {
public type: NodeType;
constructor(type: NodeType) {... |
TypeScript | UTF-8 | 707 | 2.609375 | 3 | [] | no_license | import { RequiredFieldValidation } from './required-field-validation'
import { MissingParamError } from '../../presentation/errors'
const makeSut = (): RequiredFieldValidation => {
return new RequiredFieldValidation('field')
}
describe('RequiredField Validation', () => {
test('Should return a MissinParamError if ... |
Markdown | UTF-8 | 3,589 | 3.28125 | 3 | [
"MIT"
] | permissive | # @cdxoo/mongodb-restore
Simple module to restore MongoDB dumps from BSON files.
## Installation
npm install --save @cdxoo/mongodb-restore
## Usage
```javascript
const restore = require('@cdxoo/mongodb-restore'),
uri = 'mongodb://127.0.0.1:27001/';
// restore multi-database dump
await restore.dump({... |
JavaScript | UTF-8 | 946 | 3.734375 | 4 | [] | no_license | /**
* 给定一个长度为 n+1 的数组nums,数组中所有的数均在 1∼n 的范围内,其中 n≥1。
请找出数组中任意一个重复的数,但不能修改输入的数组。
样例
给定 nums = [2, 3, 5, 4, 3, 2, 6, 7]。
返回 2 或 3。
思考题:如果只能使用 O(1) 的额外空间,该怎么做呢?
*
*/
/**
* @param {number[]} nums
* @return {number}
*/
var duplicateInArray = function(nums) {
let n = nums.length;
let ... |
C++ | UTF-8 | 865 | 2.625 | 3 | [] | no_license | #ifndef _TPOINT_H
#define _TPOINT_H
#include "tnumeric.h"
TGEOMETRY_BEGIN
class TVector2d;
class TPoint
{
public:
TPoint();
~TPoint();
TPoint(const TPoint& point);
TPoint(treal x, treal y);
TPoint(const TVector2d& v);
TPoint& operator=(const TPoint& pt);
bool isNull();
treal& rx();
... |
C# | UTF-8 | 562 | 2.859375 | 3 | [] | no_license | private void Loopy(int times)
{
if (this.InvokeRequired)
{
this.Invoke((MethodInvoker)delegate
{
Loopy(times);
});
}
else
{
... |
JavaScript | UTF-8 | 522 | 3.140625 | 3 | [] | no_license | function allCaps() {
var x = document.getElementById("form1");
var input = x.elements["name"].value.split('');
var output = [];
for (var i = 0; i < input.length; i++) {
var letter = input[i].toLowerCase();
if (!(letter === 'y' ||
letter === 'i' ||
letter === 'o' ||
letter ===... |
Markdown | UTF-8 | 1,209 | 2.5625 | 3 | [
"MIT"
] | permissive | ---
topic: "MongoDB"
desc: "A particular NoSQL database platform"
category_prefix : "MongoDB: "
---
* [MongoDB Javadoc](http://mongodb.github.io/mongo-java-driver/3.6/javadoc/)
MongoDB is a particular implementation of a technology known as NoSQL databases.
The basic idea is that you can store JSON objects in the cl... |
Markdown | UTF-8 | 8,891 | 2.765625 | 3 | [
"MIT"
] | permissive | # Cirgonus
Cirgonus is a go-related pun on [Circonus](http://circonus.com) and is a
metrics collector for it (and anything else that can deal with json output). It
also comes with `cstat`, a platform-independent `iostat` alike for gathering
cirgonus metrics from many hosts.
Most of the built-in collectors are linux-o... |
TypeScript | UTF-8 | 25,026 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | import {
ArrayTypeName,
Assignment,
ASTContext,
ASTNode,
BinaryOperation,
Block,
Break,
Conditional,
Continue,
ContractDefinition,
DoWhileStatement,
ElementaryTypeName,
ElementaryTypeNameExpression,
EmitStatement,
EnumDefinition,
EnumValue,
ErrorDefini... |
Python | UTF-8 | 2,921 | 3.046875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 8 13:00:20 2019
@author: msr
"""
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
def read_files(files, columns):
df_dict = {}
for i, file in enumerate(files):
df = pd.read_csv(fil... |
C++ | UTF-8 | 2,496 | 2.734375 | 3 | [] | no_license | //
// Created by nim on 14.09.2021.
//
#include "../../../test_config.h"
#include <common/helpers/string_helper.h>
#include <codecvt>
#include <crypto/data/providers/crypto_provider_imp.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
CryptoProvider *crypto_provider{nullptr};
class CryptoProviderImpTest : public... |
Python | UTF-8 | 372 | 2.765625 | 3 | [] | no_license | n,m=map(int,input().split())
o=[]
for i in range(m):
o.append(list(map(int,input().split())))
cost=10000000
f=0
for i in range(m):#loopstarts
if o[i][0]==1:
s=o[i][1]
c=o[i][2]
for j in range(i+1,m):
if o[j][0]==s:
s=o[j][1]
c+=o[j][2]
if c<cost and s==n:
cost=c
f+=... |
Python | UTF-8 | 468 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | import ipaddress
import socket
def resolve_to_ips(hostname, port=80):
try:
address_tuples = socket.getaddrinfo(hostname, port)
except socket.gaierror:
raise CannotResolveHost(hostname)
return [extract_ip(addr_info) for addr_info in address_tuples]
INDEX_SOCKADDR = 4
INDEX_ADDRESS = 0
... |
Java | UTF-8 | 1,139 | 3 | 3 | [
"MIT"
] | permissive | import java.io.*;
import java.util.*;
public class FileDump {
public static String readFASTA(String fileName) {
String seq = "";
try {
BufferedReader reader = new BufferedReader(new FileReader(new File(fileName)));
String text = null;
/* Dump the first... |
Java | UTF-8 | 5,239 | 1.710938 | 2 | [] | no_license | package com.sos.joc.joe.impl;
import java.time.Instant;
import java.util.Date;
import javax.ws.rs.Path;
import com.sos.auth.rest.permission.model.SOSPermissionJocCockpit;
import com.sos.hibernate.classes.SOSHibernateSession;
import com.sos.jitl.joe.DBItemJoeObject;
import com.sos.jobscheduler.model.event.CustomEvent... |
C++ | UTF-8 | 5,029 | 3.203125 | 3 | [] | no_license | #include<iostream>
#include<queue>
using namespace std;
/**************
GRAPH STRUCT
*************
*/
//Graph using adjency matrix
#define MAXV 1000
//Node Struct
typedef struct edgenode_str{
int y;
int weight;
struct edgenode_str *next;
}edgenode;
typedef struct graph_str{
edgenode *edges[MAXV+1]; /*adj... |
Python | UTF-8 | 2,728 | 3.03125 | 3 | [] | no_license | import datetime
from logger.util import date_to_str
# Category node that contains log entries.
class Tag:
def __init__(self, id, name, entries):
self.id = id
self.name = name
self.modified_at = datetime.datetime(year=1970, month=1, day=1)
self.entries = entries
self.children = []
self.parent ... |
Shell | UTF-8 | 162 | 2.8125 | 3 | [] | no_license | #!/usr/bin/env bash
for version in 2.7.15 3.6.8; do
echo "Running tests for python version: $version"
pyenv local $version
./scripts/build.sh;
done;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.