prompt stringlengths 1.3k 3.64k | language stringclasses 16
values | label int64 -1 5 | text stringlengths 14 130k |
|---|---|---|---|
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 arrow2::array::*;
#[test]
fn primitive() {
let data = vec![
Some(vec![Some(1i32), Some(2), Some(3)]),
Some(vec![None, None, None]),
Some(vec![Some(4), None, Some(6)]),
];
let mut list = MutableFixedSizeListArray::new(MutablePrimitiveArray::<i32>::new(), 3);
list.try_extend(... |
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 | /*
For pagination:
Have a global page number variable:
var pageNumber = 1;
- This page number variable will be reset every time the user hits search... this means the first line of runQuery can be :
pageNumber = 1;
The below for loop will look like this:
const numberOfRe... |
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 SuusApi\Client;
class LineAddress
{
/**
* @var string $lp
*/
protected $lp = null;
/**
* @var string $type
*/
protected $type = null;
/**
* @var string $name
*/
protected $name = null;
/**
* @var string $street
*/
protected $s... |
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 | import java.util.Scanner;
public class Family
{
private static String sur_name;
private String first_name, last_name;
private int year_of_birth;
public static void getSurName()
{
Scanner inputTaker = new Scanner(System.in);
System.out.println("Enter the family name : ");
s... |
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::{
components::{GridLocation, Thing, ThingTape},
resources::RewindableClock,
utils::{move_tape_backwards, move_tape_forwards},
};
use amethyst::{
derive::SystemDesc,
ecs::prelude::{Join, Read, System, SystemData, WriteStorage},
};
#[derive(SystemDesc)]
pub struct ThingTapeSystem;
impl<'s... |
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 | import React, { Component } from 'react';
import styled from 'styled-components';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import ScrollToTop from './ScrollToTop';
import PokemonList from './PokemonList';
import PokemonDetails from './PokemonDetails';
import Header from './Header';
const Style... |
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: post
title: 登録日と更新日のフィールドがあって、その中で一番新しい日付を一発でセレクトするクエリー(CASE文とMAX)
date: '2012-07-01T06:55:00.001+09:00'
author: <NAME>
tags:
- Postgres
modified_time: '2012-07-01T06:55:30.409+09:00'
blogger_id: tag:blogger.com,1999:blog-2052559951721308867.post-380298435368333858
blogger_orig_url: http://uedatakeshi.blogs... |
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 |
import CustomerDataShareApi from '../customerDataShareApi';
describe("customerDataShareApi", () => {
it('renders Default Page correctly', () => {
expect(true).toBe(true);
});
});
|
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 | /*
INPUT : FAKE_FLAG_HACK_THE_BOX_01234567
111111111111111111111111111111
COMMAND : gdb -q --args ./coffee_invocation $INPUT
b *0x0000555555554000+0x00001ead
b *0x0000555555554000+0x00001f0a
b *0x0000555555554000+0x00001f2a
b *0x0000555555554000+0x00001b52
b *0x0000555555554000+0x00001b6f
b *0x0000555555554000+0x00... |
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 | --- MySQL mode ---
select name
from employee
order by name asc; |
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::{sync::mpsc::Receiver, io::Write, io::stdin, io::stdout, net::IpAddr, process::exit, str, sync::Mutex, sync::mpsc, thread};
use core::convert::TryInto;
use rand::Rng;
use ring::digest;
use termion::input::TermRead;
use crate::{constants, algorithms, crypto, session::Session, kex, terminal, ed25519};
pub st... |
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 | # T312_Sarangga
Second repository
|
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 | <section class="pcoded-main-container">
<div class="pcoded-wrapper">
<div class="pcoded-content">
<div class="pcoded-inner-content">
<div class="page-header">
<div class="page-block">
<div class="row align-items-center">
... |
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 | 3 | import { SectionTableRow, CoursePageData } from "src/models/pages";
import { CoursePageScraper } from "src/util/scraper";
import { search } from "../../../src/util/helpers";
describe("CoursePageScraper.ts", () => {
const coursePageScraper = new CoursePageScraper();
beforeAll(() => {
})
it("getData shoul... |
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 | Create tables:
1) Create a table with Personentity under Test Schema.
a. PersonentityID auto increment ID,PK
b. PersonFName
c. PersonLName
d. PersonDOB
e. PersonAddress
f. InsertedDate Auto value
2) Create a table with Costumer under Test Schema.
a. Costu... |
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 | 3 | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-portfolio-skills',
templateUrl: './portfolio-skills.component.html',
styleUrls: ['./portfolio-skills.component.scss']
})
export class PortfolioSkillsComponent implements OnInit {
static readonly skills = [
'HTML5',
'CSS',
... |
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 | # Quiz
first android project
|
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 | 3 | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gm/gm.h"
#include "include/core/SkFont.h"
#include "include/core/SkPaint.h"
#include "include/utils/SkTextUtils.h"
#include <initializer_list>
class SkCanvas;
// ... |
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 | ALTER TABLE {$NAMESPACE}_metamta.metamta_mail
ADD KEY (status, nextRetry);
ALTER TABLE {$NAMESPACE}_metamta.metamta_mail
ADD KEY (relatedPHID);
|
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 | /**
* Created by china on 2018/3/16.
*/
/*
当前项目接口ajax请求模块
*/
import ajax from './ajax'
export const reqhome = () => ajax('/home')
export const reqleft = () => ajax('/type/left')
export const reqright = () => ajax('/type/right')
export const reqbrand = () => ajax('/brand')
|
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 | 1 | //Copyright 2017 Huawei Technologies Co., Ltd
//
//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 agr... |
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 datatype_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/i-sevostyanov/NanoDB/internal/sql"
"github.com/i-sevostyanov/NanoDB/internal/sql/datatype"
)
func TestNull_Raw(t *testing.T) {
t.Parallel()
null := datatype.NewNull()
switch valu... |
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 |
// RW2STL - inserted:
#include <string>
#include <ostream>
#include <scenario/src/RWToSTLHelpers.h>
// End of RW2STL - inserted includes.
// file: mPlantH.C
// author: tom
#include <stdlib.h>
#include <assert.h>
#include <mcl/src/mcl.h>
#include <scenario/src/machdep.h>
#include <sce/src/sceDefin.h>
#include <sce/src... |
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 | #include <iostream>
#include <string>
using namespace std;
class Shape {
private:
int x;
int y;
public:
Shape(int X = 0, int Y = 0)
:x(X), y(Y) {
cout << "Shape Constructor..." << endl;
}
void setCoord(int X, int Y) {
x = X;
y = Y;
}
void print() {
cout << "(" << x<<"," << y << ")";
... |
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 | 4 | # Assigning value of 100 to cars
cars = 100
# Defining how many people fit in each car with a floating point number
space_in_car = 4.0
# Assigning the value of 30 to drivers
drivers = 30
# Assigning the value of 90 to passengers
passengers = 90
# Calculating the value for cars not being driven
cars_not_driven = car... |
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 | import React from 'react';
const Status = (props) => {
const employees = props.selectedEmployees;
let totalSalary = 0;
let totalEmployees = [];
for (const employee of employees) {
totalSalary += employee.salary;
}
totalEmployees = employees.map(employee => <div key={employee.id} class... |
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 | # LIHAlert
#####LIHAlert provides animated banners for iOS which is written using the apple's newest programming language Swift 2.0.
[](https://travis-ci.org/<NAME>/LIHAlert)
[.instantiateViewController(withIdentifier: "... |
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.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class CharacterCustomizer : MonoBehaviour
{
public GameObject[] upperwear, lowerwear, headwear;
public int current_upperwear, current_lowerwear, current_headwear;
public PlayerNetworkMa... |
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 super::collision::*;
use super::std_extended::*;
use crate::world_update::GameObj;
use crate::world_update::GameObjBlueprint;
use ordered_float::OrderedFloat;
use crate::world_update::FrameCount;
use ggez::graphics::Drawable;
pub enum Bounds<'a> {
Rect { size : &'a Size },
Circle { v : &'a CircleBounds },
}
/... |
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 main
import (
"context"
"log"
"time"
"golang.org/x/sync/errgroup"
)
var (
historicalJSONFilePath = "./data/historical.json"
currentJSONFilePath = "./data/current.json"
historicalCSVFilePath = "./data/historical.csv"
currentCSVFilePath = "./data/current.csv"
)
func getData(ctx context.Context... |
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 | package com.hhwy.purchaseweb.contract.smagremp.controller;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bi... |
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 'date'
require 'mongo'
require 'uri'
accounts = (2000_0000_000...2000_1000_000).lazy
names = ("aaaaa".."zzzzz").lazy
balances = (1..9999).lazy.to_a
begin
(Date.new(2013, 03, 01)..Date.today).each do |date|
@balance = balances.shuffle
@folder = date.strftime("%d-%m-%Y")
names.rewind
accounts.each d... |
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 | #ifndef MATH_FUNCS_H
#define MATH_FUNCS_H
void CPU::Add ()
{
double a = 0, b = 0, res = 0;
a = s_.Pop ();
b = s_.Pop ();
res = a + b;
s_.Push (res);
}
void CPU::Sub ()
{
double a = 0, b = 0, res = 0;
a = s_.Pop ();
b = s_.Pop ();
res = a - b;
s_.Push (res);
}
void CPU::M... |
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 Botble\SeoHelper;
use Illuminate\Support\Arr;
use Botble\Base\Facades\BaseHelper;
use Botble\Base\Models\BaseModel;
use Botble\SeoHelper\Contracts\SeoHelperContract;
use Botble\SeoHelper\Contracts\SeoMetaContract;
use Botble\SeoHelper\Contracts\SeoOpenGraphContract;
use Botble\SeoHelper\Contracts\SeoT... |
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 | 2 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
using Microsoft.WindowsAzure.Storage.Queue;
using System.Configura... |
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 |
//OffBoardBlinkG2
#include <msp430g2553.h>
/**
* blink.c
*/
int temp;
void main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
P1DIR |= 0x41; // configure P1.0 as output
P1DIR &= 0xF7;
P1REN |= BIT3;
P1OUT |= 0x08;
volatile unsigned int j;
while(1)
... |
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.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace myExpression
{
public class myExp
{
#region 定义栈
private Stack<string> OPTR = new Stack<string>(); //数字栈
private Stac... |
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 Dropship from "../objects/dropship";
import Base from "../objects/base";
export enum PlayerType {
Human = 0,
AI
}
export class Player {
gameScene: GameScene;
playerType: PlayerType;
team: number;
units: Phaser.GameObjects.Group;
dropship: Dropship;
base: Base;
constructor... |
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 | pub struct Solution;
// ------------------------------------------------------ snip ------------------------------------------------------ //
use std::convert::TryInto;
impl Solution {
pub fn can_finish(num_courses: i32, prerequisites: Vec<Vec<i32>>) -> bool {
// Build graph.
let mut graph = vec... |
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 |
public class Product {
int code;
double price;
boolean eligible;
int quantity;
String name;
Product(int ncode, double nprice, boolean eligibility, String newname) {
code = ncode;
price = nprice;
eligible = eligibility;
name = newname;
}
|
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 | # HPPython_Chapter7_9
ハイパフォーマンスPython輪読会用
|
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 | //
// JsonToModelParser.swift
// FitnessNotes
//
// Created by <NAME> on 5/3/16.
// Copyright © 2016 SunY. All rights reserved.
//
import Foundation
import SwiftyJSON
import CoreData
import CocoaLumberjack
class JsonToModelParser {
func parseJsonFileToJSONObject() ->JSON?{
let path = NSBundle.mai... |
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 | package com.baier.toh;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class MoveCounterTest {
@Test
public void towersOfHanoi_5discTest() {
// given
MoveCounter moveCounter = givenWeHaveMoveCounter();
// when
int actual = moveCounter.countMovesForDisc(5);
// t... |
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 GameEngine;
using GameEngine.Layers;
using System.Runtime.InteropServices;
namespace GameEngine.Core
{
public class EntryPoint
{
private readonly Application _app;
private readonly string[] _args;
public EntryPoint(Application app, string[] args)
{
_app = app... |
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 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CountSubstringOccurrences
{
class Program
{
static void Main(string[] args)
{
string text = Console.ReadLine().ToUpper();
string stringToFind = ... |
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>
<head><meta charset="utf-8"><title>[isabelle] Another limitation of HOL: Binding the type va... · Mirror: Isabelle Users Mailing List · Zulip Chat Archive</title></head>
<h2>Stream: <a href="http://isabelle.systems/zulip-archive/stream/247541-Mirror.3A-Isabelle-Users-Mailing-List/index.html">Mirror: Isabelle Use... |
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 | //
// Seqlist.h
// 线性表
//
// Created by 陆敏 on 2018/3/28.
// Copyright © 2018年 Lumin. All rights reserved.
//
#ifndef Seqlist_h
#define Seqlist_h
#include <stdio.h>
#define LENGTH 100
//给一个现有[类型]取别名
typedef int dataType;
typedef struct {
dataType dataArray[LENGTH];//存放顺序表的所有数据
int nLength; //记录当前顺序表的长度
} ... |
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 App\Services;
require_once dirname(dirname(__FILE__)) . '/Thirdparty/aes-sample/wxBizDataCrypt.php';
/**
* 业务 前台微信类
* User: Administrator
* Date: 2016/7/13
* Time: 10:12
*/
class ServiceAppWeixin extends BaseService
{
/**
* 解析用户信息
* @param $appId
* @param $sessionKey
* @param $encryptedD... |
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';
import { LocationStrategy, PlatformLocation, Location } from '@angular/common';
import {User} from "../classes/user";
import {Vendor} from "../classes/vendor";
import {DataService} from "../services/data.service";
@Component({
selector: 'app-home',
templateUrl: '.... |
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 | //
// BMKLocationManager.swift
// PaiBaoTang
//
// Created by 茶古电子商务 on 2017/10/11.
// Copyright © 2017年 Z_JaDe. All rights reserved.
//
import Foundation
import ThirdSDK
import Extension
import RxSwift
public class BMKLocationManager:NSObject {
public static let shared:BMKLocationManager = BMKLocationManage... |
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 <cstdio>
#include <algorithm>
#include <map>
using namespace std;
struct P {
double first;
int second;
};
class great {
public:
bool operator()(const P& a, const P& b) {
return a.first<b.first;
}
};
P team1[8], team2[8], team3[8];
P amari[18];
int main() {
for (int i=0; i<8; i++)
sc... |
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 | import styled from "styled-components";
const Container = styled.div`
@media (min-width: 1340px) {
max-width: 1260px;
}
margin-left: auto;
margin-right: auto;
padding: 0px 30px;
margin-bottom: 80px;
width: ${({ width }) => width || "100%"};
margin-top: 100px;
`;
export default Container;
|
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 Base\AdminBundle\Controller;
use Sonata\AdminBundle\Controller\CRUDController;
class CorpoFestivalHistoryAdminController extends CRUDController
{
}
|
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 | import { combineReducers, createStore } from 'redux';
import reducer from '../Reducers/MovieList-reducer';
const allReducer = combineReducers ({
movies: reducer
})
export const store = createStore(
allReducer,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
) |
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 |
export function update() {
navigator.geolocation.getCurrentPosition(
(position) => {
// console.log(`received current position ${JSON.stringify(position)}`);
// Store.setLocation({latitude: position.coords.latitude, longitude: position.coords.longitude});
},
(error) ... |
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 | /*
* Copyright (c) <NAME> 2017
*/
package de.dytanic.cloudnet.event.interfaces;
import de.dytanic.cloudnet.event.Event;
import de.dytanic.cloudnet.event.EventKey;
import de.dytanic.cloudnet.event.IEventListener;
public interface IEventManager {
<T extends Event> void registerListener(EventKey eventKey, IEvent... |
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 | import React from "react";
export default function QuestionPanel(props) {
const { currentIndex, questionTracker } = props;
console.log(questionTracker);
const listItems = questionTracker.map((question, index) => {
//current question
if (question === "" && index === currentIndex) {
return (
... |
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 | 4 | namespace Sitecore.FakeDb.Tests
{
using System;
using System.Linq;
using FluentAssertions;
using Ploeh.AutoFixture.Xunit2;
using Sitecore.Data;
using Sitecore.FakeDb.Security.AccessControl;
using Xunit;
public class DbItemTest
{
[Fact]
public void ShouldGenerateNewIdsIfNotSet()
{
/... |
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 | 3 | #include "array.h"
#include <iostream>
using namespace std;
ARRAY::ARRAY(){
size = 10;
arr = new int[size];
for(int i=0; i<size; i++){
arr[i] = i;
}
}
ARRAY::ARRAY(int init_size){
size = init_size;
arr = new int[size];
for(int i=0; i<size; i++){
arr[i] = i;
}
}
ARRAY::~ARRAY(){
delete[] arr;
}
int ARRAY:... |
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 { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Rx';
import { DepartamentoProdutoService } from './../../../../-services/-departamento-produto/-departamento-produto.service';
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
@Injectable()
export class ... |
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.charmist.movieapp
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.android.synthetic.main.activity_main.*
import retrofit2.Call
i... |
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;
namespace Anju.Fangke.Client.SDK
{
public enum RentType
{
合租 = 0,
整租 = 1,
}
public enum FeeType
{
计数收费 = 1,
固定收费 = 2,
}
public enum CycleType
{
月 = 1,
... |
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 | import React from 'react';
import TitleSerif from '../images/mv_titleSerif@2x.png'
import TitleSub from '../images/mv_titleSub@2x.png'
import FirstTitle from '../images/mv_title01@2x.png';
import SecondTitle from '../images/mv_title02@2x.png';
import foodOne from '../images/mv_img01@2x.png';
import foodTwo from '../ima... |
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 com.discipular.service.impl;
import javax.ejb.Stateless;
import com.discipular.entity.Funcao;
import com.discipular.service.FuncaoService;
@Stateless
public class FuncaoServiceImpl extends CRUDServiceImpl<Funcao> implements FuncaoService {
private static final long serialVersionUID = 1L;
} |
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 | //
// SignUpViewController.swift
// GoogleFirebaseV1
//
// Created by <NAME> on 23.07.2018.
// Copyright © 2018 <NAME>. All rights reserved.
//
import UIKit
import Firebase
import FirebaseAuth
import FirebaseFirestore
import FirebaseStorage
class SignUpViewController: UIViewController, UIImagePickerControllerDel... |
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 | ALTER IGNORE TABLE `character_blocklist` DROP `target_Name`; |
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 | #!/bin/sh
# if the branch is main, then fail.
branch="$(git symbolic-ref HEAD 2>/dev/null)" || \
"$(git describe --contains --all HEAD)"
if [ "${branch##refs/heads/}" = "main" ]; then
printf "\e[31m%s\n\e[m" "[Error]"
echo "can't commit on main branch."
echo "please commit on topic branch."
ex... |
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 | 5 | #![allow(unreachable_code)]
fn main() {
let mut count = 0u32;
println!("Lets count until infinity!");
loop {
count += 1;
if count == 3 {
println!("three");
continue;
}
println!("{}",count);
if count == 5 {
println!("OK, that's ... |
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 | 3 | <?php
/* These code was generated using phpCIGen v 0.1.b (21/04/2009)
#zaqi <EMAIL>,http://zenzaqi.blogspot.com,
+ Module : draft Controller
+ Description : For record controller process back-end
+ Filename : C_draft.php
+ creator :
+ Created on 01/Feb/2010 14:30:05
*/
//class of d... |
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 fr.slickteam.gitlabciittests.entity
import java.time.Instant
@Suppress("ConstructorParameterNaming")
data class Movie(
val _id: String? = null,
val title: String,
val director: String? = null,
val releaseDate: Instant? = null) {
override fun equals(other: Any?): Boolean {
if (this... |
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 | var socket;
// socket = io.connect('192.168.43.125:3000');
// socket = io.connect('192.168.100.5:3000');
// socket = io.connect('localhost:5000');
socket = io.connect();
// VAR miscellaneous
var mail_trigger = document.getElementsByClassName('send')[0]; // send email via form
var message = document.getElementsByClass... |
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
require "../../library/config.php";
require "../../library/functions.php";
require "../function/tools.php";
function updateConfig($config_name, $value="", $id_employee=0){
if($value !=""){
dbQuery("UPDATE tbl_config SET value='$value', id_employee='id_employee' WHERE config_name = '$config_name'");
return ... |
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 | class UserFollowing < ActiveRecord::Base
attr_accessible :followed_user
belongs_to :user
belongs_to :followed_user, class_name: 'User'
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 | SELECT tab7.v1 AS v1 , tab0.v0 AS v0 , tab8.v7 AS v7 , tab5.v5 AS v5 , tab6.v6 AS v6 , tab3.v4 AS v4 , tab1.v2 AS v2 , tab4.v8 AS v8
FROM (SELECT sub AS v1
FROM sorg__language$$8$$
WHERE obj = 'wsdbm:Language0'
) tab7
JOIN (SELECT obj AS v1 , sub AS v0
FROM foaf__homepage$$1$$
) tab0
ON(tab7.v1... |
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 | /* */
typedef struct two_fields{int one; int two[10];} tf_t;
int i[10];
tf_t s;
int *pi = &i[0];
tf_t *q = &s;
int global03()
{
int * p = i;
*pi = 1;
pi++;
q->one = 1;
q->two[4] = 2;
return *p;
}
|
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 | 4 | #!/bin/sh
# Descripion: This shell script used to choose a linux kernel version to cross compile
# Author: GuoWenxue<<EMAIL>>
# ChangeLog:
# 1, Version 1.0.0(2011.04.15), initialize first version
#
#User can pass a argument to specify which version should be cross compile
#or uncomment the DEF_VERSION va... |
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.Runtime.CompilerServices;
using Imagin.Common;
using Imagin.Common.Models;
using Imagin.Common.Text;
using Imagin.Common.Threading;
namespace Text
{
public class ConvertPanel : Panel
{
bool destinationTextChangeHandled;
bool sourceTextChangeHandled;
readonly BackgroundQue... |
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 | #![allow(dead_code)]
#![allow(unused_imports)]
extern crate byteorder;
extern crate speexdsp;
extern crate structopt;
use byteorder::{BigEndian, ByteOrder};
use std::fs::File;
use std::io::{Read, Write};
use std::path::PathBuf;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
struct CliArgs {
#[structopt(par... |
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 | export JAVA_HOME=/Program Files/Java/jdk1.8.0_111
cd /Android/workspace/Residency4Rent
jarsigner -verify -verbose -certs /Android/workspace/Residency4Rent/bin/Residency4Rent-release.apk
|
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 | cat log/adbs.log | grep ICAO | awk '{split($0,a,":"); print a[2]}' | sort | uniq
|
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::{errors::ParseError, line_parser::LineParser, Action};
/// Represents a line in the rebase file.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Line {
action: Action,
content: String,
hash: String,
mutated: bool,
option: Option<String>,
}
impl Line {
/// Create a new noop line.
#[must_use]
const... |
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 | //
// DetailModel.swift
// UIMaster
//
// Created by hobson on 2018/7/31.
// Copyright © 2018年 one2much. All rights reserved.
//
import Foundation
// swiftlint:disable identifier_name
class DetailModel: BaseModel {
var data: DetailData?
}
class DetailData: BaseData {
var add_time: String!
var address:... |
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 | namespace RediSearchSharp.Query
{
public class Languages
{
public const string Default = English;
public const string Arabic = "arabic";
public const string Danish = "danish";
public const string Dutch = "dutch";
public const string English = "english";
public co... |
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 | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
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 | <div class="row-fluid">
<div class="span3"></div>
<div class="span6">
<h1>Apply to Join the Community</h1>
<p>Membership fee is $2.99 per month to cover hosting and maintenance expenses.</p>
<div class="well row-fluid">
<div class="span12">
<a href="/auth/github" class="btn btn-primary btn-large">Apply w... |
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 Misty from "./lib/Misty";
// tslint:disable-next-line:no-unused-expression
new Misty();
|
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 | json.array! @orders do |order|
json.id order.id
json.product order.product.name
json.status order.status
json.quantity order.quantity
json.unit_price order.product.price
json.total order.quantity * order.product.price
end
|
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 Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class GenreSeeder extends Seeder
{
/**
* データベースに対するデータ設定の実行
*
* @return void
*/
public function run()
{
DB::table('genres')->insert([
[
'name' => '本... |
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 | /*
* Copyright (c) 2019 <NAME> https://gaztin.com/
*
* This software is provided 'as-is', without any express or implied warranty. In no event will
* the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including comm... |
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 { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
interface FileObject {
thumbnail: string;
}
const _grid_columns_count: number = 3; // Number of columns in image grid
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
private colu... |
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 kt.team.api.persist.model
import org.jetbrains.exposed.sql.Table
import org.jetbrains.exposed.sql.date
object ArticleTable : Table() {
val id = uuid("id").primaryKey().autoGenerate()
val created = date("created")
val content = text("content")
} |
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 | ---
title: "Lead Like the Great Conductors"
date: 2011-01-02T00:00:00-07:00
draft: false
aliases:
- "/2011/01/02/80/index.html"
- "/2011/01/02/80/"
categories:
- entrepreneurship
- general
---
This is a beautiful exposition (and metaphor) on the role of a leader. I’ve often wondered if it’s better to set forth clear ... |
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 ircover.idlenation
import android.support.v4.app.Fragment
import ircover.idlenation.adapters.PageTitleModel
import ircover.idlenation.fragments.ResourceLinePageFragment
interface MainActivityPage {
fun getTitle(): CharSequence
fun createFragment(): Fragment
fun getPageTitleModel(): PageTitleModel
... |
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 | COMPOSE_PROJECT_NAME=my_project
APP_SOURCE_PATH=../app_src
TZ=Asia/Tokyo
HOST_HTTP_PORT=10080
HOST_PHP_PORT=19000
HOST_DB_PORT=15432
HOST_MAILHOG_PORT=18025
HTTP_PORT=80
PHP_PORT=9000
POSTGRES_USER=postgres
POSTGRES_PASSWORD=<PASSWORD>
MAILHOG_PORT=8025
# Laravel Environment Variables
DB_CONNECTION=pgsql
DB_HOST=postg... |
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 Stepable
def moves
moves = []
move_diffs.each do |diff|
dx, dy = diff
test_pos = [self.pos[0] + dx, self.pos[1] + dy]
moves << test_pos if @rows[test_pos].empty? && covered?(test_pos)
end
moves
end
private
def move_diffs
... |
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 signal
import (
"github.com/aseTo2016/app-footstone/pkg/runtime"
"log"
"os"
"os/signal"
"syscall"
)
var receiver = make(chan os.Signal)
func init() {
signal.Notify(receiver, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
}
func Listen() {
go func() {
select {
case data := <-receiver:
log.Pr... |
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 | 3 | <?php
$ip="127.0.0.1";
$pocket="2001";
$serverce=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
if($serverce==false)
{
echo "服务器创建socket失败!";
exit(0);
}
$p=socket_bind($serverce,$ip,$pocket);
if($p==false)
{
echo "绑定失败";
exit(0);
}
$p=socket_listen($serverce,5);
if($p==false)
{
echo "监听失败!";
... |
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 wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;
use web_sys::HtmlHeadingElement;
#[wasm_bindgen(module = "/tests/wasm/element.js")]
extern "C" {
fn new_heading() -> HtmlHeadingElement;
}
#[wasm_bindgen_test]
fn heading_element() {
let element = new_heading();
assert_eq!(element.align(), "", "Shoul... |
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 | -1 | use std::collections::HashMap;
#[path = "data.rs"]
mod data;
#[path = "base.rs"]
mod base;
static REMOTE_REFS_BASE: &'static str = "refs/heads/";
static LOCAL_REFS_BASE: &'static str = "refs/remote/";
pub fn fetch(path: String) {
// Get refs from server
let refs = get_remote_refs(path.clone(), REMOTE_REFS_B... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.