language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Python | UTF-8 | 1,350 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env python3
import re
from pathlib import Path
def main():
print(f"Building anchors...")
for filename in Path("hurl.dev", "_site").glob("**/*.html"):
print(f"Processing {filename}...")
file = Path(filename)
text = file.read_text()
text_anchored = add_anchors(text)
... |
C# | UTF-8 | 1,476 | 2.65625 | 3 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using BTApplication.Models;
using Xamarin.Forms;
using System.Collections.ObjectModel;
using System.Linq;
namespace BTApplication
{
public partial class ChatPage : ContentPage
{
private IBluetoothManager _bluetoothManager;
private User _user;
public Observ... |
Java | UTF-8 | 6,328 | 3.203125 | 3 | [] | no_license | package com.dell.week4.service;
import com.dell.week4.model.Enemy;
import com.dell.week4.model.Player;
import com.dell.week4.model.Skill;
import com.dell.week4.util.InputCheck;
import com.dell.week4.util.ScannerUtil;
import com.dell.week4.util.SlowPrint;
import com.dell.week4.view.Play;
import java.util.List;
publ... |
Python | UTF-8 | 3,114 | 3.09375 | 3 | [] | no_license |
class file_processor:
def __init__ (self, filePath, docID, outFile):
self.pos_inverted_index = {}
self.docID = docID
self.filePath = filePath
self.title = ''
self.body = ''
self.filePath = filePath
self.outFile = outFile
def split_body_title (self):
import io
res_str = ''
with open(self.filePat... |
Java | UTF-8 | 2,956 | 2.203125 | 2 | [
"BSD-3-Clause"
] | permissive | package tudresden.ocl20.pivot.language.ocl.resource.ocl;
public class OclReferenceResolveHelperProvider {
private static IOclReferenceResolveHelper oclReferenceResolveHelper;
static {
if (org.eclipse.core.runtime.Platform.isRunning() && false) {
// find default load option providers
org.eclipse.co... |
PHP | UTF-8 | 966 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Holokron\JsonPatch\Definition;
/**
* @author Michał Tęczyński <michal.teczynski@gmail.com>
*/
class CompiledDefinition
{
/**
* @var string
*/
private $op;
/**
* @var string
*/
private $regex;
/**
* @var callable
*/
pri... |
Markdown | UTF-8 | 12,541 | 2.984375 | 3 | [] | no_license | +++
title = "ESL-8.7 自助聚合(Bagging)"
summary = """
统计学习基础(译注)第八章第七节,第 282-288 页。
自助聚合通过对自助样本上的预测取平均,
保持偏差的同时降低了方差,从而改善了模型。
自助聚合需要自助抽样彼此之间相对独立。
"""
date = 2018-12-24T16:58:00+08:00
lastmod = 2018-12-24T16:58:00+08:00
draft = false
math = true
authors = ["Butters"]
tags = ["译文"]
categories = ["统计学习基础(译注)"]
[header]
ima... |
Java | UTF-8 | 1,585 | 2.375 | 2 | [] | no_license | import com.entity.User;
import com.repository.UserRepository;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.sprin... |
PHP | UTF-8 | 3,048 | 3.453125 | 3 | [] | no_license | <?php
class Cat
{
/*-----------------------------------------------------
Attributs :
-----------------------------------------------------*/
private $id_cat;
private $name_cat;
/*-----------------------------------------------------
... |
Java | UTF-8 | 356 | 3.140625 | 3 | [] | no_license | import java.util.Scanner;
public class Exercise6{
public static void main(String[]args){
//24.0C = 75.2F
double Celsius;
Scanner reader = new Scanner (System.in);
Celsius = reader.nextDouble();
//F=C*9/5+32
System.out.printf("%.1f C = %.1f F",Celsius,Celsius*9/5+32);
}
}
... |
Rust | UTF-8 | 1,089 | 2.734375 | 3 | [
"MIT"
] | permissive | use common::util::*;
#[test]
fn test_stdin_default() {
new_ucmd!()
.pipe_in("100\n200\n300\n400\n500")
.run()
.stdout_is("500400\n300\n200\n100\n");
}
#[test]
fn test_stdin_non_newline_separator() {
new_ucmd!()
.args(&["-s", ":"])
.pipe_in("100:200:300:400:500")
... |
Java | UTF-8 | 1,447 | 2.140625 | 2 | [] | no_license | package com.xionglian.service.impl;
import com.github.pagehelper.PageHelper;
import com.xionglian.mapper.ThanksLetterMapper;
import com.xionglian.model.ThanksLetter;
import com.xionglian.model.User;
import com.xionglian.service.ThanksLetterService;
import org.springframework.beans.factory.annotation.Autowired;
import... |
Java | UTF-8 | 3,512 | 2.078125 | 2 | [] | no_license | package com.cola.library.service.impl;
import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cola.library.entity.Role;
import com.cola.library.entity.RoleMenu;
import com.cola.library.entity.SysMenu;
import com.cola.library.ex... |
Java | UTF-8 | 4,516 | 2.703125 | 3 | [] | 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 model;
import java.util.*;
/**
*
* @author juan
*/
public class Produccion {
private HashSet empleadosP;
privat... |
Python | UTF-8 | 693 | 2.84375 | 3 | [] | no_license | from server.bo.NamedBusinessObject import NamedBusinessObject as nbo
class Module(nbo):
def __init__(self):
super().__init__()
self._edv_nr = ""
def set_edv_nr(self, value):
self._edv_nr = value
def get_edv_nr(self):
return self._edv_nr
@staticmethod
def from_di... |
Markdown | UTF-8 | 3,550 | 3.484375 | 3 | [] | no_license | # Technical challenge - Graphical Editor Simulator (ges)
Graphical editors allow users to edit images in the same way text editors let us modify documents. Images are represented as an M x N array of pixels with each pixel given colour.
Produce a program that simulates a simple interactive graphical editor.
**Input:... |
Java | UTF-8 | 2,128 | 3.09375 | 3 | [] | no_license | package d.io.object;
import java.io.*;
import static java.io.File.separator;
public class ManageObject {
public static void main(String[] args){
ManageObject manager = new ManageObject();
String fullPath = separator+"godofjava"+separator+"text"+separator+"serial.obj";
SerialDTO dto = new ... |
Shell | UTF-8 | 2,805 | 2.9375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | #!/usr/bin/env bash
set -e
: ${AZURE_ENVIRONMENT:?}
: ${AZURE_SUBSCRIPTION_ID:?}
: ${AZURE_TENANT_ID:?}
: ${AZURE_CLIENT_ID:?}
: ${AZURE_CLIENT_SECRET:?}
: ${SSH_PUBLIC_KEY:?}
: ${METADATA_FILE:=environment/metadata}
metadata=$(cat ${METADATA_FILE})
export BOSH_AZURE_ENVIRONMENT=${AZURE_ENVIRONMENT}
export BOSH_AZ... |
C | UTF-8 | 1,748 | 2.671875 | 3 | [] | no_license | /*
rng.c главный файл генератора случайных чисел
*/
#include "rng.h"
struct rc4state state;
uint8_t pool[POOLSIZE];
uint8_t pooli=0;
uint8_t poolBit=0;
volatile uint8_t poolFull=0;
volatile uint32_t bytesToSend=0;
#ifdef __AVR__
ISR(USART_RXC_vect){
bytesToSend=UDR;
if(bytesToSend==0)
bytesToSend=256;
}
ISR(... |
C | UTF-8 | 3,362 | 3.15625 | 3 | [] | no_license | #include <stdio.h> /* I/O functions: printf() ... */
#include <stdlib.h> /* rand(), srand() */
#include <unistd.h> /* read(), write() calls */
#include <assert.h> /* assert() */
#include <time.h> /* time() */
#include <signal.h> /* kill(), raise() and SIG???? */
#include <sys/types.h> /* pid */
#include <sys/wait.h>... |
C# | UTF-8 | 933 | 3.515625 | 4 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Problem_5
{
class Program
{
static void Main(string[] args)
{
int x;
do
{
Console.WriteLine("Type number > 0 or numb... |
Java | UTF-8 | 127 | 2.09375 | 2 | [] | no_license | package reusing_classes.ex18;
public class Final {
static final int staticFinalValue = 1;
final int finalValue = 2;
} |
Java | UTF-8 | 14,525 | 3.0625 | 3 | [] | no_license | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package equation;
import java.util.Scanner;
/**
*
* @author Hatim
*/
public class Equation {
/**
* @param args the command line arguments
*/
public Equation(String user)
{
this.user=us... |
Java | UTF-8 | 4,473 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distribut... |
Python | UTF-8 | 2,557 | 3.03125 | 3 | [] | no_license | import sqlite3
import getpass
import sys
import datetime
from datetime import date
def register(db_name):
success = False
conn = sqlite3.connect(db_name)
c = conn.cursor()
while not success:
uid = input('Please enter your user id: ')
c.execute('SELECT * FROM users u WHER... |
Java | UTF-8 | 1,370 | 2.234375 | 2 | [] | no_license | package dmacc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.spri... |
C# | UTF-8 | 1,053 | 2.65625 | 3 | [] | no_license | using Gol.Airplane.Dados.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
namespace Gol.Airplane.Testes
{
public class CriaUmAirplaneTest
{
private readonly AirplaneDbContext _context... |
Ruby | UTF-8 | 1,622 | 2.796875 | 3 | [
"MIT"
] | permissive | module TaxJp
module DepreciationRates
end
# 減価償却率
class DepreciationRate
DB_PATH = File.join(TaxJp::Utils.data_dir, '減価償却率.db')
attr_reader :valid_from, :valid_until
attr_reader :durable_years
attr_reader :fixed_amount_rate
attr_reader :rate, :revised_rate, :guaranteed_rate
def initia... |
Markdown | UTF-8 | 2,506 | 2.5625 | 3 | [] | no_license | # sxucs-lib
## This is the Student Union of School of Computer and Information Technology, Shanxi University.
## 前言
来到一所大学,从第一次接触许多课,直到一门一门完成,这个过程中我们时常收集起许多资料。
有些是前人细心雕琢出的大作业,放在个人的GitHub仓库中,可是由于影响力不够而渐渐被遗忘;有些是历年试卷或者 A4 纸,前人精心收集制作,抱着能对他人有用的想法公开,却需要在各个群或者私下中摸索以至于从学长手中代代相传;有些是上完一门课才恍然领悟的技巧,原来这门课重点如此,当初本可以更轻松地完成得更好……
... |
Python | UTF-8 | 1,071 | 3.140625 | 3 | [] | no_license | #!/usr/bin/env python3
from BaseClasses.Grid import *
import time
import sys
class LifeGame:
def incrementState(self):
time.sleep(self.sleepTime)
self.runTimes += 1
self.myGrid.getFutureGridState()
self.myGrid.printGrid()
@staticmethod
def _printOriginalGrid(originalGrid):... |
C++ | UTF-8 | 2,805 | 3.21875 | 3 | [] | no_license | #ifndef _IRELATION_HPP__
#define _IRELATION_HPP__
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
/** This is the IoTRelation implementation for C++
*
* @author Rahmadi Trimananda <rahmadi.trimananda @ uci.edu>
* @version 1.0
* @since 2016-09-06
*/
template <cla... |
Python | UTF-8 | 6,650 | 3 | 3 | [
"Apache-2.0"
] | permissive | from typing import Dict, List
import numpy
from overrides import overrides
from .instance import TextInstance, IndexedInstance
from ..data_indexer import DataIndexer
class BackgroundInstance(TextInstance):
"""
An Instance that has background knowledge associated with it. That background knowledge can
c... |
Markdown | UTF-8 | 3,430 | 2.671875 | 3 | [] | no_license |


{
self::$log_file = $log_file;
}
public static function record($message)
{
if (empty(self::$log_file)) {
self::$log_file = DAEMON_ROOT_PATH . Daemon::$process_name . '/'... |
Java | UTF-8 | 3,452 | 2.890625 | 3 | [] | no_license | package initiators;
import java.io.File;
import java.util.ArrayList;
import network.Message;
import peer.Chunk;
import peer.FileInfo;
import peer.Peer;
import protocols.ChunkBackupProtocol;
import resources.Logs;
import resources.Util.MessageType;
/**
* Peer initiator response to client request for backup a file.
... |
Python | UTF-8 | 943 | 3.484375 | 3 | [] | no_license | from collections import deque
from time import time
class Animal(object):
pass
class Cat(Animal):
pass
class Dog(Animal):
pass
class Farm(object):
def __init__(self):
self.queues = { Dog: deque(),
Cat: deque() }
def enqueue(self, animal):
""" Depending on... |
Java | UTF-8 | 2,750 | 2.515625 | 3 | [] | no_license | package digitalhouse.android.a0317moacns1c_02.DAO;
import android.os.AsyncTask;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import digitalhouse.android.a0317moacns1c_02.APIs.TMDB.TMDBClient;
import digitalhouse.android.a0317moacns1c_02.Callbacks.ResultListener;
import digitalhouse.... |
TypeScript | UTF-8 | 250 | 2.640625 | 3 | [] | no_license | export interface IBook {
_id: string;
titolo: string;
autore: string;
costo: number;
}
export class Book implements IBook {
constructor(public _id: string, public titolo: string, public autore: string, public costo: number) {}
} |
Markdown | UTF-8 | 1,569 | 3.515625 | 4 | [] | no_license | # Routing Protocol: Link State (Control Plane) 5%
### Note: Extra-credit assignments do not have partial credit. They are all or nothing
As you may know from class lectures, there are two routing algorithms that operate in the network layer, the link state and the distance vector protocols. The link state routing pro... |
TypeScript | UTF-8 | 11,639 | 2.765625 | 3 | [
"MIT"
] | permissive | import * as BabelCore from '@babel/core';
import * as BabelTypes from '@babel/types';
import {
COMMENT_HINTS_KEYWORDS,
getCommentHintForPath,
CommentHint,
} from '../comments';
import { Config } from '../config';
import { ExtractedKey } from '../keys';
import {
ExtractionError,
getFirstOrNull,
findJSXAttr... |
C++ | UTF-8 | 2,392 | 2.640625 | 3 | [] | no_license | // fetch-terrain.cpp
// Fetch leaf level terrain using PDAL
//
#include <pdal/pdal.hpp>
#include <pdal/PipelineManager.hpp>
#include <pdal/StageFactory.hpp>
#include <pdal/PointBuffer.hpp>
#include <pdal/StageIterator.hpp>
#include <pdal/Options.hpp>
#include <pdal/drivers/pgpointcloud/Reader.hpp>
#include <iostream>... |
Shell | UTF-8 | 1,072 | 3.171875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env bash
set -o errtrace -o nounset -o pipefail
source potpourri.shlib.panic.__err_exit_trap__.bash
source potpourri.shlib.console.info.bash
source potpourri.shlib.console.success.bash
main() {
local -i exitCode=0
cd "${PROJECT_ROOT:?}"
shlib.console.info "Shellcheck stage."
makeall static-analysis |... |
Java | UTF-8 | 1,053 | 2.234375 | 2 | [] | no_license | package com.diogogr85.daggerstudy;
import android.app.Application;
import com.diogogr85.daggerstudy.di.components.DaggerDaggerStudyComponent;
import com.diogogr85.daggerstudy.di.components.DaggerStudyComponent;
import com.diogogr85.daggerstudy.di.modules.NetworkModule;
import com.diogogr85.daggerstudy.di.modules.Pres... |
Java | UTF-8 | 8,282 | 3.40625 | 3 | [] | no_license | package org.util.collection;
import java.util.*;
import java.util.stream.Collectors;
/**
* Class for training implementation single linked list
*/
public class SingleLinkedList<T> implements List<T> {
private ElementList<T> first;
private ElementList<T> last;
private int size;
public SingleLinkedLi... |
JavaScript | UTF-8 | 1,808 | 2.671875 | 3 | [] | no_license | $(document).ready(function () {
function validateEmail(email) {
var re = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
return re.test(String(email).toLowerCase());
}
$(function () {
if (localStorage.getItem... |
Java | UTF-8 | 1,693 | 2.34375 | 2 | [] | no_license | package rest;
import java.util.List;
import javax.ws.rs.*;
import javax.ws.rs.core.*;
import dao.FactoryDAO;
import dao.bi.*;
import dto.RolDTO;
@Path("/rol")
public class RolResource {
@Context
UriInfo uriInfo;
@Context
Request request;
private BIRolDAO rolDAO = FactoryDAO.getFactoryDAO().getRolDAO();
@GET... |
Markdown | UTF-8 | 908 | 2.6875 | 3 | [
"MIT"
] | permissive | ## MongoDB 相关
[1.[2021-3-7] MongoDB 适用于哪些场景?](https://github.com/HJY-xh/plantTrees/issues/34)
<details>
<summary>展开查看</summary>
<pre>
适用于以下场景:
- 需要处理大量的低价值数据,且对数据处理性能有较高要求(比如,对微博数据的处理就不需要太高的事务性,但是对数据的存取性能有很高的要求,这时就非常适合用 MongoDB)
- 需要借助缓存层来处理数据(因为 MongoDB 能高效地处理数据,所以非常适合作为缓存层来使用。将 MongoDB 作为持久化缓存层,可以避免底层存储地资源过载)... |
Java | UTF-8 | 523 | 1.984375 | 2 | [] | no_license | package Pages;
import org.openqa.selenium.By;
import static Utils.BaseTest.driver;
public class FirstPage {
private By cancelBtn=By.id("cancel");
private By searchBox=By.id("home_search");
public void clickCancelButton()
{
driver.findElement(cancelBtn).click();
}
public SearchPage d... |
Python | UTF-8 | 1,212 | 2.5625 | 3 | [] | no_license | lista = ["ZERO","ONE","TWO","THREE","FOUR","FIVE","SIX","SEVEN",
"EIGHT","NINE","TEN","ELEVEN","TWELVE","THIRTEEN","FOURTEEN",
"FIFTEEN","SIXTEEN","SEVENTEEN","EIGHTEEN","NINETEEN","TWENTY",
"TWENTY_ONE","TWENTY_TWO","TWENTY_THREE","TWENTY_FOUR","TWENTY_FIVE",
"TWENTY_SIX","TWENTY_SEVEN","TWENTY_EIGHT","TWENTY_NINE... |
Python | UTF-8 | 2,642 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env python
# Google Code Jam
# Google Code Jam 2017
# Qualification Round 2017
# Problem C. Bathroom Stalls
# Solved all test sets
from __future__ import print_function, division
import math
import decimal
from decimal import Decimal
def get_min_max_ls_rs(n, k):
ctx = decimal.getcontext()
ctx.pre... |
C# | UTF-8 | 1,317 | 2.5625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DrugdealerHandler : MonoBehaviour {
public GameObject spawnPoints;
private bool hasDrugs = true;
AudioSource audioSource; // Reference to the AudioSource component.
public A... |
Java | UTF-8 | 1,623 | 2.515625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-public-domain",
"PDDL-1.0",
"ODbL-1.0",
"LicenseRef-scancode-dbcl-1.0"
] | permissive | // Dstl (c) Crown Copyright 2017
package uk.gov.dstl.baleen.resources.gazetteer;
import java.util.Map;
import org.apache.uima.resource.Resource;
import uk.gov.dstl.baleen.exceptions.BaleenException;
/** Gazetteer interface to provide a generic way to access gazetteers */
public interface IGazetteer {
/**
* Ini... |
SQL | UTF-8 | 984 | 2.6875 | 3 | [] | no_license | DROP TABLE IF EXISTS `laboratory_report`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `laboratory_report` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Patient_name` varchar(200) NOT NULL,
`Phone_number` varchar(200) NOT NULL,
`Patie... |
Python | UTF-8 | 1,194 | 3.109375 | 3 | [] | no_license | import numpy as np
import matplotlib.pyplot as plt
def calculate_d(d0, q, r, t):
D = d0*np.exp(-q/(r*t))*10000000000
D = D * time_step / (dx**2)
if D <= 0.5:
return D
else:
return False
def create_array(length, value_one, value_two):
array = []
half_length = int(length / 2)
... |
Markdown | UTF-8 | 3,393 | 3.6875 | 4 | [] | no_license | This is a set of simple JS tasks taken from: https://js.checkio.org/ <br>
For most of them I'm presenting both my solution and the one I find the best (best solutions at checkio are revealed only after you find your own one)<br>
1. Backward string <br>
You should return a given string in reverse order <br>
2. Easy unpa... |
Python | UTF-8 | 4,131 | 2.71875 | 3 | [] | no_license | import telebot # импорт api бота
from telebot.types import Message
from telebot import types
from telebot.types import InputMediaPhoto
import api2ch # апи двача
import html2text #чтобы красово выглядили посты с двача без меток <br> им прочей лабуды
import wget #скачивать и отправлять картинки
# импорт виртуального окру... |
C# | UTF-8 | 702 | 2.625 | 3 | [] | no_license | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class textFade : MonoBehaviour
{
public Text[] text;
public float Delay;
float a=1;
// Start is called before the first frame update
private void OnEnable()
{
StartCoroutine(Fade... |
Markdown | UTF-8 | 456 | 2.515625 | 3 | [] | no_license | summertemps
===========
D3 project exploring summertime temperatures from 2012 to 2013 in Columbia Missouri.
Data sourced from NOAA weather station in sanborn field.
A first stab at using D3 to explore the wild variety between summer 2012 and summer 2013.
Happy with the ability to switch between years and stack th... |
Markdown | UTF-8 | 2,663 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | # Changelog
## ;;VER v0.2.0;;
This version includes breaking change. The `align` method was renamed to `apply` and the `realign` method was renamed as `apply`.
Please update your codebase to reflect this!
- ;;remove;; removed the `quick_shifts` parameter as it was not really used and the `only_shift` parameter does ... |
C# | UTF-8 | 1,950 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | 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;
using QuanLiChuoiCF.DAO;
using QuanLiChuoiCF.DTO;
using System.Text.RegularExpressions;
namespace QuanLi... |
Java | UTF-8 | 1,387 | 2.828125 | 3 | [] | no_license | package AmazonOnlineAssessment;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class OptimalUtilization {
// incomplete
public void solve(int a[][], int b[][], int target) {
List<int[]> list = go(a, b, target);
}
private List<int[]> go(int a[][], int b[][]... |
Java | UTF-8 | 856 | 3.453125 | 3 | [] | no_license | package com.ivanboyukliev.creationalpatterns.singleton.doublecheckedlocking;
public class SingletonDoubleCheckedLocking {
private SingletonDoubleCheckedLocking() {
}
// volatile means changes in instance data will be synchronized in all threads
private volatile static SingletonDoubleCheckedLocking un... |
C++ | UTF-8 | 1,583 | 2.640625 | 3 | [
"MIT"
] | permissive | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
int fx[]={+1,-1,+0,-0};
int fy[]={+0,-0,+1,-1};
int grid[30][30];
int row,column,n,x,y,startX,startY;
#define valid(x,y) x>=0 && x<row && y>=0 && y<column
struct node
{
int x;
int y;
node(int a,int b)
{
x=a;y=b;
}
};
void... |
C++ | UTF-8 | 655 | 2.59375 | 3 | [
"CC-BY-NC-SA-4.0",
"MIT"
] | permissive | #include "Server.h"
#include "Client.h"
#include <cstdio>
#include <cstdlib>
int main(int argc, char** argv) {
if (argc == 1) {
printf("Usage: ftp.out server | ftp.out client SERVER_IP\n");
return 0;
}
if (argv[1][0] == 's' || argv[1][0] == 'S') {
ftp::Server ftpServer;
if (... |
Markdown | UTF-8 | 821 | 2.59375 | 3 | [] | no_license | ## How to embed python3 into golang (MacOS + Docker as an example)
ONLY `Docker` is required for this experiment. Install `Docker` if you haven't install it yet.
## Description
We have two repos
- [python-model](https://github.com/denghejun/python-model) : Hosting the python3 source code.
- [go-app](https://github.... |
Java | UTF-8 | 360 | 2.546875 | 3 | [] | no_license | package PassMe;
public class App
{
public static void main( String[] args ) throws Exception {
if ( args.length < 1 ) {
System.out.println("Usage: java -jar PassMe-1.0-SNAPSHOT.jar <passPhrase>");
System.exit(1);
} else {
Cli cli = new Cli(args[0]);
... |
Java | UTF-8 | 4,374 | 2.59375 | 3 | [] | no_license | package com.charlie.todolist2line.service.impl;
import java.util.NoSuchElementException;
import java.util.Optional;
import com.charlie.todolist2line.dto.UserInfoDto;
import com.charlie.todolist2line.model.UserInfo;
import com.charlie.todolist2line.repo.UserRepository;
import com.charlie.todolist2line.service.UserServ... |
C | UTF-8 | 2,406 | 3.234375 | 3 | [] | no_license |
#include <stdio.h>
void test(int x) {
int a, b, c;
x = x + 1;
a = x + 2;
b = a - 3;
c = a + b;
return;
}
int sum (int a, int b, int c) {
int d, e, f;
if (c > 0) {
d = a;
} else {
d = b;
}
f = a + 1;
return d + f;
}
void test02(int a, int b) {
int i;
int x;
x = a;
for (i = 0; i < b; i++) {
... |
Java | UTF-8 | 911 | 3.40625 | 3 | [] | no_license | import java.io.*;
import java.util.*;
public class MeowFactor{
static boolean counter(long input,long factor){
return input % factor == 0;
}
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
long number = scan.nextLong();
int highest = 1;
for( int i = 2 ; i <... |
Java | UTF-8 | 3,211 | 2.34375 | 2 | [] | no_license | package com.bl.model;
import com.bl.analyser.CricketAnalyser;
public class CSVCricketerDAO {
public int pos;
public String player;
public int mat;
public int inns;
public int notOut;
public int runs;
public String highScore;
public double avg;
public int ballsFaced;
public doub... |
Java | UTF-8 | 608 | 3.234375 | 3 | [] | no_license | import java.util.*;
import java.io.*;
public class SqueezeSolitaire
{
public static void main(String args[]) throws IOException
{
Scanner console = new Scanner(new File("squeezebox.txt"));
while(console.hasNext())
{
String[] cards = new String[52];
cards[0] = con... |
C | UTF-8 | 423 | 3.265625 | 3 | [] | no_license | #include <stdlib.h>
#include "holberton.h"
/**
* s_dir - returns the length of string.
* @ap: the va_list where the argument is a member.
*
* Return: Returns the length (in bytes) of the string printed.
*/
int s_dir(va_list ap)
{
int fmt_len;
char *str;
fmt_len = 0;
str = va_arg(ap, char *);
if (!str)
{
... |
PHP | UTF-8 | 1,652 | 2.71875 | 3 | [] | no_license | <?php
/**
* @author: ahuazhu@gmail.com
* Date: 16/7/19 下午6:00
*/
namespace Transfer\Impl;
use Codec\PlainTextCodec;
use Config\Config;
use Transfer\Sender;
class SingleThreadSender implements Sender
{
private $m_codec;
private $ROUTER_URL_TEMP = 'http://%s:%d/cat/s/router?domain=%s&ip=%s&op=json';
... |
SQL | UTF-8 | 735 | 3.0625 | 3 | [] | no_license | use tennis3;
DELIMITER //
CREATE PROCEDURE InsertNewPlayer(
IN registration_id_new INTEGER,
IN registration_first_name_new VARCHAR(40),
IN registration_last_name_new VARCHAR(40),
IN registration_gender_new VARCHAR(40))
BEGIN
INSERT INTO registration (registration_id, registration_first_name, registration_... |
C++ | UTF-8 | 2,194 | 3.890625 | 4 | [] | no_license | #include <vector>
using namespace std;
class MyCircularQueue {
public:
/** Initialize your data structure here. Set the size of the queue to be k. */
MyCircularQueue(int k) :
head_(-1),
tail_(-1),
size_(k)
{
vec_.reserve(k);
}
/** Insert an element into the circular queue. Retur... |
Ruby | UTF-8 | 109 | 2.609375 | 3 | [] | no_license | loop do
counter += 1
puts "Wingardium Leviosa"
if counter >= Infinity
break
end
end
#call your method here
|
Java | UTF-8 | 292 | 2.453125 | 2 | [] | no_license | package com.ideas;
import org.springframework.stereotype.Service;
@Service("Arithmaticcalculator")
public class CalculatorArithmatic implements Calculator {
public int add(int i, int j) {
// TODO Auto-generated method stub
System.out.println("using Arithmatics");
return i+j;
}
}
|
JavaScript | UTF-8 | 3,733 | 2.828125 | 3 | [] | no_license | var Audio = function ( url ) {
var AudioContext = window.AudioContext || window.webkitAudioContext;
var context = new AudioContext();
var analyser = context.createAnalyser();
analyser.fftSize = 1024;
analyser.connect( context.destination );
var gain = context.createGain();
gain.gain.value = 10;
gain.connect(... |
C++ | UTF-8 | 4,663 | 3.015625 | 3 | [
"BSD-2-Clause"
] | permissive | // -*- mode: c++ -*-
// Copyright 2010, François Bleibel, Thomas Moulard, Olivier Stasse,
// JRL, CNRS/AIST.
//
#ifndef DYNAMIC_GRAPH_SIGNAL_TIME_DEPENDENT_H
# define DYNAMIC_GRAPH_SIGNAL_TIME_DEPENDENT_H
# include <dynamic-graph/signal.h>
# include <dynamic-graph/time-dependency.h>
namespace dynamicgraph
{
/*! \b... |
Java | UTF-8 | 1,012 | 2.796875 | 3 | [] | no_license | package caparicapost;
public abstract class ArticleAbstract implements Article {
private String type;
private String title;
private String author;
private String theme;
private String topic;
private String date;
private String text;
public ArticleAbstract(String type, String ti... |
Python | UTF-8 | 4,086 | 2.703125 | 3 | [] | no_license | from selenium.webdriver.common.by import By
from framework.base_page.base_page import BasePage
from framework.elements.button import Button
from framework.elements.input import Input
from framework.elements.label import Label
from framework.utils.logger_util import Logger
from framework.utils.string_util import random... |
Java | UTF-8 | 1,226 | 1.820313 | 2 | [] | no_license | package com.xt.entity.vin;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 供应商/客户
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Supplier {
private long id;//主键
private String supplier;//供应商,客户,名称
private String contacts;//联系人
private String... |
Java | UTF-8 | 2,122 | 2.0625 | 2 | [] | no_license | package com.aiyuba.glsurfaceview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Surface;
import android.view.View;
import android.widget.LinearLayout;
import javax.microedition.khronos.egl.EGLContext;
public class MulitysurfaceOneTextureActivity extends AppCompatActiv... |
JavaScript | UTF-8 | 3,242 | 2.734375 | 3 | [] | no_license | import colors from 'colors'
import carros from '../db.json'
class Realizar{
static async realizarensamblaje(req, res) {
try {
let realizarensamblaje = () => {
return new Promise((reso, reje) => {
if (carros.length === 0) return reje('La lista predeterminada no tiene autos a en... |
Java | UTF-8 | 2,477 | 3.515625 | 4 | [] | no_license | /*
* @lc app=leetcode.cn id=239 lang=java
*
* [239] 滑动窗口最大值
*
* https://leetcode-cn.com/problems/sliding-window-maximum/description/
*
* algorithms
* Hard (49.61%)
* Likes: 823
* Dislikes: 0
* Total Accepted: 122.1K
* Total Submissions: 246.7K
* Testcase Example: '[1,3,-1,-3,5,3,6,7]\n3'
*
* 给你一个整... |
C++ | UTF-8 | 1,160 | 2.53125 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int n, m;
int a[1005][1005];
long long dp[1005][1005];
#define MOD 1000000007
long long solve(int i, int j){
if(i<0 || j<0 || i>=n || j>= m || a[i][j] == 0)
return 0;
if(i==n-1 && j==m-1)
return dp[i][j] = (a[i][j]==1);
if(dp[i][j] != -1)
... |
Java | UTF-8 | 853 | 2.453125 | 2 | [
"Apache-2.0"
] | permissive | package com.deezer.android.counsel.checks;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.DeclareError;
/**
* @author Xavier Gouchet
*/
@Aspect
public class AndroidLoggingCheck {
@DeclareError("get(* java.lang.System.out)")
public static final String OUT_STREAM = "Should not ... |
C# | UTF-8 | 1,958 | 2.578125 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TPP.DL.DataModel;
namespace TPP.BL.BC
{
public class OperacionBC
{
public List<Operacion> ListarOperacion()
{
BDParacasEntities context = new BDParacasEntities()... |
Shell | UTF-8 | 2,110 | 2.796875 | 3 | [] | no_license | # $Id$
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Jeff Mickey <j@codemac.net>
# Contributor: Dusty Phillips <dusty@buchuki.com>
pkgname=jedit
pkgver=5.1.0
pkgrel=4
pkgdesc... |
C# | UTF-8 | 687 | 2.78125 | 3 | [] | no_license | #region Using Directives
using System;
#endregion
namespace Loom.Threading
{
/// <summary>Event arguments representing the completion of a parallel action.</summary>
public class ParallelEventArgs : EventArgs
{
internal ParallelEventArgs(object state, Exception exception)
{
St... |
Java | UTF-8 | 266 | 2.171875 | 2 | [] | no_license | package it.polimi.ingsw.server.instructions;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
class TakeInstructionTest {
@Test
void run() {
Assertions.assertEquals(1, new TakeInstruction().run(null).intValue());
}
} |
JavaScript | UTF-8 | 194 | 3.15625 | 3 | [] | no_license | "use strict";
var names = ['Foo', 'Bar', 'Morse', 'Luke', 'Lea', 'Han Solo'];
console.log(names.slice(3, 5)); // [ 'Luke', 'Lea']
console.log(names.splice(2, 3)); // ['Morse', 'Luke', 'Lea']
|
Python | UTF-8 | 429 | 4.375 | 4 | [] | no_license | # 7-4 比萨配料:
# 编写一个循环,提示用户输入一系列的比萨配料,并在用户输入'quit'时结束循环。
# 每当用户输入一种配料后,都打印一条消息,说我们会在比萨中添加这种配料
thing = '\nplease input:'
thing += '\ninput \'quit\' to stop'
while True:
message = input(thing)
if message == 'quit':
break
else:
print('We will add ' + message) |
Java | UTF-8 | 632 | 1.875 | 2 | [] | no_license | package az.orient.aptek.dao;
import java.util.List;
import az.orient.aptek.pojo.Vezifeler;
public interface AptekDaoVezifeler {
List<Vezifeler> getVezifelerList() throws Exception;
boolean addVezifeler(Vezifeler vezifeler) throws Exception;
Vezifeler getVezifelerById(Long vezifelerId) throws Exception... |
C# | UTF-8 | 2,886 | 2.609375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.OleDb;
using ZedGraph;
using System.Drawing;
namespace kutuphane.DAL
{
public class GrafikDAL
{
private DBConnection dBConnection;
public GrafikDAL()
{
... |
Swift | UTF-8 | 2,959 | 2.8125 | 3 | [] | no_license | //
// InformationController.swift
// Mon_PK_et_moi
//
// Created by Hugo LECLER on 06/03/2018.AppDelegate
// Copyright © 2018 FAIZA&LECLER. All rights reserved.
//
import Foundation
import UIKit
import CoreData
class InformationController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {
@I... |
C++ | UTF-8 | 5,524 | 2.703125 | 3 | [
"MIT"
] | permissive | //////////////////////////////////////////////////////////////////////////////////
// Copyright(c) 2020, Lin Koon Wing Macgyver, macgyvercct@yahoo.com.hk //
// //
// Author : Mac Lin //
// Module : Magnum Engine v0.7.0 //
// Date : 05/Nov/2020 //
// ... |
PHP | UTF-8 | 3,601 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Owner extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('owner_model');
}
public function index()
{
$data = array('header_title' => $this->lang->line('owners_list'));
$this->load... |
Java | UTF-8 | 1,376 | 3.96875 | 4 | [] | no_license | package ex.ex11;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
class Ex11 {
public static void main(String[] args) {
//Personクラスを格納するArrayListを作成する
//5人程度のインスタンスを追加する
List<Person> list = new ArrayList<>();
list.addAll(Array... |
TypeScript | UTF-8 | 380 | 2.578125 | 3 | [] | no_license | export interface PedidoServicioDTO{
/**
* Fecha del pedido
*/
fechaPedido: Date
/**
* Plato del pedido
*/
plato: string;
/**
* bebida del pedido
*/
bebida: string;
/**
* Cliente que hace corresponde al pedido
*/
cliente: string;
/**
* Tipo de pedido que hace el clie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.