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 | 87 | 2.796875 | 3 | [] | no_license | # -*- coding: utf-8 -*-
# python 3
d = """this
will be printed
in 3 lines"""
print(d) |
Java | UTF-8 | 425 | 2.65625 | 3 | [] | no_license | package br.edu.fapi.roda;
public class Roda {
private double aro;
private String material;
public Roda ( double aro, String material) {
this.aro = aro;
this.material = material;
}
public double getAro() {
return aro;
}
public void setAro(double aro) {
this.aro = aro;
}
public String getMaterial()... |
Java | UTF-8 | 725 | 2.1875 | 2 | [] | no_license | package pl.volanto.contacts.model;
import org.springframework.stereotype.Component;
import pl.volanto.domain.contact.Contact;
import pl.volanto.domain.contact.ContactBuilder;
import pl.volanto.domain.user.UserDTO;
@Component
public class ContactMapper {
public Contact mapToContact(ContactRest contactRest, UserDT... |
JavaScript | UTF-8 | 4,546 | 2.9375 | 3 | [
"MIT"
] | permissive | //window.onload=function(){//页面加载完成后
slideLlx("slide");//参数为字符串是外层容器的id,可以多次调用
// slideLlx("slide_two");
//方法
function slideLlx(slideID){
var slide=document.getElementById(slideID);//容器
var slideLis=slide.getElementsByTagName('li');
var conut=slideLis.length;//实际图片数量
if(conut<2){
return false;//如果... |
PHP | UTF-8 | 4,824 | 2.734375 | 3 | [] | no_license | <?php
/*
* [The "BSD licence"]
* Copyright (c) 2003-2005 Terence Parr, 2010 Yauhen Yakimovich
* 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 ret... |
Java | UTF-8 | 1,120 | 2.453125 | 2 | [] | no_license | package org.example.helloandroid;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.StrictMode;
import android.widget.TextView;
public class HttpExample extends Activity {
TextView httpStuff;
@Override
protected void onCreate(Bundle savedInstanceState){
... |
Java | UTF-8 | 1,003 | 2.140625 | 2 | [] | no_license | package com.example.vishambar.webserviceusingretrofit.advanced.activity;
import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.example.vishambar.webserviceusingretrofit.R;
import com.example.vishambar.webserviceusingretrofit.adv... |
Ruby | UTF-8 | 487 | 3.171875 | 3 | [] | no_license | def price(item:, size:)
items = {"コーヒー" => 300 , "モカ" => 400}
sizes = {"ショート" => 0, "トール" => 50, "ベンティ" => 100}
items[item] + sizes[size]
end
puts price(item:"コーヒー", size:"ショート")
puts price(item:"コーヒー", size:"トール")
puts price(item:"コーヒー", size:"ベンティ")
puts price(item:"モカ", size:"ショート")
puts price(item:"モカ", siz... |
Java | UTF-8 | 693 | 2.140625 | 2 | [] | no_license | package com.example.multipledatabasespringboot.service;
import com.example.multipledatabasespringboot.model.request.CustomerRequest;
import com.example.multipledatabasespringboot.model.response.CustomerResponse;
import com.example.multipledatabasespringboot.model.response.PaginateResponse;
/**
* Project title: multi... |
Java | UTF-8 | 1,043 | 2.6875 | 3 | [] | no_license | package nwpu.sherman.bean;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.EmbeddedValueResolverAware;
import org.springframework.util.StringValueResolver;
/**
* 演示Aw... |
PHP | UTF-8 | 1,618 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Template Selector plugin for Craft CMS 3.x
*
* A fieldtype that allows you to select a template from a dropdown.
*
* @link https://swishdigital.co
* @copyright Copyright (c) 2022 Swish Digital
*/
namespace swishdigital\templateselector\services;
use swishdigital\templateselector\TemplateSelect... |
Java | UTF-8 | 1,578 | 2 | 2 | [] | no_license | /**
*
*/
package com.turkmen.mongodb.MongoDbIntegrationWithSpringBoot.configuration;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframew... |
Markdown | UTF-8 | 4,542 | 3 | 3 | [
"MIT"
] | permissive | ---
title: មនុស្សក៏ត្រឡប់ជាមានព្រលឹងរស់ឡើង
date: 08/10/2022
---
### អំណានព្រះគម្ពីរសម្រាប់មេរៀនប្រចាំសប្តាហ៍នេះ៖
លោកុប្បត្តិ 2៖7, 19; អេសេគាល 18៖4, 20; សាស្តា 12៖1-7; សាស្តា 9៖5; ពង្សាវតាក្សត្រទី1 2៖10។
> <p>ខចងចាំ</p>
> «ព្រះយេហូវ៉ាដ៏ជាព្រះទ្រង់យកធូលីដីមកសូនធ្វើជាមនុស្ស ទ្រង់ផ្លុំខ្យល់ដង្ហើមជីវិតបញ្ចូល ទៅក្នុងរន្ធ... |
Java | UTF-8 | 806 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | package com.ywl5320.wlmedia.enums;
/**
* Created by ywl5320 on 2018/12/31
*/
public enum WlBufferType {
BUFFER_QUEUE_SIZE("BUFFER_QUEUE_SIZE", 0), // 设置底层buffer 队列大小(所有流)
BUFFER_MEMORY_SIZE("BUFFER_MEMORY_SIZE", 1), // 设置底层buffer 内存大小(单位:M)
BUFFER_TIME("BUFFER_TIME", 2); // 设置底层buffer 时间大小(单位:s)
pr... |
PHP | UTF-8 | 1,063 | 2.9375 | 3 | [] | no_license | <html>
<head>
<title>
RETRIVE DATABASE
</title>
</head>
<body>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$data_base = "sms";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $data_base);
// Check connection
if (!$conn) {
die("Conne... |
PHP | UTF-8 | 800 | 2.609375 | 3 | [] | no_license | <?php
/* Copyright 2014, Charlie Fyvie-Gauld (Carrotsrg.org)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
class Managers
{
private static $resourceMana... |
C# | UTF-8 | 5,574 | 2.734375 | 3 | [] | no_license | using Microsoft.Extensions.Logging;
using WEBAPI.DAL.Repository;
using WEBAPI.DAL.Entities;
using System.Collections.Generic;
using System.Linq;
namespace WEBAPI.BL
{
public class FillDatabase
{
IEducationRepository _educationRepository;
private ILogger _logger;
public FillDatabase(I... |
Python | UTF-8 | 2,059 | 2.59375 | 3 | [] | no_license | from django.core.management.base import BaseCommand, CommandError
from sklearn.feature_extraction.text import TfidfVectorizer
from explore.models import Article, ArticleTFIDF
from explore.utils import *
class Command(BaseCommand) :
args = 'no arguments'
help = '(re)builds the ArticleTFIDF table'
def handl... |
Go | UTF-8 | 2,646 | 2.953125 | 3 | [
"ISC"
] | permissive | package main
type status int
const (
StatusExhausted status = iota
StatusSwift
StatusLignification
StatusConfusion
StatusNausea
StatusFlames // fake status
StatusHidden
StatusUnhidden
StatusLight
StatusDig
StatusLevitation
StatusShadows
StatusIlluminated
StatusTransparent
StatusDisguised
StatusDelay
... |
Java | UTF-8 | 4,199 | 3.515625 | 4 | [] | no_license | package StringMatching;
/**
* Created by Ethan on 15/11/27.
* The Rabin-Karp algorithm on two-dimensional array.
* Reference: CLRS, Exercises 32.2-3
*/
public class RabinKarpMatcher2D {
private static int[] horizontalInitialization(String[] T, int m2, int d, int q, int base) {
// T = n1*n2
int... |
JavaScript | UTF-8 | 587 | 2.578125 | 3 | [] | no_license | import * as React from 'react';
function genItems(size) {
const items = [];
for (let i = 1; i <= size; i++) {
items.push(<div className="sl-item" key={i}>{`item${i}`}</div>);
}
return items;
}
export function genData(dataSize) {
const data = [];
for (let i = 1; i <= dataSize; i++) {
data.push({
... |
Java | UTF-8 | 2,060 | 2.921875 | 3 | [] | no_license | package ST200110_undo1;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main_17130_토끼가정보섬에올라온이유 {
static boolean end = false;
static String[] map;
static int[][] dp;
static boolean[][] check;
static int[] dr = {-1, 0, 1};
static int N, M, Ans = 0;... |
Java | UTF-8 | 756 | 2.703125 | 3 | [] | no_license | package it.openly.core.exceptions;
import lombok.Getter;
/**
* A specialised runtime exception that allow passing arguments.<br/>
* The arguments are meant to be the arguments of the function that raised the exception or other information useful
* to return meaningful error messages.
*
* @author filippo.possent... |
JavaScript | UTF-8 | 1,723 | 3.515625 | 4 | [] | no_license | /**
* Created by anubhavshrimal on 23/7/16.
*/
var async = require('async');
var delayedOutput = function (a, b, cb) {
setTimeout(function () {
console.log("output1", (a+b));
// arguments (err, result)
cb(null, a+b);
}, 3000);
};
var delayedOutput2 = function (sum, cb) {
setTime... |
Python | UTF-8 | 835 | 2.546875 | 3 | [] | no_license | import ctypes
nums = [0xc8f9a829, 0xec83260e, 0xaf93c6f4, 0x5a1b89d9, 0x31e68d0d, 0xc38ce7e7, 0xc8f9a829, 0x4aee907b, 0xe0138a5f, 0x31e68d0d, 0x09975e45, 0xd129ea43, 0xc6830a2f, 0xc8f9a829, 0xec83260e, 0xec83260e, 0x13bf2b7f, 0xe0138a5f, 0xe419b183, 0xb2f1ddbb, 0xc38ce7e7, 0xc38ce7e7, 0x91639414, 0x5a1b89d9, 0x31e68d0... |
Shell | UTF-8 | 1,183 | 3.875 | 4 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | #! /bin/sh
## AUTHOR: Robert Twyman
## Script used to automatically gather GATE x,y,z attenuation translation for STIR images.
## Script echo (returns) x y z variables.
ImageFilename=$1
if [ $# -ne 1 ]; then
echo "Usage:"$0 "ImageFilename" 1>&2
exit 1
fi
set -e # exit on error
trap "echo ERROR in $0" ERR
## Get... |
Markdown | UTF-8 | 3,089 | 3.359375 | 3 | [
"MIT"
] | permissive | _1강에서 다룬 내용은 pdf ppt슬라이드에 모두 있습니다._
_복습이라고 생각하시고 책읽듯이 읽어주세요_
# JSX
JSX는 리액트에서 return문에 사용하는 문법이다.
얼핏보면 HTML같지만, 실제로는 자바스크립트입니다.
```jsx
return (
<div className="App">
<h1>Hello React</h1>
</div>
);
```
이렇게 컴포넌트에서 JSX를 작성하면 바벨 트렌스파일러가 자동으로 자바스크립트로 변환을 해줍니다.
JSX에는 여러 규칙들이 있습니다
#### 꼭 닫혀야 하는 태그
```jsx
... |
Java | UTF-8 | 1,900 | 2.203125 | 2 | [] | no_license | package com.pabei.backend.controller.response;
import org.springframework.beans.BeanUtils;
import com.pabei.backend.domain.Orders;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Created by PPYX on 2016/12/1. 响应出场凭证的bean
*/
@ApiModel
public class ExitVouc... |
C# | UTF-8 | 1,389 | 2.65625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace TabbedApp
{
class DoctorListAdapter : BaseAdapter<Doctor>
{
private readonly Act... |
JavaScript | UTF-8 | 329 | 3.125 | 3 | [] | no_license |
function objectToQueryString(object)
{
return Object.keys(object).map( function(item){
return item + '=' + object[item];
}).join('&');
}
//var obj = {user: 'Dmitry'};
// var obj = {user: 'Dmitry', password: 'pass'};
var obj = {user: 'Dmitry', password: 'pass', id:1};
console.log(objectToQueryString(obj));
|
JavaScript | UTF-8 | 644 | 2.53125 | 3 | [] | no_license | import React, { Component } from 'react'
class Instructions extends Component {
render() {
return (
<div className="instructions">
<h5>How It Works</h5>
<div>
<p>Each card is a multiple choice question. Click on the answer you think is correct!</p>
<p>If you get the answe... |
Java | UTF-8 | 1,652 | 2.75 | 3 | [] | no_license |
package sudoku;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.Stack;
/**Класс, описывающий сохраненную игру*/
public class SavedGame implements Serializable{
private final Stack <Move> moves;
private final LinkedList<SudokuLabel> gameField;
private final long time;
private ... |
C# | UTF-8 | 2,109 | 2.703125 | 3 | [] | no_license | using QRCoder;
using System;
using System.Drawing.Imaging;
using System.IO;
namespace BarBuddy.DTOs.Helper
{
public static class QRCodeHelper
{
public static string CreateQrCodeForDoor(string qrCodeSalt)
{
try
{
if (string.IsNullOrWhiteSpace(qrCodeSalt))... |
Markdown | UTF-8 | 5,786 | 2.6875 | 3 | [] | no_license | ```yaml
area: Nottinghamshire
og:
description: Car cruisers who ignore pleas to stop illegal gatherings have been warned police are prepared to step up fines.
image: https://www.nottinghamshire.police.uk/_npt_customisations/images/socialmedia-crest-2018.jpg
site:
name: Nottinghamshire Police
title: Seven fi... |
Python | UTF-8 | 5,983 | 2.5625 | 3 | [] | no_license | from collections import OrderedDict
import matplotlib.pyplot as plt
import os
import sys
sys.path.append(os.pardir)
from common.layers import *
from common.utils import *
from common.optimizer import *
class ConvolutionalNeuralNet:
def __init__(self, input_shape, hidden_size, output_size, conv_params):
f... |
C++ | UTF-8 | 1,449 | 2.671875 | 3 | [] | no_license | #pragma once
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
class Level
{
private:
World* physicsWorld;
LevelLoader* levelLoader;
Spawner* spawner;
string levelName;
string levelPath;
/*... |
Swift | UTF-8 | 953 | 2.546875 | 3 | [
"MIT"
] | permissive | //
// HiPayWxOrder.swift
// HiPay
//
// Created by Jason on 16/6/17.
// Copyright © 2016年 wuyingminhui@gmail.com. All rights reserved.
//
// 微信支付订单
import Foundation
/**
* 微信订单
*/
public struct HiPayWxOrder {
/// 商家appid
public var appid: String
/// 商家id
public var partnerId: String
///... |
C# | UTF-8 | 1,740 | 3.03125 | 3 | [
"MIT"
] | permissive | //-----------------------------------------------------------------------
// <copyright file="ITimeOfDayState.cs" company="Sully">
// Copyright (c) Johnathon Sullinger. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace Mud.Engine.Shared.Environ... |
C++ | UTF-8 | 1,679 | 2.90625 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 998244353;
struct mint {
ll x;
mint(ll x = 0) : x((x % mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint &operator+=(const mint a) {
if ((x += a.x) >= mod) x -= mod;
return *this;
... |
Java | UTF-8 | 2,825 | 3.421875 | 3 | [] | no_license | package datageneration;
import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* Abstract class templates each of the different forms of data the system will extract from the
* database.
*
* @author Jordan & Michael
*/
public abstract class CreateDocuments extends Documents {
... |
Python | UTF-8 | 17,056 | 2.8125 | 3 | [] | no_license | #################################################################
# Title: Final Report
# Author: Sam Cohen
# Date Created: 4/25
# Date Modified:
##################################################################
# Packages
import numpy as np
import matplotlib.pyplot as plt
import statsmodels.api as sm
from scipy impo... |
Python | UTF-8 | 1,811 | 2.875 | 3 | [] | no_license | #!/usr/bin/python3
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from numpngw import AnimatedPNGWriter
# Import the wave function
from Psi import *
cn = 1/np.sqrt(2)*np.array([1, 1])
x = np.linspace(0, 1, 256)
t = np.linspace(0, 4/(np.pi), 256)
# Check normalization
... |
C++ | UTF-8 | 1,980 | 3.015625 | 3 | [] | no_license | #include "TextureLoader.h"
CTextureLoader::CTextureLoader(void)
{
}
CTextureLoader::~CTextureLoader(void)
{
}
///returns texture, make it equal to unsigned int
GLuint CTextureLoader::load_texture(const char* file)
{
glEnable(GL_TEXTURE_2D);
GLuint texture=NULL; //this is a handle to our texture object
GLenum ... |
C# | UTF-8 | 1,793 | 2.734375 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Web.Http;
namespace simplePerformanceTest.WebApi.Net47.Controllers
{
public class RandomStringController : ApiController
{
pri... |
JavaScript | UTF-8 | 3,367 | 2.59375 | 3 | [] | no_license | import React, {useState, useEffect} from 'react'
import initPexel from './initPexel';
import SearchBar from './SearchBar';
import ImageList from './ImageList';
import './SearchBar.css';
import {Row, Col} from "react-bootstrap" //replaced
import {FaArrowAltCircleRight, FaArrowAltCircleLeft} from "react-icons/fa"
import ... |
PHP | UTF-8 | 3,597 | 2.59375 | 3 | [] | no_license | <?php
/*
* This file is part of the Mall Digital Ecosystem (MDE) project.
*
* (c) <SCCD> <office@sccd.lu>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Scc\Cdn\Builder;
use Scc\Cdn\Tests\Helper\Traits\ReflectionTrait... |
C# | UTF-8 | 2,021 | 3.515625 | 4 | [
"MIT"
] | permissive | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DailyChallenge
{
public class DailyChallenge6
{
/*
Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded.
For example, ... |
PHP | UTF-8 | 4,103 | 3 | 3 | [] | no_license | <?php
// Include config file
require_once "config.php";
// Define variables and initialize with empty values
$modules_code = $modules_name = "";
$modules_code_err = $modules_name_err = "";
// Processing form data when form is submitted
if($_SERVER["REQUEST_METHOD"] == "POST"){
// Validate modules ID
... |
Java | UTF-8 | 1,098 | 2.40625 | 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.mycompany.bankproject;
//
//import javax.persistence.EntityManager;
//import javax.persistence.EntityManagerFac... |
JavaScript | UTF-8 | 1,322 | 2.90625 | 3 | [] | no_license | function exibeClientes(clientes) {
for (var i = 0; i < clientes.length; i++) {
var cliente = clientes[i];
var dadosCliente = '<div id="' + cliente.id + '">' +
'ID: ' + cliente.id +
'<br>Nome: ' + cliente.nome +
'<br>Endereço: ' + cliente.endereco +
... |
Java | UTF-8 | 1,068 | 3.078125 | 3 | [] | no_license | package day47_blocks;
import static java.lang.Math.*;
import static java.lang.Character.*;
import static java.util.Arrays.sort;
import java.util.Arrays.*;
import static java.time.LocalDateTime.now;
import java.util.Arrays;
public class StaticImports {
public static void main(String[] args) {
System.out.println(PI... |
Java | UTF-8 | 2,854 | 2.703125 | 3 | [] | no_license | package jl.playground.xml.sax;
import java.io.File;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Enumeration;
import java.util.Hashtable;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org... |
Java | UTF-8 | 1,295 | 3.171875 | 3 | [] | no_license | package com.neustar.test;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class GenerateJSon {
private static final String FILENAME = "src\\test\\resources\\testdata\\SampleJson.json";
public static void main(String[] args) throws I... |
Markdown | UTF-8 | 107,339 | 2.859375 | 3 | [] | no_license | ---
layout: wiki
title: makho's Backlight Mod Notes
category: Wiki
---
## **The best backlight kit is the one you already have.** Enjoy it. A new kit does not invalidate your prior build.
I, /u/Admiral_Butter_Crust or makho on discord or youtube, own *nearly* every backlight kit on the market right now for pretty ... |
Python | UTF-8 | 678 | 3.734375 | 4 | [] | no_license | #!/usr/bin/env python
# coding: utf-8
# 1.Write a function so that the columns of the output matrix are powers of the input
# vector.
# The order of the powers is determined by the increasing boolean argument. Specifically,
# when increasing is False, the i-th output column is the input vector raised element-wise
# to... |
Java | UTF-8 | 1,094 | 2.265625 | 2 | [] | no_license | /**
*
*/
package ru.prbb.middleoffice.domain;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author RBr
*
*/
@Entity
public class SwapItem implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Long id;
... |
Java | UTF-8 | 637 | 2.84375 | 3 | [] | no_license | package aic.group5.topic3;
public class AnalyzeResult {
private final Object result;
private boolean error = false;
public AnalyzeResult( Object result ) {
this.result = result;
}
public static AnalyzeResult stillAnalyzing( ) {
return new AnalyzeResult( "analyzing" );
}
public static AnalyzeResult done( ... |
C++ | GB18030 | 1,327 | 3.71875 | 4 | [] | no_license | #include "String.h"
int main(void)
{
//dz
String s1("AAA");
s1.Display();
String s2 = s1; //Լûʵһ캯 ϵͳṩĬϵĿ캯
// ϵͳṩĬϿ캯ʵʩdzȼs2.str_ = s1.str_
//ԱԱֵ
//s2еstr_ָs1еstr_ָָͬһڴ棬ڹs2ʱûзԼڴ棬
//ָͬһڴ
//2ڽʱҪͬһڴ汻ͷ2Σʱ
//취ϵͳṩĬϵĿ캯Լʵһ캯
//ֵ
String s3;
s3.Display();
s3 = s2; // õȺ
// ϵͳṩĬ... |
C++ | UTF-8 | 1,259 | 3.78125 | 4 | [] | no_license | /*
Escriba un programa para calcular cuántas cajas cuadradas pueden contenerse en una sola capa en un estante rectangular, sin voladizo.
Las dimensiones del estante en pies y la dimensión de un lado de la caja en pulgadas se leen desde el teclado.
Use variables de tipo double para la longitud y profundidad del estant... |
Java | UTF-8 | 16,276 | 3.046875 | 3 | [] | no_license | //
// Theo Laanstra 2018, 300153944
//
package game;
import java.io.File;
import java.util.ArrayList;
import java.util.Scanner;
//A class for loading game data from a file into the program.
public class GameLoader {
// I threw some Thread.sleep() statements in here to make it look a little
// cooler... |
Swift | UTF-8 | 2,280 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | //
// JGAdvertCell.swift
// JG_XMLY
//
// Created by 郭军 on 2019/4/23.
// Copyright © 2019 guojun. All rights reserved.
//
import UIKit
class JGAdvertCell: JGBaseCollectionCell {
// 图片
private var imageView: UIImageView = {
let imageView = UIImageView()
return imageView
}()
// ... |
Python | UTF-8 | 469 | 3.078125 | 3 | [] | no_license | class Solution:
def maxPathSum(self, root):
self.max_sum = float('-inf')
self.dfs(root)
return self.max_sum
def dfs(self, node):
if not node: return 0
left_sum = max(self.dfs(node.left), 0)
right_sum = max(self.dfs(node.right), 0)
cur_sum = l... |
Java | UTF-8 | 26,110 | 2.25 | 2 | [] | no_license | package com.test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.... |
JavaScript | UTF-8 | 2,982 | 2.515625 | 3 | [
"MIT"
] | permissive | /**
*@module PageTransitionDriver
*@memberof EventDrivers
*/
/**
* event initialization options.
*@typedef {Object} PageTransitionEventInit
*@private
*@property {boolean} [bubbles=true] - boolean value indicating if event bubbles
*@property {boolean} [cancelable=false] - boolean value indicating if event is
* ... |
C++ | UTF-8 | 886 | 2.546875 | 3 | [] | no_license | #include <cstdio>
#include <algorithm>
using namespace std;
int r,c, dp[505][505], sum[505][505], grami[505][505];
inline int s(int from, int to, int grames)
{
return sum[grames][to] - sum[grames][from-1];
}
int main()
{
while (scanf("%d%d",&r,&c) && r)
{
for (int y=1; y<=r; y++)
for (int x=1; x<=c; x++)
... |
Python | UTF-8 | 125 | 3.484375 | 3 | [] | no_license | print("tapez la valeur de n :")
n = input()
if int(n)%2 == 0:
print("le nombre n est pair")
else:
print("impair")
|
Markdown | UTF-8 | 3,099 | 2.859375 | 3 | [
"MIT"
] | permissive | CONTRIBUTING
============
Tabula is an open-source project, which means it depends on volunteers to build and improve it.
Interested in helping out? We'd love to have your help!
You can help by:
- [Reporting a bug](https://github.com/jazzido/tabula).
- Adding or editing documentation.
- Contributing code via a Pull... |
PHP | UTF-8 | 819 | 3.09375 | 3 | [] | no_license | <?php
declare(strict_types=1);
/*------------------------------------
| 具體仲介者
|------------------------------------
|
|
|
*/
namespace Src\Mediator\Basic;
class ConcreteMediator extends Mediator
{
private $colleague1;
private $colleague2;
/**
* @param mixed $colleague1
*/
public fun... |
Java | UTF-8 | 3,419 | 1.914063 | 2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
* Copyright (C) 2014-2023 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* 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/LICEN... |
Java | UTF-8 | 2,160 | 3.578125 | 4 | [] | no_license |
import java.io.IOException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
public class Example1 {
static class DataOperate {
public static void writeMethod(PipedOutputStream pipedOutputStream) {
try {
System.out.println("Write :");
for (in... |
PHP | UTF-8 | 881 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: rndwiga
* Date: 7/7/18
* Time: 9:36 PM
*/
namespace Rndwiga\Mifos\Modules\Product;
use Rndwiga\Mifos\MifosXConnection;
class LoanProductHelper extends MifosXConnection
{
public function listLoanProducts($getArray = false, int $loanProductId = null , array $options =... |
Shell | UTF-8 | 778 | 3.5625 | 4 | [] | no_license | #!/bin/bash
destdir=$1
if [ -z "$destdir" ]; then
export destdir=/tmp/skychart
fi
echo Install skychart doc to $destdir
install -v -m 755 -d $destdir
install -v -m 755 -d $destdir/share
install -v -m 755 -d $destdir/share/skychart
for f in $(sort dir-doc.lst)
do
install -v -m 755 -d $destdir/share/skychart/$f... |
Markdown | UTF-8 | 1,567 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | # Text
DeepSea Text manages drawing of arbitrary Unicode text with standard fonts. Rendering is performed using the signed distance field method, allowing a wide range of scaling with the same glyph textures.
One or more fonts are loaded using `dsFaceGroup`. A `dsFont` is created with fonts loaded from the `dsFaceGro... |
Python | UTF-8 | 23,936 | 2.71875 | 3 | [
"MIT"
] | permissive | from __future__ import absolute_import
from builtins import range
import keras.backend as ker
from keras.layers import Dense, Conv2DTranspose, Conv2D, Dot, Reshape, Multiply, Concatenate, Add, Lambda
from keras.models import Model, Input
from numpy import prod
def repeat_dense(inputs, n_layers, n_units=256, activati... |
C# | UTF-8 | 24,056 | 2.734375 | 3 | [] | no_license | using System;
using System.IO;
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 System.Diagnostics;
using MySql.Data.MySqlClient;
/* Remarques:
* ... |
Markdown | UTF-8 | 6,302 | 2.96875 | 3 | [
"MIT"
] | permissive | Toggl time report builder
=========================
Toggl.py is a time report builder, taking data from [Toggl](toggl.com) time tracker using [reports API](https://github.com/toggl/toggl_api_docs/blob/master/reports.md).
It was created for internal use by students in Software Engineering program and tailored for acad... |
JavaScript | UTF-8 | 565 | 3.265625 | 3 | [] | no_license | /**
* @param {number} n
* @return {string[]}
*/
var generateParenthesis = function(n) {
let ret = [];
generate(n, n, '');
return ret;
function generate(left, right, s) {
if (left === 0 && right === 0) {
ret.push(s);
return;
}
if (left > right) return;... |
SQL | UTF-8 | 2,838 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 04, 2020 at 07:00 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... |
Python | UTF-8 | 3,369 | 4.15625 | 4 | [] | no_license | import string
import random
import re
def request_len():
"""
Prompts the user for the password length and returns the length as an int or -1 if input was invalid
:rtype: int
"""
length = input("Type in your desired password length:\n")
# if the input cannot be converted to an integer, it th... |
C# | UTF-8 | 2,916 | 2.671875 | 3 | [
"MIT"
] | permissive | using Timetabling.Internal.Specialized;
namespace Timetabling.Internal.Constraints
{
public class SameDays : TimeConstraint
{
public SameDays(int id, bool required, int penalty, int[] classes)
: base(id, required, penalty, classes)
{
}
protected override (int hardP... |
C# | UTF-8 | 5,118 | 2.859375 | 3 | [
"BSD-2-Clause"
] | permissive | using System;
using System.Linq;
using System.Collections.Generic;
namespace EmergenceGuardian.FFmpeg {
#region Interface
/// <summary>
/// Base class to implement a user interface for FFmpeg processes.
/// </summary>
public interface IUserInterfaceManager {
/// <summary>
/// Get... |
Java | UTF-8 | 2,039 | 1.984375 | 2 | [
"Apache-2.0"
] | permissive | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 配置跨域
*
* @author auto create
* @since 1.0, 2023-08-03 16:04:37
*/
public class AlipayCloudCloudrunStaticsiteCorsMo... |
Shell | UTF-8 | 361 | 2.859375 | 3 | [] | no_license | #!/bin/bash
echo "Deleting other version of nvidia drivers..."
sudo apt-get purge nvidia*
echo "Getting PPA..."
sudo add-apt-repository ppa:graphics-drivers
echo "Updating..."
sudo apt-get update && sudo apt-get upgrade
echo "Getting the driver"
sudo apt-get install nvidia-390
echo "Freezing driver version..."
sud... |
JavaScript | UTF-8 | 911 | 2.6875 | 3 | [] | no_license | import React from 'react'
import MenuBar from '../components/MenuBar.js'
import { Profile, Photos, Cocktails, Pokemon} from '../components/Pages.js'
class MainBox extends React.Component {
constructor(props){
super()
this.state = {
display: 'profile'
}
}
notDry = (e) => {
this.setS... |
PHP | UTF-8 | 3,776 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace SWindon\XmlToArray;
use DOMDocument;
class XmlToArray {
private $NAME_ATTRIBUTES = '@attributes';
private $NAME_CONTENT = '@value';
private $xml;
/**
* Convert a given XML String to Array
*
* @param string $xmlString
* @return array|boolean false for failure
... |
Markdown | UTF-8 | 8,285 | 2.796875 | 3 | [] | no_license | ---
layout: post
title: 7 Day Trip To Bhutan
subtitle: Paro, Thimpu, Punakha and Tiger's Nest
bigimg:
- "/img/bhutanhome.jpg"
tags: [Bhutan, travel]
---
{: .box-note}
***Bhutan:*** *Bhutan, a Buddhist kingdom on the Himalayas’ eastern edge, is known for its monasteries, fortresses (or dzongs) and dramatic landscap... |
Java | UTF-8 | 3,723 | 2.390625 | 2 | [] | no_license | package com.fxlc.zklm.test;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import com.fxlc.zklm.R;
import com.fxlc.zklm.bean.Truc... |
Java | UTF-8 | 263 | 1.835938 | 2 | [] | no_license | package com.itkweb.xwinga.service;
import java.util.List;
import java.util.Map;
import com.itkweb.xwinga.model.Box;
public interface XWingService {
public List<Box> getBoxList();
public void buildTeams(Map<Box, Integer> boxesSelection, int teamPoints);
}
|
Java | UTF-8 | 5,356 | 1.945313 | 2 | [] | no_license | package com.sweethill.orderstore.web.screens.productspecification;
import com.haulmont.cuba.core.app.UniqueNumbersService;
import com.haulmont.cuba.core.global.Metadata;
import com.haulmont.cuba.core.global.PersistenceHelper;
import com.haulmont.cuba.gui.Notifications;
import com.haulmont.cuba.gui.components.*;
import... |
Python | UTF-8 | 1,455 | 4.28125 | 4 | [] | no_license | # https://www.interviewcake.com/python-interview-questions
# Slicing lists from the end
# We want to run some analytics on our investments. To start, we're given a list containing
# the balance at the end of the day for some number of days. The last item in the list
# represents yesterday's closing balance and each pr... |
Java | UTF-8 | 570 | 3.453125 | 3 | [] | no_license | package BasicPrograms;
import java.util.Scanner;
public class WindChill {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter Temprature(Number Should be above 50)");
double t = sc.nextDouble();
System.out.println("Enter Wind Speed(Number Should be b... |
C# | UTF-8 | 1,513 | 2.78125 | 3 | [] | no_license | using System;
using KataWordWrap2;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace WordWrapTest
{
[TestClass]
public class WordWrapTest
{
[TestMethod]
public void WrapTest_WhenShort_ThenNoWrap()
{
Assert.AreEqual("text", Wrapper.Wrap("text", 10));
... |
TypeScript | UTF-8 | 650 | 2.546875 | 3 | [
"MIT"
] | permissive | import { Entity } from "../../../../../src/decorator/entity/Entity"
import { Index } from "../../../../../src/decorator/Index"
import { PrimaryGeneratedColumn } from "../../../../../src/decorator/columns/PrimaryGeneratedColumn"
import { Column } from "../../../../../src/decorator/columns/Column"
import { Profile } from... |
Python | UTF-8 | 13,273 | 2.875 | 3 | [] | no_license | import traceback
import MyPlane
import Enemy
import Supply
import random
import pygame
pygame.init()
pygame.mixer.init()
pygame.mixer.set_num_channels(20)
#主屏幕、背景
size=[width,height]=[480,700]
screen=pygame.display.set_mode(size)
pygame.display.set_caption("飞机大战".center(110))
bg_img=pygame.image.load(... |
Python | UTF-8 | 230 | 3.109375 | 3 | [] | no_license | index_of_synthesis = float(input())
if index_of_synthesis < 2:
print("Analytic")
elif index_of_synthesis <= 2 >= 3:
print("Synthetic")
elif index_of_synthesis > 3:
print("Polysynthetic")
else:
print("Checker.com") |
Python | UTF-8 | 3,866 | 3.25 | 3 | [] | no_license | """Calibration class """
import numpy as np
from pyspec.errors import CalibrationError
MIN_CALIBRATION_POINTS = 5
ACCEPTED_FORMATS = [".dat"]
class Calibration():
"""Computes and stores the wavelength solution for flux calibration
Clas methods
------------
from_file
Methods
-------
__in... |
Markdown | UTF-8 | 5,763 | 2.953125 | 3 | [
"MIT"
] | permissive | # SeedHq
[](https://travis-ci.org/cagosta/SeedHq)
## Introduction
Elegant customizable inheritance, attributes and events in JavaScript.
* **inheritance**, `Seed.extend` and the `'+method'` convention help you inherit fast and easily... |
Java | UTF-8 | 15,873 | 1.625 | 2 | [
"Apache-2.0",
"EPL-1.0"
] | permissive | /*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is a... |
Go | UTF-8 | 4,095 | 2.515625 | 3 | [] | no_license | package app
import (
"fmt"
"os"
"path"
"regexp"
"strings"
"github.com/ericsgagnon/qgenda/pkg/qgenda"
"github.com/spf13/viper"
"gopkg.in/yaml.v3"
)
// Config contains all app config parameters
type Config struct {
App AppConfig
Cache qgenda.CacheConfig
Client qgenda.ClientConfig
Logger Log... |
C++ | UTF-8 | 1,087 | 2.8125 | 3 | [] | no_license | #include "DataChecksum.h"
#include <fstream>
#include <iostream>
#include <sstream>
#include <boost/crc.hpp>
DataChecksum::DataChecksum()
{
//ctor
}
DataChecksum::~DataChecksum()
{
//dtor
}
void DataChecksum::addFile(std::string p_file)
{
m_files.push_back(p_file);
}
void DataChecksum::addFiles(std::vector... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.