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
Rust
UTF-8
6,412
3.515625
4
[ "BSD-3-Clause" ]
permissive
use std::cmp::Ordering; use std::fmt; use value::{ Value }; use error::{ RuntimeError, RuntimeResult }; use function::Callable; /// Operator kind. #[derive(PartialEq, Debug, Copy, Clone)] pub enum OperatorKind { /// Single argument operator, i.e negation. Unary { value: &'static str }, /// Two argument ope...
C++
UTF-8
771
2.546875
3
[]
no_license
#ifndef __RBLOCK_H__ #define __RBLOCK_H__ class Block { int x; int y; int c; public: Block(); void printBlock(); friend class BlockA; }; class BlockSet{ public: int blocknum; int x; int y; int c; int xarr[4]; int yarr[4]; }; class BlockA : public BlockSet{ static Block...
Java
UTF-8
230
1.53125
2
[]
no_license
package com.shopping.demo.entity; import lombok.Data; /** * @Author Gao * @Date 2021/2/12 23:49 * @Version 1.0 */ @Data public class OrderUser extends Order { private String userName; private String goodsName; }
Java
UTF-8
3,304
2.671875
3
[]
no_license
package com.cisco.eManager.common.event; import java.util.Date; import com.cisco.eManager.common.event.EventType; import com.cisco.eManager.common.event.EventSeverity; public abstract class AbstractEventMessage implements Comparable { private String displayText; private Date eventTime; private EventType ...
Python
UTF-8
358
3.234375
3
[]
no_license
planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'] print(planets[0:0]) # [] empty set print(planets[0:1]) # ['Mercury'] print(planets[0:]) # ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'] print(planets[:7]) # ['Mercury', 'Venus', 'Earth', 'Mars'...
Markdown
UTF-8
475
2.53125
3
[]
no_license
# terminal-emulator This is just a simple project to figure out how process creation in linux works ##Currently Working## * execute single or many processes with |, >, ;, &, && * execute ls and cd alone * file redirect and pipes with no more than two processes ##Broken## * more than two pipes causes zombie processe...
Markdown
UTF-8
6,705
2.65625
3
[ "CC-BY-3.0", "LicenseRef-scancode-generic-cla" ]
permissive
<properties pageTitle="開始在 Azure 入口網站中使用 Azure 排程器 | Microsoft Azure" description="" services="scheduler" documentationCenter=".NET" authors="krisragh" manager="dwrede" editor=""/> <tags ms.service="scheduler" ms.workload="infrastructure-services" ms.tgt_pltfrm="na" ms.devlang="dotnet" ms.topic="hero-articl...
Python
UTF-8
543
2.921875
3
[]
no_license
print("--- 1 ---") import my_package print("--- 2 ---") import my_package.my_module my_package.my_module.my_method() print("--- 3 ---") from my_package import my_module my_module.my_method() print("--- 4 ---") from my_package.my_module import my_method my_method() print("--- 5 ---") import my_package.my_subpac...
Shell
UTF-8
1,401
3.65625
4
[]
no_license
#!/bin/bash if [ "$1" == "" ] then echo "Usage: $0 releasetag" echo "" exit 1 fi if [[ $1 == v* ]] then echo "Bad releasetag. Use only numbers, like '33'" echo "" exit 1 fi RELEASEP=$1 if [ -d themes ] ; then echo "Removing old themes directory" rm -rf themes > /dev/null fi echo "...
Python
UTF-8
1,123
2.71875
3
[]
no_license
import os import seaborn as sns import numpy as np from PIL import Image from matplotlib import pyplot as plt from sklearn.decomposition import PCA from sklearn.manifold import TSNE images = [] filenames = [] folder = "imgs" for filename in os.listdir(folder): image = Image.open(folder + "/" + filename) ratio ...
Markdown
UTF-8
1,837
2.75
3
[]
no_license
--- title: Protetor Facial Face Shield - Proteção Covid 19 categoria: Equipamentos de segurança image: "/uploads/protetor-facial-face-shield.jpg" --- - Fácil higienização (água e alcool) - Suporte anatômico, firmeza na adaptação - Facilidade de respiração - Transparente, com maior campo de visão - Clareza na comunicaç...
Java
UTF-8
2,616
1.9375
2
[]
no_license
package com.nandasatria.api.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org...
Java
UTF-8
3,022
2.921875
3
[]
no_license
package controller; import java.io.FileReader; import java.util.Scanner; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Ite...
Markdown
UTF-8
1,634
2.765625
3
[]
no_license
# Introduction ![README](https://img.shields.io/badge/readme-release-blue.svg) This repository provides materials to be read before creating a repository in this **Data Driven Modelling UST GitHub**. You need to be included in the **Data Driven Modelling UST GitHub Member** list in order to have see **privite reposit...
Java
UTF-8
2,004
2.0625
2
[]
no_license
package fr.epsi.verbes; import android.content.SharedPreferences; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.TextView; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android....
C++
UTF-8
5,415
2.6875
3
[]
no_license
// // Created by zhoubin on 3/2/18. // #include <cstring> #include "Client.h" #include"ClientMes.h" #include"ServerMes.h" #include"Functools.h" #include<stdio.h> #define CLIENT_MES_SIZE 124 #define SERVER_MES_SIZE 124 using namespace std; void Client::Connect() { if(connect(m_connFd,(sockaddr *)&m_servAddr,s...
C++
UTF-8
1,914
3.578125
4
[]
no_license
#include "string.h" #include "iostream" #include "stdio.h" #include <fstream> using namespace std; void Cezar(char string [500]) //Caesar { char key; int shift; cout << "Enter the shift: "; cin >> shift; for (int i = 0; i < strlen(string); i++) //ENCODING { if (string[i] != 32) { string[i] += (shift % 26...
Java
UTF-8
375
1.789063
2
[]
no_license
package com.redhat.cdi.basic.resource; import com.redhat.cdi.util.Constants; import javax.ejb.Local; import javax.ws.rs.Consumes; import javax.ws.rs.ext.MessageBodyReader; import javax.ws.rs.ext.Provider; @Local @Provider @Consumes(Constants.MEDIA_TYPE_TEST_XML) public interface EJBBookReader extends MessageBodyRea...
Python
UTF-8
759
2.625
3
[]
no_license
import unittest import olap.xmla.utils as utils class TestUtils(unittest.TestCase): def testaslist(self): for x in ["Blah", None, {}, 7, (), set([1,2,3]), True]: self.assertIsInstance( utils.aslist(x), list) x = ["blah"] self.assertEqual( utils.aslist(x), x) def testsche...
C#
UTF-8
677
3.671875
4
[ "MIT" ]
permissive
namespace Tutorial.Introduction { using System; internal static partial class Functions { internal static int Add(int a, int b) // Pure. { return a + b; } internal static int AddWithLog(int a, int b) // Impure. { int result = a + b; ...
Java
UTF-8
12,337
1.53125
2
[]
no_license
package com.hongshi.wuliudidi.activity; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.L...
Go
UTF-8
2,326
2.515625
3
[ "Apache-2.0" ]
permissive
package command import ( "testing" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/ShotaKitazawa/minecraft-bot/pkg/botplug" "github.com/ShotaKitazawa/minecraft-bot/pkg/domain/i18n" "github.com/ShotaKitazawa/minecraft-bot/pkg/mock" ) var ( loggerForTestCommandTitle = logrus.New()...
Java
UTF-8
540
1.664063
2
[]
no_license
package com.bonc.product.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import com.bonc.product.domain.ActivityDetailTmp; @RepositoryRestReso...
Java
UTF-8
550
2.03125
2
[]
no_license
package gpath.store; import java.util.Comparator; import gpath.store.statistics.LabelStatistics; import gpath.store.statistics.Statistics; public interface StatisticsGraphStore extends GraphStore{ public Statistics getVertexStatistics(String labelname); public Statistics getEdgeStatistics(String labelname); ...
Python
UTF-8
104
3.84375
4
[]
no_license
word = input("Enter a word: ") number = int(input("Enter a number: ")) print(word[0] + word[-number:])
Markdown
UTF-8
3,882
2.75
3
[]
no_license
--- description: "Recipe of Award-winning Vegetable soup" title: "Recipe of Award-winning Vegetable soup" slug: 1534-recipe-of-award-winning-vegetable-soup date: 2021-03-09T22:54:34.189Z image: https://img-global.cpcdn.com/recipes/10baa69c263b174b/680x482cq70/vegetable-soup-recipe-main-photo.jpg thumbnail: https://img-...
Java
UTF-8
5,092
2.09375
2
[]
no_license
package com.zoptal.chinamoonbuffet.JsonClasses; import android.app.ProgressDialog; import android.content.Context; import android.os.AsyncTask; import android.util.Log; import com.zoptal.chinamoonbuffet.adapter.CustomListAdapter; import com.zoptal.chinamoonbuffet.url.RegisterUrl; import org.apache.http.HttpEntity; i...
Python
UTF-8
1,421
3.359375
3
[ "MIT" ]
permissive
from scope import Scope class Frame(object): def __init__(self, name, global_scope): self.name = name scope_name = '{0}_00'.format(name) self.current_scope = self.create_new_scope(scope_name, global_scope) self.scopes = [] self.scopes.append(self.current_scope) @static...
Markdown
UTF-8
5,829
2.796875
3
[ "Apache-2.0" ]
permissive
### Specification ||| | --- | --- | |Module name| dir-overlay-install | |Supports rollback|yes| |Requires restart|no| |Artifact generation script|yes| |Full system updater|no| |Source code|[Update Module](https://github.com/mirzak/dir-overlay-install/blob/master/modules/dir-overlay-install), [Artifact Generator](https...
Markdown
UTF-8
1,317
2.578125
3
[]
no_license
# Parsing-Solving-PlaningProblems This is the third step of my work related to MDPs and some famous solvers. In previous repositories I took a simple 'Maze-like' problem, I coded both a declarative and a generative description of the problem and I proposed some solvers to find the solution. Some of them use the declar...
Java
UTF-8
617
2.6875
3
[]
no_license
package stuff; public class Weapon { //Completely pointless at the moment private int x , y; private boolean visible; private boolean possessed; public void setPosition(){ x = 387; y = 287; } public int getX() { return x; } public int getY() { return y; } ...
C++
UTF-8
573
3.1875
3
[ "BSD-3-Clause" ]
permissive
#include "ActionStack.h" #include <exception> using namespace std; ActionStack::ActionStack() { current = -1; } ActionStack::~ActionStack() { } void ActionStack::push(Action* a) { this->elems.push_back(a); this->current++; this->size = this->current+1; } Action* ActionStack::pop() { if (current == -1) { th...
C++
UTF-8
765
3.390625
3
[]
no_license
//Problem Link:- https://leetcode.com/problems/search-a-2d-matrix/ #include<bits/stdc++.h> using namespace std; class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int left = 0; const int n = matrix.size(); const int m = matrix[0].size(); ...
C++
UTF-8
2,601
3.453125
3
[]
no_license
// // directedHashGraph.h // Tarjan // // Created by Alex Zabrodskiy on 4/24/17. // Copyright © 2017 Alex Zabrodskiy. All rights reserved. // // Implements the graph class in an ajacency list representation // #ifndef directedHashGraph_h #define directedHashGraph_h #include "graph.h" #include <unordered_set> #inc...
Ruby
UTF-8
1,913
2.859375
3
[ "MIT" ]
permissive
class Volunteer attr_accessor :name, :project_id attr_reader :id def initialize(attributes) @name = attributes.fetch(:name).downcase.capitalize! @project_id = attributes.fetch(:project_id) @id = attributes.fetch(:id) end def self.all returned_volunteers = DB.exec("SELECT * FROM volunteers;") v...
C++
UTF-8
2,051
2.671875
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/testapp.h> #include <vespa/messagebus/blob.h> #include <vespa/messagebus/blobref.h> using mbus::Blob; using mbus::BlobRef; TEST_SETUP(Test); Blob makeBlob(const char *txt) { B...
C#
UTF-8
1,578
2.5625
3
[]
no_license
using System.ComponentModel; using System.Runtime.CompilerServices; using SQLite.Net.Attributes; namespace PermisC.Models { public class Tracteur : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; [PrimaryKey, AutoIncrement] public int ID { get; se...
Java
UTF-8
500
1.6875
2
[]
no_license
package service; import java.util.List; import vo.PersonalVO; public interface PSService { List<PersonalVO> selectList(); PersonalVO selectOne(PersonalVO vo); int insert(PersonalVO vo); int update(PersonalVO vo); int delete(PersonalVO vo); int IdCheck(String id); int emailCheck...
C
UTF-8
1,291
4.5625
5
[]
no_license
/*EX8 converts the first letter of every word in a string to uppercase Write a function that converts the first letter of every word in a string to uppercase. Write a program that asks user to enter a string and then calls the function above. The program keeps asking for strings until user enters "stop" or "STOP". Whe...
C#
UTF-8
6,670
2.8125
3
[]
no_license
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using System.Text.RegularExpressions; namespace PagerControl { /// <summary> /// 分页控件 /// RecordCount: 记录总数 /// PageSi...
Rust
UTF-8
4,059
2.578125
3
[ "BSD-2-Clause", "MIT", "Apache-2.0" ]
permissive
// Copyright (c) 2021, COSIC-KU Leuven, Kasteelpark Arenberg 10, bus 2452, B-3001 Leuven-Heverlee, Belgium. // Copyright (c) 2021, Cosmian Tech SAS, 53-55 rue La Boétie, Paris, France. use anyhow::Context as _; use scasm::lexer::{Operand, Register, RegisterKind, RegisterStruct}; use std::collections::HashMap; use trac...
Markdown
UTF-8
64
2.78125
3
[]
no_license
# Responsive-Portfolio Homework #2 portfolio using media querys
Markdown
UTF-8
4,377
2.6875
3
[ "ICU", "LicenseRef-scancode-unknown-license-reference" ]
permissive
--- title: " DTOJ4131简单题\t\t" tags: - dp url: 6578.html id: 6578 categories: - Solution date: 2019-02-24 11:26:16 --- 对于一个初始局面,四个角都有格子或者一三行有连续两个格子都是不合法的。下面仅考虑合法局面。 对于一三行,显然这边不用考虑先后顺序影响。并且,每个联通块之间的答案均是独立的。我们考虑对于每个联通块分别作dp,最后再扣去这部分的方案数。 显然,每个联通块都是由第二行全空加上一三行的散块组成的。由于一三行可以在任意时间填入,现在我们要解决的是一三行填入对于第二行顺序的影响。 记$f\[i\]\[j...
Ruby
UTF-8
976
3
3
[]
no_license
require_relative 'views' class Interface attr_reader :view, :config attr_writer :mode, :running def initialize(config, parser, writer) @config = config @view = View.new @mode = '' @running = true @parser = parser @writer = writer end def call self.gree...
JavaScript
UTF-8
3,833
2.96875
3
[]
no_license
var content = document.getElementById("window"); var ctx = document.getElementById('content').getContext('2d'); var disp = document.getElementById('data'); var World = new BitSet(1600); var time_inactive = 0; content.scrollLeft = 50; content.scrollTop = 50; function mod(n,m) { return ((n % m) + m) % m; } func...
Markdown
UTF-8
1,087
2.53125
3
[ "Apache-2.0" ]
permissive
# Webpack的概念与安装 ###为什么需要webpack? 工程复杂度增加了,难度增加了,项目人也变多了。 ###前端工程化 什么是前端工程化? 工程化是系统化,模块化,规范化的过程。 工程化主要解决"如何提高整个系统生产效率"的问题. 前端工程化的改变在哪些方面? 工具: 需要用到更多的自动化机械,更多的脚手架 人员:协作的人开始变得很多,需要有一定的机制保障合作的顺畅 写代码的方式: 大量的用到预制模板,用组件化的方式写项目 ###Webpack主要功能 1. 编译,包括javascript的编译,css编译 2. 文件的压缩,打包,合并,公共模块提取等 3. 图片等资源处理如压缩,合并雪碧图等 4....
C#
UTF-8
431
3.109375
3
[]
no_license
using System; using System.IO; namespace FileEx3 { class MainClass { public static void Main (string[] args) { TextReader input = new StreamReader ("1MB.txt"); TextWriter output = new StreamWriter ("1mbDup.txt"); char[] buffer = new char[500]; int read; while ((read = input.Read(buffer, 0, buffer...
PHP
UTF-8
976
2.703125
3
[]
no_license
<?php require_once("datosConexion.php"); require("headers.php"); $datos = json_decode(file_get_contents("php://input")); $mysqli = new mysqli($host, $user, $pass, $database); $sql = "INSERT INTO ventas (%s) values (%s); "; $i = 0; $sqli = ""; foreach ($datos as $dato => $value) { $valores = ""; $camp...
Java
UTF-8
55,102
1.671875
2
[ "MIT" ]
permissive
/** * Copyright (C) 2002-2015 The FreeCol Team * * This file is part of FreeCol. * * FreeCol is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at yo...
Java
UTF-8
864
2.953125
3
[]
no_license
package leetcode.d78; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Solution { public List<List<Integer>> subsets(int[] nums) { List<List<Integer>> result = new ArrayList<>(); if(nums == null || nums.length == 0){ return result; } ...
C++
UTF-8
1,889
3.75
4
[]
no_license
/* * File: main.cpp * Author: Daniel Wallander * * Created on January 17, 2018, 6:12 PM */ #include <iostream> using namespace std; int main(int argc, char** argv) { string name1,name2,name3; int time1,time2,time3; cout <<"Type the first name of the first runner: "; cin >>name1; cout...
Markdown
UTF-8
1,687
2.6875
3
[ "MIT", "BSD-3-Clause" ]
permissive
--- layout: post title: The sea is the sea date: 2018-10-18 00:01:00.000000000 +08:00 type: post published: true status: publish categories: - blog tags: [poem, puisi, yuna] --- This is an intro from one of the Yuna's songs. A deep parable. <br><br> <hr> <br> Sometimes you find yourself trying to let go of something <...
TypeScript
UTF-8
485
2.71875
3
[]
no_license
import { BaseCommandInteraction, Message } from 'discord.js'; export default interface Command { /** * List of aliases for the command. * The first name in the list is the primary command name. */ readonly commandNames: string[]; readonly data?: any; // Usage documentation help(commandPrefix: string...
Java
UTF-8
1,213
3.515625
4
[]
no_license
import java.util.Random; public class largest { private int[] nums; private Random rand = new Random(); public largest(int[] numbers) { this.numbers = numbers; } //find the nth largest number using quickSelect public int nthLargest(int n) throws Exception { if (n >= this.nums.length) { th...
Markdown
UTF-8
1,074
2.796875
3
[]
no_license
--- title: Linux 判断是否安装某个软件 date: 2018-06-27 18:15:26 tags: [linux] --- Linux 中如果想要判断某个软件是否安装过,可以使用 `command` 命令 <!-- more --><!-- toc --> **使用** ```bash $ command -pvV command [arg ...] ``` **实例** ```bash $ command -v java /usr/bin/java $ command -V java java is /usr/bin/java $ command -p java Usage: java [-o...
Java
UTF-8
1,503
2.078125
2
[ "Apache-2.0" ]
permissive
/******************************************************************************* * Copyright (c) 2006-2010 eBay Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at...
Ruby
UTF-8
256
2.90625
3
[]
no_license
_, m = gets.split.map(&:to_i) a = gets.split.map(&:to_i) while m > 0 i = a.index(a.max) tmp_a = a.clone tmp_a.delete(a.max) second_max = tmp_a.max while m > 0 && a[i] > second_max a[i] = (a[i] / 2).floor m -= 1 end end puts a.inject(:+)
Markdown
UTF-8
1,101
3.40625
3
[ "MIT" ]
permissive
--- layout: post title: "04: Function Design Recipe (FDR)" category: "DV/Python" comments: true tags: [python] feature-img: "assets/img/3.jpg" feature-title: "" use_math: true series: "Python Basic" summary: "파이썬에서 변수는 어떻게 구성되어 있을까?" --- # Function Design Recipe (FDR) 우리는 파이썬에서 제공하는 다양한 내장 함수들에 대한 설명을 보고싶을때, `help()`...
C
UTF-8
226
3.515625
4
[]
no_license
#include "holberton.h" #include <stdio.h> /** * _abs - computes de absolute value of an integer *@n: is a variable * Return: Always 0. * */ int _abs(int n) { if (n >= 0) { return (n); } else { return (-n); } }
C#
UTF-8
747
2.953125
3
[]
no_license
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace person { public class Person { private string name; private string photo; public Person(string aName) { Name = aName; P...
Markdown
UTF-8
1,509
4.125
4
[]
no_license
--- title: C++ Vector begin() function permalink: /cpp-vector-begin --- ## C++ Vector begin() Function <br/><br/> The C++ vector.begin() function returns an iterator to the first element of a vector. This function takes no parameters. If the vector is empty, the returned iterator will be equal to end(). <br/><br/> ...
PHP
UTF-8
4,423
2.515625
3
[]
no_license
<?php /** * Auto generated from m2maas.proto at 2018-07-02 09:18:05 * * mapgoo.mlb.m2maas.request.data package */ namespace Mapgoo\Mlb\M2maas\Request\Data { /** * RequestBaseInfo message */ class RequestBaseInfo extends \ProtobufMessage { /* Field index constants */ const MESSAGEID = 1; const SOURETY...
Java
UTF-8
438
1.929688
2
[]
no_license
package esadrcanfer.us.alumno.autotesting.inagraph.actions; import androidx.test.uiautomator.UiObject; import androidx.test.uiautomator.UiObjectNotFoundException; public class SpinnerAction extends Action { public SpinnerAction(UiObject spinner) { super(spinner, ActionType.SPINNER); } public voi...
Java
UTF-8
7,468
1.890625
2
[ "MIT" ]
permissive
package fr.adrienbrault.idea.symfony2plugin.util.completion; import com.intellij.codeInsight.completion.CompletionResultSet; import com.intellij.codeInsight.completion.CompletionUtil; import com.intellij.codeInsight.completion.InsertHandler; import com.intellij.codeInsight.completion.InsertionContext; import com.intel...
C++
UTF-8
631
2.65625
3
[]
no_license
#pragma once #include <SFML/Graphics.hpp> #include "imgui.h" #include "imgui-SFML.h" #include "window.h" class GameBase { private: Window window; protected: // Sets up anything needed for the window. virtual void setup() = 0; // Updates anything needed for the current class. ...
C++
UTF-8
417
2.765625
3
[]
no_license
#ifndef PRODUCT_H #define PRODUCT_H #include <QString> class Product { private: QString id; QString nameProduct; double priceProduct; public: Product(); QString getId() const; void setId(const QString &value); QString getNameProduct() const; void setNameProduct(const QString &value); ...
JavaScript
UTF-8
3,511
3.75
4
[]
no_license
// Function constructor /* var john = { name: 'John', yearOfBirth: 1990, job: 'teacher' }; var Person = function(name, yearOfBirth, job) { this.name = name; this.yearOfBirth = yearOfBirth; this.job = job; }; Person.prototype.calculateAge = function() { console.log(2016 - this.yearOfBi...
JavaScript
UTF-8
764
2.515625
3
[]
no_license
const express = require('express'); const app = express(); const mongoose = require('mongoose'); const bodyParser = require('body-parser'); const cors = require('cors'); require('dotenv/config'); //Any time we hit any request //Middlewares app.use(cors()); app.use(bodyParser.json()); //Import Routes const personsRout...
Python
UTF-8
518
2.921875
3
[]
no_license
n=int(input()) x=input().split(' ') y=input().split(' ') a=[] i=0 while i<n: a.append(int(x[i])) i=i+1 b=[] i=0 while i<n: b.append(int(y[i])) i=i+1 a.sort() b.sort() c=[] i=0 while i<n: c.append((i+1)*(n-i)) i=i+1 s=0 mod=998244353 i=0 ts=0 while i<n: ts=(...
Java
UTF-8
368
2.265625
2
[]
no_license
package graph.link; import graph.node.INode; public interface IEdge { /** * gets owner node * @return */ public INode getOwnerNode(); /** * gets owner id * @return */ public int getOwnerId(); /** * gets linked node * @return */ public INode getLinkedNode(); /** * gets cost of this e...
Java
UTF-8
841
2.953125
3
[]
no_license
package com.javarush.task.task22.task2210; import java.util.StringTokenizer; /* StringTokenizer */ public class Solution { public static void main(String[] args) { /*int count = getTokens("level22.lesson13.task01", ".").length; String[] arch = getTokens("level22.lesson13.task01", "."); fo...
Python
UTF-8
1,613
2.546875
3
[]
no_license
from mcpi.minecraft import Minecraft import mcpi.block as block #pos.x,pos.y,pos.z def roof(x0,y0,z0,L,W,H,M): p=open("roof.csv",'r').read().split('\n') a=-1 for i in p: a=a+1 b=-1 for j in i: b=b+1 if j=='1': mc.setBlock (x0+1+b,y0+H,z0+a,M) ...
Java
UTF-8
626
2.25
2
[]
no_license
package com.edm.order.service; import java.util.ArrayList; import java.util.List; import java.util.UUID; import javax.inject.Inject; import javax.inject.Named; import javax.validation.constraints.NotNull; import com.edm.order.domain.Order; import com.edm.order.repo.OrderRepository; @Named public class OrderQuerySer...
Java
UTF-8
5,766
2.109375
2
[]
no_license
/* */ package org.jfree.data.jdbc; /* */ /* */ import java.sql.Connection; /* */ import java.sql.DriverManager; /* */ import java.sql.ResultSet; /* */ import java.sql.ResultSetMetaData; /* */ import java.sql.SQLException; /* */ import java.sql.Statement; /* */ import java.sql.Timest...
Python
UTF-8
3,960
2.609375
3
[]
no_license
import ctypes import numpy as np import pandas as pd import codecs import os ##工具 lib_lcs = ctypes.CDLL('lcs.so') dict_word2vec = None ndim_word2vec = None set_wr = None dict_wordsame = None set_stopword = None #lcs def make_carray(s): n = len(s) array = (ctypes.c_int*n)() for i in range(n): array[i] = ord(s[i]...
Java
UTF-8
2,208
2.046875
2
[ "MIT" ]
permissive
package com.example.waygmaptest; import androidx.annotation.NonNull; import androidx.annotation.UiThread; import androidx.appcompat.app.AppCompatActivity; import android.graphics.Color; import android.graphics.PointF; import android.os.Bundle; import com.naver.maps.geometry.LatLng; import com.naver.maps.map.MapFragm...
JavaScript
UTF-8
333
3.546875
4
[]
no_license
function delayAdd(n1, n2, delayTime) { let p = new Promise(function(resolve, reject) { setTimeout(function() { resolve(n1 + n2) }, delayTime) }) return p } async function test() { // await 回傳 Promise 對象 let result = await delayAdd(2, 5, 2000) console.log(result) } t...
Markdown
UTF-8
1,464
3.15625
3
[]
no_license
# fillit 42 School project How to fit an elephant in a glass of whiskey ? Fillit is a project who let you discover and/or familiarize yourself with a recurring problematic in programming : searching for the optimal solution among a huge set of pos- sibilities. In this particular project, we have to create an algorit...
C++
UTF-8
2,423
2.578125
3
[]
no_license
// // Created by stone on 11/12/19. // // #include <uv.h> #include "portfolio.h" typedef uint64_t uv_timeval64_t; uv_timeval64_t tv; void uv_gettimeofday(uv_timeval64_t* tv) { UNUSED(tv); } namespace portfolio { Int2SessionMap gOnlineSession; String2SessionMap gRawSession; String2Interface gIfMap; String2Soft...
Java
UTF-8
1,538
3.4375
3
[]
no_license
import java.util.HashSet; import java.util.Queue; public class Solution { /** * @param n: An integer * @param edges: a list of undirected edges * @return: true if it's a valid tree, or false */ public boolean validTree(int n, int[][] edges) { // write your code here if(n==0...
C
UTF-8
428
2.6875
3
[ "MIT" ]
permissive
#pragma once #include <stdint.h> /* Save linear float 32 bit data represented as a single channeled (r32) * rectangle of width x height size to Radiance HDR RGBE image format * replicating color across other channels. * * https://en.wikipedia.org/wiki/RGBE_image_format * * Returns 0 on success. * */ int image_...
PHP
UTF-8
1,431
2.65625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class SurveyRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the...
Java
UTF-8
255
1.625
2
[]
no_license
package com.myschool.web.application.constants; /** * The Class OrganizationViewNames. */ public class OrganizationViewNames { /** The Constant MANAGE_ORGANIZATION. */ public static final String MANAGE_ORGANIZATION = "manage_organization"; }
C++
UTF-8
4,405
3.65625
4
[]
no_license
/* * Author: cc * Date : 2015-03-01 * Source: https://oj.leetcode.com/problems/valid-sudoku/ * Description: * The Sudoku board could be partially filled, where empty cells are filled with the character '.'. * * each row, col, 3 * 3 grids should only contain 0 ~ 9 * * A partially filled sudoku which is valid...
C
UTF-8
962
3.53125
4
[]
no_license
/* * readAndClear.c * * Created on: 10.07.2018 * Author: Dominik */ #include "readAndClear.h" #include <stdio.h> #include <stdlib.h> void clearChar() { char c; while ((c = getchar()) != '\n' && c != EOF) { } } int scanInt(char* message) { int read = -1; int readChars = 0; while (...
Java
GB18030
3,554
2.109375
2
[]
no_license
package org.keyuan.entity; import java.io.Serializable; import java.util.Date; import org.compass.annotations.Index; import org.compass.annotations.Searchable; import org.compass.annotations.SearchableProperty; import org.compass.annotations.Store; @Searchable(root=false) public class BookDetail implement...
Python
UTF-8
1,389
3.09375
3
[ "MIT" ]
permissive
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 8 13:46:02 2019 @author: lianghao """ # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Data PreProcessing dataset = pd.read_csv("Ads_CTR_Optimisation.csv") # Implementing UCB # number of ads imp...
Java
UTF-8
395
2.890625
3
[]
no_license
public enum VehicleType { SEDAN("Sedan", 39.99), TRUCK_OR_VAN("Truck or van", 49.99), SUV("SUV", 42.99); private final String name; private final double fee; private VehicleType(String name, double fee) { this.name = name; this.fee = fee; } public String getName() { re...
Markdown
UTF-8
5,800
3.09375
3
[]
no_license
--- ID: 5060 post_title: > How to Insert Sheet in Microsoft Excel 365? author: Indhuja R post_excerpt: "" layout: post permalink: > https://geekexcel.com/how-to-insert-sheet-in-microsoft-excel-365/ published: true post_date: 2020-03-17 17:31:04 --- <h2>Insert Sheet in Excel:</h2> In this article, we describe <str...
Java
UTF-8
786
2.296875
2
[]
no_license
public Object configure(Object obj) throws Exception { // Check the class of the object Class<?> oClass = nodeClass(_root); if (oClass != null && !oClass.isInstance(obj)) { String loaders = (oClass.getClassLoader()==obj.getClass().getClassL...
C#
UTF-8
1,712
2.734375
3
[]
no_license
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerHealth : MonoBehaviour { public int health = 100; public HealthBar healthBar; int lastHealth; int targetHealth; bool canDrain = false; bool canAdd = false; void Start() { healthBar...
Java
UTF-8
1,818
2.390625
2
[]
no_license
package com.example.movieslist; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.wi...
C
UTF-8
1,809
3.109375
3
[]
no_license
#include "cbc-decrypt.h" #include "aes.h" #include <stdio.h> #include <string.h> /* The input ciphertext is assumed to have length an integer multiple of the blocklength. The code below is not robust to buffer-overflow attacks; exploiting these is not the purpose of this exercise */ int cbcdec(unsigned char...
Python
UTF-8
6,579
2.75
3
[ "BSD-3-Clause" ]
permissive
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import sys from django.utils.encoding import smart_str from harness import MockRouter, EchoApp from rapidsms.backends.backend import Backend from rapidsms.message import Message import unittest, re try: from django.test import TestCase except: from unittest import Te...
PHP
UTF-8
1,867
3.1875
3
[]
no_license
<?php class person{ var $fname; var $lname; var $othername; var $email; var $country; var $city; var $location; var $postaladdress; var $tel; function __construct() { $this->fname = ""; $this->lname = ""; $this->othername = ""; $this->email = ...
C#
UTF-8
2,491
2.609375
3
[]
no_license
using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text; namespace WeddingWebsiteCore.Models { [Table("addresses")] public class Address { public int AddressId { get; set; } [Column("n...
Java
UTF-8
1,426
1.757813
2
[ "Apache-2.0" ]
permissive
package com.walmartlabs.concord.plugins.git.v1; /*- * ***** * Concord * ----- * Copyright (C) 2017 - 2020 Walmart Inc. * ----- * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
Java
UTF-8
36,256
1.523438
2
[]
no_license
package com.example.myapplicationpln.fragment; import android.app.Dialog; import android.app.ProgressDialog; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.Vie...
Java
UTF-8
6,966
2.234375
2
[]
no_license
package com.oreo.paint; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import androidx.annotation.Nullable; import com.oreo.paint.settings.Abstra...
JavaScript
UTF-8
7,474
2.546875
3
[]
no_license
const botconfig = require("./botconfig.json"); const Discord = require("discord.js"); const {Client, RichEmbed} = require(`discord.js`); const bot = new Discord.Client({disableEveryone: true}); bot.on("ready", async () => { console.log(`${bot.user.username} is online!`); bot.user.setActivity("Monopoly.");...