prompt stringlengths 1.3k 3.64k | language stringclasses 16
values | label int64 -1 5 | text stringlengths 14 130k |
|---|---|---|---|
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 2 | {% extends "layout.html" %}
{% block heading %}
Channels
{% endblock %}
{% block body %}
<h5>Welcome {{username}}! Here are the channels you can join:</h5>
<ul>
{% for channel in channels %}
<a href="{{ url_for('channel_details', channel_name=channel) }}"><li>{{ channel }}</li></a>... |
Below is an extract from a Markdown document. Evaluate its educational value, considering both Markdown usage and the content itself. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document uses basic Markdown syntax cor... | markdown | 1 | ---
layout: post
comments: true
categories: Other
---
## Download Overage finders fee agreements book
On the nightstand stood a stainless-steel carafe beaded with condensation. He said if I would work for him and carry his trunk, with a long article on betrization. Finally, than I had a look at various equipment for ... |
Below is an extract from a PHP program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid PHP code, even if it's not educa... | php | 2 | <?php
/**
* Created by PhpStorm.
* User: imanu
* Date: 04.11.2017
* Time: 00:20
*/
namespace Jinya\Components\DataTables;
use Symfony\Component\HttpFoundation\Request;
class DatatablesRequestParser implements DatatablesRequestParserInterface
{
/**
* {@inheritdoc}
*/
public function parseReques... |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 3 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Keyboard Trap Fix Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text... |
Below is an extract from a Go program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Go code, even if it's not educati... | go | 3 | package api
type NotifierApi interface {
Notify(Target string, Message string) (StatusCode int, Error error)
}
|
Below is an extract from a C++ program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C++ code, even if it's not educa... | cpp | 2 | /*
* Settlers3D - Copyright (C) 2001-2003 <NAME> (<EMAIL>)
*
* This program 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 your option)
* any later versi... |
Below is an extract from a Markdown document. Evaluate its educational value, considering both Markdown usage and the content itself. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document uses basic Markdown syntax cor... | markdown | 3 | # LogsArithmeticProcessor
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Expression** | Pointer to **string** | Arithmetic operation between one or more log attributes. |
**IsEnabled** | Pointer to **bool** | Whether or not the processor is enabled. | [... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 2 | use std::env::var;
use std::fs::File;
use std::io::BufReader;
#[allow(dead_code)]
pub fn open_assets_file(name: &str) -> anyhow::Result<std::io::BufReader<std::fs::File>> {
let path = format!(
"{}/tests/assets/{}",
var("CARGO_MANIFEST_DIR").expect("No environment value `CARGO_MANIFEST_DIR`"),
... |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 2 | //
// yellow1ViewController.swift
// createPlaylist NightHack4 kwk2020
//
// Created by <NAME> on 7/14/20.
// Copyright © 2020 <NAME>. All rights reserved.
//
import UIKit
class yellow1ViewController: UIViewController {
@IBOutlet var yesterday: UIImageView!
@IBOutlet var bbibbi: UIImageView!
... |
Below is an extract from a TypeScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid TypeScript code, even if ... | typescript | 2 |
import { Injectable } from "@angular/core";
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from "@angular/router";
import { Observable } from "rxjs/Observable";
import { IProduct } from "./product";
import { ProductService } from "./product-service";
@Injectable()
export class ProductListCanResolveGu... |
Below is an extract from a shell script. Evaluate whether it has a high educational value and could help teach shell scripting. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the script contains valid shell commands, even if... | shell | 2 | #!/usr/bin/env bash
env GOOS=linux GOARCH=amd64 go build -o out/linux_64_my_ip
env GOOS=windows GOARCH=amd64 go build -o out/windows_64_my_ip.exe |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 1 | //
// RepositoryRequest.swift
//
import Foundation
class RepositoryFactory {
static let globalDataRepository = GlobalDataRepository()
static let globalSocketRepostitory = GlobalSocketRepository()
static let commonRepository = CommonRepository()
static let transcriptionRepository = TranscriptionReposi... |
Below is an extract from a Ruby program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Ruby code, even if it's not edu... | ruby | 3 | require 'nokogiri'
require 'pry'
require 'pry-nav'
class Import
def initialize(gpxFile, route_id = nil)
@gpxFile = gpxFile
@route_id = route_id
@points = []
end
def initializer
parse
if @route_id
create_run(@route_id)
else
create_route
create_run(@route.id)
end ... |
Below is an extract from a Ruby program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Ruby code, even if it's not edu... | ruby | -1 | module TagsHelper
def tags_hash
return @tags_hash if @tags_hash
@tags_hash = {}
posts.each do |post|
post.tags.each do |tag|
@tags_hash[tag] ||=0
@tags_hash[tag] += 1
end if post.tags
end
@tags_hash
end
def write_tags(page)
output = page.tags.collect do |t|
... |
Below is an extract from a Java program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Java code, even if it's not edu... | java | 1 | package co.com.edutva.ctl;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import org.apache.log4j.Logger;
import org.zkoss.zk.ui.Component;
import org.z... |
Below is an extract of SQL code. Evaluate whether it has a high educational value and could help teach SQL and database concepts. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the code contains valid SQL syntax, even if it'... | sql | 4 | DESC you;
--查询表中所有数据SELECT*FROM 表名;
SELECT*FROM you;
SELECT*FROM stu;
--插入操作 INSERT
--向表you中插入信息
--INSERT INTO 表名(列名1。。。) VALUES(列值1。。。);
INSERT INTO you(my1,my2,my3,my4,my5,my6,my7,my8,my9)
VALUES(1,'me','i am',20.55,'what a you doing?','10:10:10','1999-10-11','1999-10-10 10:10:10','ewadadsad');
--查看数据库编码的具体... |
Below is an extract from a JavaScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid JavaScript code, even if ... | javascript | 2 | angular.module('OpenPlanModalService', ['ui.bootstrap'])
.service('openPlanModal', ['$uibModal', function($uibModal) {
var self = this;
self.open = function(title, plans, openFn) {
var modalInstance = $uibModal.open({
templateUrl: 'js/modals/open-plan/open-plan-modal.html',
ani... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 4 | use crate::vector::Vector3;
use crate::ray::Ray;
use crate::sphere::HitRecord;
use rand::Rng;
#[derive(Copy, Clone, Debug)]
pub enum SurfaceType {
Diffuse,
Reflective { fuzz: f64 },
Refractive { ref_idx: f64 }
}
#[derive(Copy, Clone, Debug)]
pub struct Material {
pub albedo: Vector3,
pub surface: SurfaceTyp... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 4 | use super::addres_mode::AddressMode;
use super::instruction::Instruction;
use super::Cpu6502;
use std::collections::HashMap;
const HEX_TABLE: &str = "0123456789ABCDEF";
fn to_hex(value: u32, hex_size: u8) -> String {
let mut temp_value = value;
let mut text = Vec::<u8>::new();
// inicia o array com o ta... |
Below is an extract of SQL code. Evaluate whether it has a high educational value and could help teach SQL and database concepts. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the code contains valid SQL syntax, even if it'... | sql | 2 | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2019 at 11:26 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
Below is an extract from a Java program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Java code, even if it's not edu... | java | 3 | package riparazioni;
import java.util.Arrays;
public class DittaRiparazioni {
private Tecnico[] tecnici;
private int numTecnici;
private Riparazione[] riparazioni;
private int numRiparazioni;
public DittaRiparazioni(Riparazione[] riparazioni, Tecnico[] tecnici){
this.tecnici = tecnici;... |
Below is an extract of SQL code. Evaluate whether it has a high educational value and could help teach SQL and database concepts. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the code contains valid SQL syntax, even if it'... | sql | 1 | PROMPT LOG TO F900_00_LOGGER.log
PROMPT .
SET AUTOCOMMIT OFF
SET AUTOPRINT ON
SET ECHO ON
SET FEEDBACK ON
SET PAUSE OFF
SET SERVEROUTPUT ON SIZE 1000000
SET TERMOUT ON
SET TRIMOUT ON
SET VERIFY ON
SET trims on pagesize 3000
SET auto off
SET verify off echo off define on
WHENEVER OSERROR EXIT FAILURE ROLLBACK
WHENEVER S... |
Below is an extract from a C program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C code, even if it's not education... | c | 3 | /*
* player.c
*
* Created on: 10 mars 2020
* Author: korantin
*/
#include "player.h"
uint8_t moveShipLR(t_character *tab_ship, uint8_t way, t_pos old_pos) {
if (way == LEFT) {
tab_ship[old_pos - 1] = tab_ship[old_pos];
tab_ship[old_pos] = ' ';
old_pos -= 1;
} else if (way == RIGHT) {
tab_ship[o... |
Below is an extract from a C# program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
Add 1 point if the program contains valid C# code, even if it's not education... | csharp | 1 | public interface ISwitch
{
} |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 2 | <!DOCTYPE html><html lang="zh-CN"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobil... |
Below is an extract from a shell script. Evaluate whether it has a high educational value and could help teach shell scripting. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the script contains valid shell commands, even if... | shell | 3 | #!/usr/bin/env bash
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you ... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 3 | // for the capital I
#![allow(non_snake_case)]
use nalgebra as na;
use na::{ Vector3 };
use crate::scene::Light;
pub struct PointLight {
// Intensity (color)
pub I: Vector3<f64>,
// Position in space:
pub p: Vector3<f64>
}
impl PointLight {
pub fn new(I: Vector3<f64>, p: Vector3<f64>) -> PointLigh... |
Below is an extract from a PHP program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid PHP code, even if it's not educa... | php | 2 | <?php
namespace Khill\Lavacharts\Tests\Dashboards\Filters;
use \Khill\Lavacharts\Dashboards\Filters\ChartRangeFilter;
use \Khill\Lavacharts\Tests\ProvidersTestCase;
class ChartRangeFilterTest extends ProvidersTestCase
{
public function testSettingColumnIndexWithConstructor()
{
$chartRangeFilter = new... |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 1 | <html><header><meta charset="utf-8"><title>中資股紛設黨委 凌駕公司利益</title></header><body><h1>中資股紛設黨委 凌駕公司利益</h1><p>【本報訊】為加強在港上市內企的影響力,近年最具體一招,無疑是將黨委工作寫入公司章程,藉此明確黨委在公司之職責,令不少內企的政治主導凌駕於企業經濟利益。</p><p>翻查今年內企公告,不少銀行在章程上已加入黨建工作,當中包括央企持有的銀行如光大銀行(6818)等。事實上,近年城商行已陸續加入黨委,有分析指由於過往城商行偏好向國企或龍頭企業貸款,故加強黨委控制、甚至凌駕城商行管理層,可有助增加小微貸款,並讓利予企業,以推動政府經... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 2 | use super::widget::Widget;
use utils::shared::{share, Shared};
use std::rc::Rc;
pub fn widget_of<T>(child: T) -> Shared<T> where T: Widget + 'static {
let shared_ref: Shared<T> = share(child);
{
let widget_ref: Shared<Widget> = shared_ref.clone() as Shared<Widget>;
shared_ref.borrow_mut().set_this(Rc::downgrade(... |
Below is an extract from a Go program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Go code, even if it's not educati... | go | 4 | /*
Copyright (c) 2017 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicen... |
Below is an extract from a Markdown document. Evaluate its educational value, considering both Markdown usage and the content itself. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document uses basic Markdown syntax cor... | markdown | 1 | # MAE-494-Team-Eagle
Files developed for UAH MAE 494 course
|
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 4 | use std::collections::HashMap;
struct BiMap {
char_codes_to_bytes: HashMap<char, u8>,
bytes_to_char_codes: HashMap<u8, char>,
}
impl BiMap {
fn new() -> BiMap {
BiMap{
char_codes_to_bytes: HashMap::new(),
bytes_to_char_codes: HashMap::new(),
}
}
fn insert(&mut self, ch: char, code: u8... |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 2 | //
// MYTPoCTests.swift
// MYTPoCTests
//
// Created by Mukesh on 27/05/18.
// Copyright © 2018 murugananda. All rights reserved.
//
import XCTest
@testable import MYTPoC
class MYTPoCTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called be... |
Below is an extract from a JavaScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid JavaScript code, even if ... | javascript | 2 | var mySql = require('mysql');
require = ('dotenv/config');
var connect = mySql.createConnection({
host:'localhost',
user:'Kuzmanoska',
password:'<PASSWORD>',
database:'bank'
});
connect.connect((error)=>{
if(error){
console.log('Problem with DataBase connection:' + error.message)
}
... |
Below is an extract from a Go program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Go code, even if it's not educati... | go | 3 | package Formatter
import (
"beego/app/models"
)
func UserFormatter(model models.User) map[string]interface{} {
return map[string]interface{}{
"id" : model.Id,
"name" : model.Name,
"mobile" : model.Mobile,
"password" : model.Password,
"created_at" : model.CreatedAt,
}
}
|
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 3 | <html>
<head>
<title>Free ClickPLAY Quickfire 1 flash arcade game.</title>
<link href=".././main.css" media="all" rel="stylesheet" type="text/css" />
<script src="http://www3.boysofts.com/games/intl/blogger/analytics.js"></script>
</head>
<body>
<h1 id="logo">
<a href="">Free flash games.</a>
</h1>
<p id="s">Play free ... |
Below is an extract from a Markdown document. Evaluate its educational value, considering both Markdown usage and the content itself. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document uses basic Markdown syntax cor... | markdown | 2 | ---
layout: singleidea
authors: [RGRN]
category: [vanilla]
tags: [pit, ranged combat]
---
Creatures in pits are very hard to hit with projectiles.
|
Below is an extract from a C program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C code, even if it's not education... | c | 1 | ../plc-src/POUS.h |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 3 | <!DOCTYPE html>
<html>
<head>
<title>Smart Start</title>
<link rel="stylesheet" type="text/css" href="CSS/Style.css">
</head>
<body>
<header id="main-header">
<div class="container">
<h1 id="mywebsite">My Website</h1>
<div id="weer">
<div id="location"></div>
<h1 id="temp"></h1>
<div id=... |
Below is an extract from a PHP program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid PHP code, even if it's not educa... | php | 1 | <?php
/* modular/section_title.html.twig */
class __TwigTemplate_d45ccb5cad16493cdcdfeb56c9464ee4eefc177394e7de5d26ab4f64a77a7b6a extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
... |
Below is an extract from a C program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C code, even if it's not education... | c | 1 | typedef struct
{
unsigned int value:26;
}
int26;
typedef struct
{
unsigned int value:16;
}
int16;
typedef struct
{
unsigned int value:4;
}
int4;
typedef struct
{
unsigned int addr:22;
}
virtualAddr; |
Below is an extract from a Go program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Go code, even if it's not educati... | go | 3 | package db
import (
"database/sql"
"github.com/MninaTB/dnadb/intern/model"
)
const (
selectBreed = `SELECT id, name, mail, internet, country FROM breed`
selectBreedByID = selectBreed + ` WHERE id = ?`
deleteBreedByID = `DELETE FROM breed WHERE id = ?`
insertBreed = `INSERT INTO breed (id, name, mail, i... |
Below is an extract from a Java program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Java code, even if it's not edu... | java | -1 | package curs5;
public class TestCalculator {
public static void main(String[] args) {
Calculator calc = new Calculator();
calc.askTheUser();
calc.calculateValues();
calc.printResult();
}
}
|
Below is an extract from a C# program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
Add 1 point if the program contains valid C# code, even if it's not education... | csharp | 1 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataModels;
using LiteDbService.Interfaces;
using LiteDB;
namespace LiteDbService
{
public class TestLiteManagerService : LiteManagerService
{
public TestLiteManagerService() : bas... |
Below is an extract from a C# program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
Add 1 point if the program contains valid C# code, even if it's not education... | csharp | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Majorsilence.MediaService.Dto;
using Majorsilence.MediaService.RepoInterfaces;
using Microsoft.AspNetCore.Mvc;
namespace Majorsilence.MediaService.WebService.Controllers
{
[Route("api/[controller]")]
... |
Below is an extract from a C program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C code, even if it's not education... | c | 2 | char* ram[10];
char* getCellFromRAM(int i);
void removeFromRAM(PCB* pcb);
void addToRAM(FILE *p, int *start, int *end);
|
Below is an extract from a Kotlin program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Kotlin code, even if it's not... | kotlin | 2 | package pl.wojciechkabat.hotchilli.services
interface TranslationService {
fun getTranslation(key: String, languageCode: String): String
} |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 3 | //
// Issue.swift
// github
//
// Created by <NAME> on 8/7/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
import Foundation
struct Issue {
let url: String
let title: String
let user: String
}
extension Issue {
init?(dict: JSONDict) {
guard let url = dict["url"] as? String, let ti... |
Below is an extract from a JavaScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid JavaScript code, even if ... | javascript | 2 | const smartgrid = require('smart-grid');
const options = {
outputStyle: 'scss',
columns: 24,
}
smartgrid('./src/utilities/', options); |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 3 | //
// TextToSpeechError.swift
// Aimybox
//
// Created by <NAME> on 01.12.2019.
//
import Foundation
public
enum TextToSpeechError: Error {
/**
Speech is empty and will be skipped.
*/
case emptySpeech(AimyboxSpeech)
/**
Sent when speakers are unvailable.
*/
case speakersUnavailable
... |
Below is an extract from a C# program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
Add 1 point if the program contains valid C# code, even if it's not education... | csharp | 1 | // Copyright (c) 2021 Alachisoft
//
// 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... |
Below is an extract from a Kotlin program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Kotlin code, even if it's not... | kotlin | 2 | package com.paprika.thali.data
import com.paprika.thali.data.db.DbHelper
import com.paprika.thali.data.network.ApiHelper
/**
* Created by vicky on 7/12/17.
*/
interface DataManager : DbHelper, ApiHelper {
} |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 2 | //
// Cell.swift
// TheGreatGame
//
// Created by Олег on 26.05.17.
// Copyright © 2017 The Great Game. All rights reserved.
//
import UIKit
import Avenues
import TheGreatKit
protocol CellFiller {
associatedtype CellType
associatedtype Content
func setup(_ cell: CellType, with content: Conte... |
Below is an extract from a shell script. Evaluate whether it has a high educational value and could help teach shell scripting. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the script contains valid shell commands, even if... | shell | 1 | flutter build web
sudo docker build -t tobiasritter/cardgame_client_flutter .
sudo docker push tobiasritter/cardgame_client_flutter |
Below is an extract from a Java program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Java code, even if it's not edu... | java | 2 | /*
* Comet4J Copyright(c) 2011, http://code.google.com/p/comet4j/ This code is
* licensed under BSD license. Use it as you wish, but keep this copyright
* intact.
*/
package org.comet4j.demo.talker;
import java.util.HashMap;
import java.util.Map;
/**
* 应用全局存储
* @author <EMAIL>
* @date 2011-2-25
... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 2 | use std::collections::HashMap;
use std::sync::Mutex;
lazy_static! {
static ref EVENTS : Mutex<HashMap<String, i32>> = Mutex::new(HashMap::new());
}
pub fn clear_events() {
EVENTS.lock().unwrap().clear();
}
pub fn record_event<T: ToString>(event: T, n : i32) {
let event_name = event.to_string();
let m... |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 1 | ---
layout: default
title: "大数据学习遇到的问题,大数据薪资多高岗位空缺大"
---
{{ "%3Cdiv+id%3D%22article_content%22+class%3D%22article_content+clearfix+csdn-tracking-statistics%22+data-pid%3D%22blog%22+data-mod%3D%22popu_307%22+data-dsm%3D%22post%22%3E+%0A+%3Clink+rel%3D%22stylesheet%22+href%3D%22https%3A%2F%2Fcsdnimg.cn%2Frelease%2Fphoen... |
Below is an extract from a shell script. Evaluate whether it has a high educational value and could help teach shell scripting. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the script contains valid shell commands, even if... | shell | 2 | #!/bin/bash
docker run --rm -it \
-v /black/localhome/glerma/soft/dwi-flip-bvec/config.json:/flywheel/v0/config.json \
-v /black/localhome/glerma/TESTDATA/flipbvec/input:/flywheel/v0/input \
-v /black/localhome/glerma/TESTDATA/flipbvec/output:/flywheel/v0/output \
vistalab/dwi-flip-bvec:1.0.0
|
Below is an extract from a C# program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
Add 1 point if the program contains valid C# code, even if it's not education... | csharp | 1 | using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Extensions.FileProviders;
namespace GoM.Core
{
public interface IGomContext
{
string RootPath { get; }
IReadOnlyCollection<IBasicGitRepository> Repositories { get; }
IReadOnlyCollection<IPackageFeed> F... |
Below is an extract from a Kotlin program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Kotlin code, even if it's not... | kotlin | 3 | package com.stepwise.quotes
import android.content.res.Resources
import com.stepwise.quotes.domain.model.Quote
import com.stepwise.quotes.ui.mainpage.MainPageMVP
import com.stepwise.quotes.ui.mainpage.MainPageViewModel
import com.stepwise.quotes.ui.mainpage.Presenter
import com.stepwise.quotes.ui.mainpage.addquote.Cre... |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 2 | //
// Note.swift
// YourDiary
//
// Created by Apple on 2019/11/5.
// Copyright © 2019 feng. All rights reserved.
//
import Foundation
import UIKit
class Note: NSObject, NSCoding{
func encode(with aCoder: NSCoder) {
aCoder.encode(year, forKey: "yearKey")
aCoder.encode(month, forKey: "monthKey")
... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 3 | //! The `holoterminal` module
//!
//! This module will control the animations and graphics built into the
//! application.
mod wrappers;
use cursive::Cursive;
use cursive::traits::*;
use cursive::views::*;
use cursive::align::HAlign;
use super::force::drinks_served;
use self::wrappers::*;
//To Do: Add a ton of docum... |
Below is an extract from a PHP program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid PHP code, even if it's not educa... | php | 1 | <?php
namespace App\Classes;
class Class41617 {}
|
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 2 | // Copyright (c) 2023 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//! Module for errors in this crate.
use thiserror::Error;
/// Errors indicating some data doesn't map to some object.
#[derive(Clone... |
Below is an extract from a Ruby program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Ruby code, even if it's not edu... | ruby | 2 | module Sinatra
module YitoExtension
module BookingPickupReturnPlaceDefinitionsManagement
def self.registered(app)
#
# Pickup/return places
#
app.get '/admin/booking/booking-place-defs/?*', :allowed_usergroups => ['booking_manager','staff'] do
locals = {:booking_... |
Below is an extract from a C++ program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C++ code, even if it's not educa... | cpp | 2 | #ifndef PARSPH_V2_UTILS_H
#define PARSPH_V2_UTILS_H
#include "parSPH_V2_numeric.h"
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
namespace utils
{
bool circleLineIntersect(const VEC3D& startLine, const VEC3D& endLine, const VEC3D& sphereCenter, double radius);
bool cir... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 2 | use crate::{
constants::{MAX_PRECISION_U32, POWERS_10, U32_MASK},
decimal::{CalculationResult, Decimal},
ops::array::{
add_by_internal, cmp_internal, div_by_u32, is_all_zero, mul_by_u32, mul_part, rescale_internal, shl1_internal,
},
};
use core::cmp::Ordering;
use num_traits::Zero;
pub(crate) ... |
Below is an extract from a Ruby program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Ruby code, even if it's not edu... | ruby | 2 | require 'test_helper'
class EntregaHelperTest < ActionView::TestCase
end
|
Below is an extract of SQL code. Evaluate whether it has a high educational value and could help teach SQL and database concepts. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the code contains valid SQL syntax, even if it'... | sql | 3 | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 11, 2015 at 06:51 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
Below is an extract from a Markdown document. Evaluate its educational value, considering both Markdown usage and the content itself. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document uses basic Markdown syntax cor... | markdown | 2 | Article 199
----
Si les époux ou l'un d'eux sont décédés sans avoir découvert la fraude, l'action
criminelle peut être intentée par tous ceux qui ont intérêt de faire déclarer le
mariage valable, et par le procureur de la République.
|
Below is an extract from a Kotlin program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Kotlin code, even if it's not... | kotlin | 3 | package com.wtm.dgomez.qa
import graphql.kickstart.tools.GraphQLQueryResolver
import org.springframework.stereotype.Component
@Component
class QaQuery(private val repository: QaRepository): GraphQLQueryResolver {
fun getRecentQa(): List<QuestionModel> {
return repository.findAll()
}
} |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 3 | pub fn raindrops(n: usize) -> String {
let factor_mappers = [
(3, "i"), (5, "a"), (7, "o")
];
let string_number = factor_mappers
.iter()
.map(|&(x, y)| {
if n % x == 0 {
format!("Pl{}ng", y.to_string())
} else {
"".t... |
Below is an extract from a JavaScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid JavaScript code, even if ... | javascript | 2 | const mrGreen = {
firstName: "Jacob",
lastName: "Green",
color: "green",
nameCol: "beige",
description: "He has a lot of connections",
age: 45,
image: "assets/green.png",
occupation: "Entrepreneur"
}
const profPlum = {
firstName: "Victor",
lastName: "Plum",
color: "purple",
nameCol: "beige",
... |
Below is an extract from a Markdown document. Evaluate its educational value, considering both Markdown usage and the content itself. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document uses basic Markdown syntax cor... | markdown | 4 | Leaflet.TextPath
================
Shows a text along a Polyline.
Check out the [demo](http://makinacorpus.github.com/Leaflet.TextPath/) !
Usage
-----
For example, show path orientation on mouse over :
```
var layer = L.polyLine(...);
layer.on('mouseover', function () {
this.setText(' ► ', {r... |
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 2 | //
// GREditProfileViewController.swift
// Grocerest
//
// Created by <NAME> on 19/02/16.
// Copyright © 2016 grocerest. All rights reserved.
//
import Foundation
import UIKit
import SwiftyJSON
import Haneke
import RealmSwift
import SwiftLoader
import AVFoundation
import MobileCoreServices
class GREditProfileView... |
Below is an extract from a C++ program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C++ code, even if it's not educa... | cpp | 2 | #include "UGVNavigator.hpp"
UGVNavigator::UGVNavigator(WheeledRobot* t_robot, block_frequency t_bf) : TimedBlock(t_bf) {
m_robot = t_robot;
}
void UGVNavigator::loopInternal() {
switch (mainUGVNavMissionStateManager.getMissionState()) {
case UGVNavState::WARMINGUP: {
//TODO: add idle check... |
Below is an extract from a C++ program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C++ code, even if it's not educa... | cpp | 2 | #include <iostream>
#include <vector>
using namespace std;
int ties_election(const vector<int>& v) {
int total = accumulate(v.begin(), v.end(), 0);
if (total & 1) {
return -1;
}
vector<vector<int> > dp(v.size()+1, vector<int>(total/2+1, 0));
dp[0][0] = 1;
for (int i = 1; i <= v.size(); i++) {
for ... |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 2 | use super::*;
pub use option_env as call_on;
pub
fn option_env (input: TokenStream2)
-> Result<Option<String>>
{
let CompileTimeString(ref s) = parse2(input)?;
Ok(::std::env::var(s).ok())
}
|
Below is an extract from a Swift program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Swift code, even if it's not e... | swift | 2 | //
// LoyalySignUpViewController.swift
// SmylePaymentTerminal
//
// Created by <NAME> on 2019-09-13.
// Copyright © 2019 <NAME>. All rights reserved.
//
import UIKit
class LoyalySignUpViewController: UIViewController, MessagingProtocol {
var user: User?
func readMessage(message: String) {
... |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 2 |
<!DOCTYPE html>
<html lang="fr">
<head>
<!-- This page was built at 25 May 2023 13:33:49 GMT-4 -->
<!-- The source code is available on Github: https://github.com/jr-b/radiocanadalite -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-widt... |
Below is an extract from a JavaScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid JavaScript code, even if ... | javascript | 1 | /**
* Created by MaximeMaillet on 16/07/2017.
*/
const scribble = require('scribbletune');
const fs = require('fs');
const uuidv1 = require('uuid/v1');
const { exec }= require('child_process');
module.exports.partitionToMP3 = function(obj) {
let name = uuidv1();
var midFile = './mids/'+name+'.mid';
var mp3File =... |
Below is an extract from a Ruby program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Ruby code, even if it's not edu... | ruby | 1 | require 'test_helper'
class Members::ConfirmationsHelperTest < ActionView::TestCase
end
|
Below is an extract from a C# program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
Add 1 point if the program contains valid C# code, even if it's not education... | csharp | 3 | using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class UIInventory : MonoBehaviour
{
public List<UIItem> uIItems = new List<UIItem>();
public GameObject slotPrefab;
public Transform slotPanel;
public int numberOfSlots = 9;
private void Awake()
{
uIItems... |
Below is an extract from a Kotlin program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Kotlin code, even if it's not... | kotlin | 3 | package geometry
data class Size(
val width: Double,
val height: Double
) {
companion object {
val ZERO = Size(0.0, 0.0)
}
constructor(width: Int, height: Int) : this(width.toDouble(), height.toDouble())
constructor(size: Double) : this(size, size)
constructor(size: Int) : this(siz... |
Below is an extract of SQL code. Evaluate whether it has a high educational value and could help teach SQL and database concepts. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the code contains valid SQL syntax, even if it'... | sql | 3 | SELECT
h.HeatNumber,
SUM(-Lbs) AS [InputLbs]
FROM
Lotcontrol.dbo.Plant AS p
RIGHT JOIN HeatMast AS h
LEFT JOIN JobOrder as j
ON h.JobOrder = j.JobOrder
LEFT JOIN MaterialInventoryTransactions AS t
LEFT JOIN MaterialInventory AS m
ON t.LotNumber = m.LotNumber
LEFT JOIN MaterialTypes AS a
ON m.MaterialType... |
Below is an extract from a Kotlin program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Kotlin code, even if it's not... | kotlin | 1 | package com.anushka.working_with_interface
import dagger.Binds
import dagger.Module
@Module
abstract class NCBatteryModule {
@Binds
abstract fun bindsNCBattery(nickelCadmiumBattery: NickelCadmiumBattery) : Battery
} |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 3 | use std::fs::File;
use std::io::prelude::*;
// part 1
fn fuel_required(mass: u64) -> Option<u64> {
// Fuel required to launch a given module is based on its mass. Specifically, to find the fuel required for a module, take its mass, divide by three, round down, and subtract 2.
(mass / 3).checked_sub(2)
}
struc... |
Below is an extract from a Ruby program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Ruby code, even if it's not edu... | ruby | 1 | group :development do
gem "capistrano", "~> 3.9"
gem 'capistrano-composer'
gem 'capistrano-file-permissions'
end |
Below is an extract from a Rust program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Rust code, even if it's not edu... | rust | 2 | #[doc = "Register `IFCR` writer"]
pub type W = crate::W<IFCR_SPEC>;
#[doc = "End Of Transfer flag clear\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOTCW_AW {
#[doc = "1: Clear interrupt flag"]
Clear = 1,
}
impl From<EOTCW_AW> for bool {
#[inline(always)]
fn from(variant... |
Below is an extract from a PHP program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid PHP code, even if it's not educa... | php | 2 | <?php
class TestReservationInfo {
var $dbtables = array (
"recordTable" => "ods_test_reservation_record",
"transactionTable" => "ods_test_reservation_transaction"
);
var $userGroups = array(
"studentGroup" => "ODS student",
"staffGroup" => "ODS staff"
);
public static function Instance() {
static $i... |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 2 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home Security Firms Ellettsville IN</title>
<meta name="description" content="Home Security And Monitoring in Ellettsville Indiana - Commonly Heat detectors w... |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>2182 кГц - мониторинг международной частоты бедствия - Страница 33</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="Description" content="Форум по радиомониторингу и профессиональной радиосвязи">
... |
Below is an extract from an HTML document. Evaluate whether it has a high educational value and could help teach web development. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the document contains valid HTML markup, even i... | html | 2 | <!DOCTYPE html>
<html>
<head>
<title>新创无际 讨论群 群规</title>
<style>
body {
text-align : left;
}
header > h2 {
display : inline-block;
text-align : left;
}
header {
text-align : left;
}
b {
color : red;
}
</style>
</head>
<body>
<div id="content">
<section id="conte... |
Below is an extract from a JavaScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid JavaScript code, even if ... | javascript | 4 | export default function getCountry(url, value, onDataReady) {
fetch(url + value)
.then(response => {
if (response.ok) {
return response.json();
}
throw new Error("Error fetching data");
})
.then(data => {
onDataReady(data);
})
.catch(error => {
... |
Below is an extract from a C++ program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C++ code, even if it's not educa... | cpp | 2 | #include<iostream>
using namespace std;
/* AC */
int main(){
int a1, h1, a2, h2, t, ti;
cin >> t;
for(ti = 0; ti < t; ti++){
cin >> a1 >> h1 >> a2 >> h2;
if(a1 == 0){
cout << "Invalid" << endl;
}else{
h1 -= a2;
h2 -= a1;
if(h1 <= 0){
cout << "Discard ";
}else{
cout <... |
Below is an extract from a TypeScript program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid TypeScript code, even if ... | typescript | 1 | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'lux-tabindex-example',
templateUrl: './tabindex-example.component.html'
})
export class TabindexExampleComponent implements OnInit {
chipItems = ['Test1', 'Test2'];
options = [{ label: 'Test1' }, { label: 'Test2' }];
constructor() {}... |
Below is an extract from a Ruby program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Ruby code, even if it's not edu... | ruby | 2 | Rails.application.routes.draw do
root to: 'site#index'
get '/signup', to: 'site#signup'
get '/login', to: 'site#login'
get '/contact', to: 'site#contact'
get '/about', to: 'site#about'
#Also just keep it RESTful
end
|
Below is an extract from a C++ program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid C++ code, even if it's not educa... | cpp | 4 | /** \file Game.h
* \brief Defines the Game class
*/
#pragma once
#include "Hand.h"
#include "Deck.h"
/** \class Game
* \brief Contains state information to control the game as a whole
*
* After initializing a new game, the game can be started by calling
* start(). After this, the player can hit by callin... |
Below is an extract from a Java program. Evaluate whether it has a high educational value and could help teach coding. Use the additive 5-point scoring system described below. Points are accumulated based on the satisfaction of each criterion:
- Add 1 point if the program contains valid Java code, even if it's not edu... | java | -1 | package br.com.library.entity;
import br.com.library.enums.TypeBook;
import br.com.library.interfaces.Matches;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.