prompt stringlengths 1.3k 3.64k | language stringclasses 16
values | label int64 -1 5 | text stringlengths 14 130k |
|---|---|---|---|
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 | /* 窗口控件之按钮 */
#ifndef _GUISRV_WIDGET_BUTTON_H
#define _GUISRV_WIDGET_BUTTON_H
#include <types.h>
#include <stdint.h>
#include <layer/color.h>
#include <sys/list.h>
#include <font/font.h>
#include <widget/label.h>
#define GUI_BUTTON_DEFAULT 0 /* 按钮默认状态 */
#define GUI_BUTTON_FOCUS 1 /* 按钮聚焦状态 */
#define... |
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 | box(
{
"code":"0",
"message":"请求成功!",
"list":[
{
"img": "https://img3.doubanio.com/img/files/file-1485236684-0.jpg",
"url": "www.baidu.com"
},
{
"img": "https://img3.doubanio.com/img/files/file-1487144115-0.jpg",
"url": "www.baidu.com"
},
{
"i... |
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 | # java_basic
This files are related to java basic section
|
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
# Fix docker socket permission
# This only works if the docker group does not already exist
# Taken from http://vitorbaptista.com/how-to-access-hosts-docker-socket-without-root
DOCKER_SOCKET=/var/run/docker.sock
DOCKER_GROUP=hostdocker
REGULAR_USER=www
if [ -S ${DOCKER_SOCKET} ]; then
DOCKER_GID=$(sta... |
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 "sort"
func merge(intervals [][]int) [][]int {
result := [][]int{}
if len(intervals) == 0 {
return result
}
sort.Slice(intervals, func (i, j int) bool {
return intervals[i][0] < intervals[j][0]
})
curr := intervals[0]
for _, interval := range intervals {
if interval[0] <= curr[1] { /... |
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 ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
acts_as_token_authentication_handler_for User, fallback: :none
before_filter :configure_permitted_parameters, if: ... |
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 | create or replace view vw_top_placements as
select *, score - greatest(0, extract(epoch from now() - constant_until) / 60) * decay_rate current_score
from placement_scores;
|
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>
<meta charset="utf-8"/>
<meta property="og:url" content="https://www.odt.co.nz/star-news/star-christchurch/korean-air-flights-about-land-summer"/>
<meta property="og:site_name" content="Otago Daily Times Online News"/>
<meta property="article:published_time" content="2019... |
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 | extern crate gcc;
fn main(){
gcc::Config::new().file("huhu.c").compile("libhuhu.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 | 3 | ParaSwap Test
This is aproof of concept to swap ETH for DAI using ParaSwap's api here: https://developers.paraswap.network/
To use it you need metamask installed and loaded with rETH.
Run the following two commands:
npm install
npm start
Then navigate to localhost port 8080 and connect your metamask wallet on the ... |
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 | import Realm
import Foundation
extension KeyValueObservationNotificationToken {
func invalidate3LUJ5Weeklylistcontroller(_ weeklyListController: String) {
print(weeklyListController)
}
}
|
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 CCTVModels;
using CCTVModels.User;
using GatewayModels;
using GatewayModels.Util;
using GatewayNet.Server;
using GatewayNet.Util;
using GBTModels.Global;
using GBTModels.Notify;
using GBTModels.Res... |
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 | for a in $(seq 1 1 50) ; do
cp model_XaXnXr_2.pbs model_XaXnXr_2_run$a.pbs
sed -i '' 's/input_2_3/input_2_3_run'$a'/g' model_XaXnXr_2_run$a.pbs
done
|
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 Logo from '../images/EcoPaisa_Logo.png';
import './Styles/App.css';
import { Link } from 'react-router-dom';
function NavBar() {
return (
<div className="d-flex justify-content-between flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom box-shad... |
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 | 2 | package roman
import (
"testing"
)
func TestValidateSymbol(t *testing.T) {
testCases := []struct {
symbol string
exp error
}{
{"I", nil},
{"V", nil},
{"X", nil},
{"L", nil},
{"C", nil},
{"D", nil},
{"M", nil},
{"i", errInvalidRomanSymbol},
{"", errInvalidRomanSymbol},
{"A", errInvalidRom... |
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
namespace Snappminds\ContableBundle\Entity\Transaccion\DTOs\MediosPago;
/**
* @author gcaseres
*/
abstract class DTOMedioPago
{
private $monto;
public function __construct($monto)
{
$this->setMonto($monto);
}
public function setMonto($value)
{
$this->monto = $val... |
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 | # ios-class-projects
Repo for projects from my Advanced iOS class at Rose-Hulman
|
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 | INSERT INTO public.user_info (id, password, username) VALUES (1, <PASSWORD>', '<PASSWORD>');
INSERT INTO public.user_info (id, password, username) VALUES (2, <PASSWORD>', '<PASSWORD>'); |
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 | const data=[
{
id:1,
name:"sample product 01"
},
{
id:2,
name:"sample product 02"
},
{
id:3,
name:"sample product 03"
},
{
id:4,
name:"sample product 04"
},
{
id:5,
name:"sample product 05"
}
]
expor... |
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 | # jp_prefecture
A library that converts Japanese prefecture codes and prefecture names.
## Usage
### Find a Japanese prefecture by prefecture code.
```dart
final pref = JpPrefecture.findByCode(13);
if (pref == null) {
return;
}
print(pref.code); // => 13
print(pref.name); // => '東京都'
print(pref.nameE); // => 'Tok... |
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 owner::Owner;
use vec2::Vec2;
pub type UnitId = usize;
#[derive(Clone, Debug)]
pub struct Unit {
// Generic
pub id: UnitId,
pub kind: UnitType,
pub owner: Owner,
pub pos: Vec2,
pub health: i64,
// Specific
pub resources: i64
}
impl Unit {
pub fn new(owner: Owner, pos: Vec... |
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.nambv.demo.newsappdemo.ui.common
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
abstract class BaseAdapter<T>(diffCallback: DiffUtil.ItemCallback<T>) :
ListAdapter<T, BaseViewHolder>(diffCallback) |
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>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home Monitoring Equipment Charleston SC</title>
<meta name="description" content="Wireless Home Security Systems in Charleston South Carolina - Proxim's wirel... |
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.wukong.hezhi.ui.view;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.... |
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\admin\controller;
use app\admin\controller\Common;
use think\Db;
class Member extends Common
{
//会员配置
public function config(){
$name=Db::name('member_config')->where('type','member')->select();
$config=[];
foreach ($name as $k => $v) {
$config[$v['name']]... |
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 | import UIKit
class PostSearchView: UIView {
private let userImageView = CircleImageView(frame: .zero)
private let searchView = UISearchBar()
override init(frame: CGRect) {
super.init(frame: frame)
setViews()
}
required init?(coder aDecoder: NSCoder) {
fatalErro... |
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 | /**********************************************************************
* Copyright (c) 2016 Qualcomm Technologies, Inc.
* All Rights Reserved.
* Confidential and Proprietary - Qualcomm Technologies, Inc.
**********************************************************************/
void Run4PixelProc(unsigned char* m_pIn... |
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<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ll t;
cin>>t;
while(t--)
{
ll n;
cin>>n;
vector<ll> vec(n,0);
vector<ll>::iterator upt;
for(ll i=0;i<n;i++)
{
cin>>vec[i];
}
sort(vec.begin(),vec.end());
ll c=0;
for(ll i=0;i<n-2;i++)
{
upt = u... |
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 dev.rajas.apps.modularpoc.ui.home
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Toast
import dev.rajas.apps.modularpoc.R
import dev.rajas.apps.utilities.valueOrDefault
class HomeActivity : AppCompatActivity() {
private val phoneNumber :String?=null
ov... |
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
/**
* Develop21
*
* @package Category View - Develop21 CMS
* @version 1.0
* @since Develop21 CMS version 1.0
* @author <NAME> - Develop21
* @copyright © 2012
* @license http://develop21.com/cms/license.txt
*
*/
// update needed! need to require category child categories
$params = $menuitem->parameter... |
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 | CREATE PROCEDURE insertEmployee
@ename NVARCHAR(Max),
@eslary float
AS
BEGIN
INSERT INTO dbo.Employee( Name ,Salary ) VALUES ( @ename, @esalary )
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 | 1 | <?php
define('VERIFY_PAY_PASSWORD', '<PASSWORD>'); |
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.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensio... |
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.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework... |
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 | #define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward 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 | 2 | package rs.raf.project1.djordje_veljkovic_rn4615.view.activity
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_tabs.*
import rs.raf.project1.R
import rs.raf.project1.djordje_veljkovic_rn4615.view.viewPager.TabPagerAdapter
class TabsActivity : App... |
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.example.movingAssistant
import android.annotation.SuppressLint
import android.content.Intent
import android.content.pm.PackageManager
import android.media.AudioManager
import android.media.ToneGenerator
import android.os.Bundle
import android.util.Log
import android.widget.*
import androidx.appcompat.app.A... |
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 | //===-- CodeGenFunction.h - Per-Function state for LLVM CodeGen -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
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 | #!/bin/bash
##---------------------------------------------------------
#SBATCH --job-name=HDFdownloadd
##---------------------------------------------------------
##---------------------------------------------------------
##################### test partition for QA
##SBATCH --account=cpu-s6-test-0
##SBATCH --partit... |
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 | # blog_code
my django server code. written with python
hi so this is my django code for my blog site so if you wonna check it out go to https://only-gamer-chat.herokuapp.com/
if you are not signed in signin here https://only-gamer-chat.herokuapp.com/accounts/signup/
|
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 crate::crc32_tab::CRC32TAB;
use crate::data::Data;
use crate::keys::Keys;
use crate::keystream_tab::KEYSTREAMTAB;
use crate::mult_tab::{MultTab, MULTTAB};
use crate::utils::*;
#[derive(Debug, Clone)]
pub struct Attack<'a> {
z_list: [u32; 12],
y_list: [u32; 12],
x_list: [u32; 12],
data: &'a Data,
... |
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 com.zm.LeetCodeEx.algorithms.ex1_100;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* 54. 螺旋矩阵
* <p>
* 给定一个包含 m x n 个元素的矩阵(m 行, n 列),请按照顺时针螺旋顺序,返回矩阵中的所有元素。
* <p>
* 示例 1:
* <p>
* <p>
* 输入:
* <p>
* [<br>
* [ 1, 2, 3 ],<br>
* [ 4, 5, 6 ],<br>
* [ 7, 8, 9 ]<br>
... |
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 | #[macro_use]
extern crate chan;
use std::thread;
use chan::{Receiver, Sender};
fn fibonacci(c: Sender<u64>, quit: Receiver<()>) {
let (mut x, mut y) = (0, 1);
loop {
chan_select! {
c.send(x) => {
let oldx = x;
x = y;
y = oldx + y;
... |
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.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ComputerScience20S
{
public partial class frmLoopingExample2 : Form
{
// Glob... |
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 | #pragma once
#include "block.h"
#include <vector>
#include <cstring>
#include <glm/vec3.hpp>
#include "renderer.h"
#include <set>
#include <FastNoiseSIMD.h>
constexpr int CHUNK_SIZE = 16;
constexpr int CHUNK_HEIGHT = 256;
class Chunk
{
public:
Block *getBlock(int x, int y, int z)
{
return &blocks[x][z][y];
}
... |
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 | #define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
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="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts... |
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 | // use jsx to render html, do not modify simple.html
import 'rc-editor-core/assets/index.less';
import { EditorCore, Toolbar, GetText, getHTML, toEditorState } from 'rc-editor-core';
import React from 'react';
import ReactDOM from 'react-dom';
import BasicStyle from 'rc-editor-plugin-basic-style';
import Emoji from 'r... |
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: Vitória Guimarães vs. Olympique Lyon, 2013/12/12
Date: 2013/12/12 00:00
Category: sports
Tags: football, football scores, Vitória Guimarães, Olympique Lyon
Slug: vitoria-guimaraes-vs-olympique-lyon
Author: carbonero
Vitória Guimarães 1 - 2 Olympique Lyon
<table class="table table-striped table-hover"><thead><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... | c | 3 | #include<stdio.h>
#include<math.h>
#include<string.h>
#define SMALLEST_INT64 (pow(2,63)-1)*(-1)
long int parseINT(char s[20])
{
int flag = 0, flag1 = 0;
char c;
int i,digit;
long int number = 0;
if(s[0]=='-')
{
flag = 1;
}
for(i=0;i<strlen(s);i++)
{
if(flag==1)
... |
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
/***************************************************************************
* totally_erc.php
* ---------------
* begin : Saturday, Mar 19, 2005
* copyright : reddog - http://www.reddevboard.com/
* version : 1.0.4 - 27/05/2005
*
**************************************************************... |
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.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication2
{
public partial class WebForm3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
... |
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 | CREATE INDEX threads_slug ON threads (slug);
CREATE INDEX forums_slug ON forums (slug);
CREATE INDEX users_nickname ON users (nickname);
CREATE INDEX votes_thread ON votes (thread_id, nickname, voice);
CREATE INDEX posts_thread_id ON posts (thread_id, id);
CREATE INDEX posts_thread_id_children ON posts (thread_id, chil... |
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 | /*
Navicat SQLite Data Transfer
Source Server : pruebas JR2
Source Server Type : SQLite
Source Server Version : 3021000
Source Schema : main
Target Server Type : SQLite
Target Server Version : 3021000
File Encoding : 65001
Date: 12/03/2018 12:33:42
*/
PRAGMA for... |
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 | package gorush
import (
"github.com/appleboy/gorush/config"
"github.com/appleboy/gorush/storage"
"github.com/appleboy/go-fcm"
"github.com/sideshow/apns2"
"github.com/sirupsen/logrus"
)
var (
// PushConf is gorush config
PushConf config.ConfYaml
// QueueNotification is chan type
QueueNotification chan PushNo... |
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 | //
// ListProductTableCell.swift
// EnjoeiTest
//
// Created by <NAME> on 20/05/16.
// Copyright © 2016 <EMAIL>. All rights reserved.
//
import UIKit
class ListProductTableCell: BaseCell {
@IBOutlet weak var collection: UICollectionView!
var productHandler: ProductListHandler = ProductListHandler()
... |
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 | 4 | #include"calc.h"
int main(int argc,char ** argv)
{
int type;
double op2;
char s[MAXOP];
while((type=getop(s))!=EOF)
{
switch(type)
{
case NUMBER:
push(atof(s));
break;
case '+':
push(pop()+pop());
break;
case '*':
push(pop()*pop());
break;
case '-':
op2 = pop();
push... |
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 | //
// Date+Formatter.swift
// SeatGeekSearch
//
// Created by <NAME> on 3/15/19.
// Copyright © 2019 <NAME>. All rights reserved.
//
import Foundation
extension String {
func toDate() -> Date? {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss"
retu... |
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 styles from "./Cover.module.scss";
const Cover = ({ imageSrc }) => {
return <img className={styles.cover} alt="Book Cover" src={imageSrc} />;
};
export default Cover;
|
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 | /**********************************************************/
/* This program is a UDP version of tictactoe */
/* Two users, player 1 and player 2, pass the game back */
/* and forth, on two computers */
/**********************************************************/
/*
The client i... |
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 { useEffect, useRef } from "react";
import { canUseDOM } from "../helpers/functions";
export const useEventListener: (e: any, handler: Function, eventOptions?: any, el?: Window & typeof globalThis) => void = (
e,
handler,
eventOptions,
el = window
) => {
const savedHandler = useRef<Function>();
useEffect... |
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
/* Bağlantı bilgilerinin alınması*/
require_once("baglanti.php");
/* Veritabanı sorgulama */
$guncellenecek = mysqli_real_escape_string($baglanti, $_GET["KonumKayitNo"]);
$sorgu = mysqli_query($baglanti, "SELECT * FROM konum WHERE KonumKayitNo = $guncellenecek");
$satir = mysqli_fe... |
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 | //
// GameDetailViewController.swift
// GoodGame
//
// Created by <NAME> on 10/17/19.
// Copyright © 2019 <NAME>. All rights reserved.
//
import UIKit
import WSTagsField
protocol PlaythroughHistoryDelegate {
func updatePlaythroughButton()
}
class GameDetailViewController: UIViewController, UITextFieldDelegat... |
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 | #define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
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 | 3 | const express = require('express')
const dotenv = require('dotenv')
const morgan = require('morgan')
const cors = require('cors')
const { graphqlHTTP } = require('express-graphql')
const connectDB = require('./config/db.js')
const graphQLSchema = require('./graphql/schema.js')
const graphQLResolvers = require('./graph... |
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 | # TP1-TallerDeProgramacion
trabajo práctico 1- introducción a C#
|
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/sh
PTW_DIR=/opt/powerline-taskwarrior
cd $PTW_DIR
pip${PYTHON_VERSION} install .
TASK_TEXT=$(date | md5sum | head -c 16)
task add $TASK_TEXT
export XDG_CONFIG_DIRS=$PTW_DIR/test/.config
LOG_FILE=/tmp/powerline-error.log
if [[ "$(powerline shell right | tee $LOG_FILE | fgrep -c $TASK_TEXT)" -eq 1 ]]; then
exi... |
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 | 4 | //
// HomeTableViewCell.swift
// workoutTracker
//
// Created by <NAME> on 2020-07-28.
// Copyright © 2020 <NAME>. All rights reserved.
//
import UIKit
// Protocol so we know which row was tapped for the button
protocol HomeCellDelegate {
func didTapEdit(name: String)
}
class HomeTableViewCell: UI... |
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 | // Copyright (c) <NAME>, 2012-2018. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Principal;
usin... |
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 | json.partial! "regional_profiles/regional_profile", regional_profile: @regional_profile
|
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 | package main
import (
"flag"
"github.com/kube-queue/tf-operator-extension/cmd/app"
"github.com/kube-queue/tf-operator-extension/cmd/app/options"
"k8s.io/klog/v2"
)
func main() {
s := options.NewServerOption()
s.AddFlags(flag.CommandLine)
flag.Parse()
if err := app.Run(s); err != nil {
klog.Fatalf("Failed... |
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 | 0 | def fibonacci(num)
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 | 3 | extern crate native_tls;
use native_tls::{Identity, TlsAcceptor, TlsStream};
use std::fs::File;
use std::io::{Read, Write};
use std::net::{TcpListener, TcpStream};
use std::sync::Arc;
use std::thread;
fn main() {
let mut cert_file = File::open("test/cert.pem").unwrap();
let mut certs = vec![];
cert_file.r... |
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><title>
Közbeszerzési Döntőbizottság határozatai
</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head><body text=black link=black alink=blue vlink=black><h2><b>
Közbeszerzési Döntőbizottság határozatai
</b></h2><FONT size=3><i><u>
</i></u>
<br>
<a href="5650.html"> Közbe... |
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 | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "allocator.hpp"
#include "datastore.h"
#include "free_list_allocator.hpp"
#include "free_list_raw_allocator.hpp"
#include "raw_allocator.hpp"
#include <vespa/vespalib/util/array... |
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
out=`bash assets/check <<EOF
{
"source": {
"url": "https://get.mocaccino.org/mocaccino-extra"
},
"version": { "ref": "MISSING" }
}
EOF
`
echo $out
if [ -z "$out" ]; then
echo "No output: $out"
exit 1
fi
mkdir tmp
out=`bash assets/in tmp <<EOF
{
"source": {
"url": "https://get.mocaccino.or... |
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 | ---
layout: default
title: Expresiones regulares
categories: apis-java
order: 1
---
# Expresiones regulares
Las expresiones regulares (o regex) son **series de caracteres que se usan para hacer búsquedas o sustituciones en textos**.
En Java podemos acceder a estas funcionalidad a través de las clases del paquete `ja... |
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 | //
// Created by rbcheng on 18-11-29.
// Email: <EMAIL>
//
#include "vector"
#include "stl_heap.h"
#include <iostream>
int main() {
int a[] = {1, 2, 3, 4, 5, 6, 7, 8};
stdd::vector<int> m_vector(a, a + 8);
stdd::make_heap(m_vector.begin(), m_vector.end());
for (auto& item: m_vector) {
std::cou... |
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 apimodels
import (
"context"
"encoding/json"
"fmt"
"io"
"time"
"github.com/evergreen-ci/timber"
"github.com/evergreen-ci/timber/testresults"
"github.com/pkg/errors"
)
// Valid sort by keys.
const (
CedarTestResultsSortByStart = testresults.SortByStart
CedarTestResultsSortByDuration = testres... |
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 | #include <stdio.h>
#include <math.h>
int main(){
int n;
double S;
printf("enter (int) n: ");
fflush(stdin);
scanf("%d", &n);
printf("enter (double) S: ");
fflush(stdin);
scanf("%lf", &S);
double sumA = 0;
double sumB = 0;
for (int i = 1; i <= n; i++) {
sumA += pow(i,... |
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 | export { Thumbnail_1 as default } from "../";
|
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 | #include <libs/ctype.h>
#include <libs/asm/io.h>
#include <libs/asm/memory.h>
#include <libs/asm/segment.h>
#include <libs/asm/system.h>
#define STACKFRAME_DEPTH 20
extern const struct stab __STAB_BEGIN__[]; // beginning of stabs table
extern const struct stab __STAB_END__[]; // end of stabs table
exter... |
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>
<html lang="en">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" ... |
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 | 4 | #include <stdio.h>
#include <stdlib.h>
#include<conio.h>
#include<string.h>
int N;
//The structure has a total size of 60 bytes
typedef struct st
{
int id;
char name[40];
int birth_year;
int birth_month;
int birth_day;
}st;
//one node has a total size of 72 bytes
typedef struct node
{
st stu;... |
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.mr.msapi.service;
import com.mr.msapi.entity.Dept;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org... |
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 | /*
Navicat MySQL Data Transfer
Source Server : 10.20.0.163
Source Server Version : 50723
Source Host : 10.20.0.163:3306
Source Database : user4
Target Server Type : MYSQL
Target Server Version : 50723
File Encoding : 65001
Date: 2019-01-22 16:46:42
*/
SET FOREIGN_KEY_CHECKS=0;
--... |
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, OnDestroy, OnInit } from '@angular/core';
import { TournamentService } from '@core/services/tournament';
import { AppState } from '@core/stores/app.state';
import { currentCompetitionIdSelector } from '@core/stores/competition/selectors';
import { Store } from '@ngrx/store';
import { Subscription } ... |
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::cell::RefCell;
use std::rc::Rc;
use super::super::node_function::{CgFunction, CgFunctionWrapper};
use super::super::node_variable::{CgVariableWeakWrapper, CgVariableWrapper};
use ndarray::*;
pub struct CgPlus {
domain_shape: (usize, usize),
codomain_shape: (usize, usize),
left_parent_wrapper: Cg... |
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 RefactorPnaIndex < ActiveRecord::Migration
def up
remove_index :teryt_pna_codes, :woj
remove_index :teryt_pna_codes, :woj_nazwa
remove_index :teryt_pna_codes, :pow
remove_index :teryt_pna_codes, :pow_nazwa
remove_index :teryt_pna_codes, :gmi
remove_index :teryt_pna_codes, :gmi_nazwa
... |
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 | /*
* StringList.h
*
* Created on: 11 февр. 2015 г.
* Author: supremist
*/
#ifndef STRINGLIST_H_
#define STRINGLIST_H_
#include <string.h>
#include <stdio.h>
#include <iostream>
struct ListNode{
char *str;
ListNode* next;
ListNode* prev;
public:
ListNode (const char *nstr){
int len=strlen (nstr);
... |
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 | mod vertex_position;
mod vertex_position_color;
mod vertex_position_normal;
mod vertex_position_normal_texture;
use std::mem;
use gl;
use gl::types::*;
pub use self::vertex_position::VertexPosition;
pub use self::vertex_position_color::VertexPositionColor;
pub use self::vertex_position_normal::VertexPositionNormal;
... |
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.example.crudapp.Database
import androidx.room.*
@Dao
interface HelmDao {
@Insert
suspend fun addHelm(helm: Helm)
@Update
suspend fun updateHelm(helm: Helm)
@Delete
suspend fun deleteHelm(helm: Helm)
@Query("SELECT * FROM helm")
suspend fun getAllHelm(): List<Helm>
@... |
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 trialtbl
import (
"fmt"
"testing"
)
// TestSumOper is a test interface to suite test a struct.
type TestSumOper interface {
Sum(int, int) int
LastResultAsString() string
}
// TestSumOper is a test structure to suite test a struct.
type TestSumOp struct {
lastResultAsString string
}
// Sum is a test met... |
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 | package exec
import (
"errors"
"os"
"os/exec"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestFakeCommandOutput(t *testing.T) {
restore := FakeCommandOutput(func(cmd Cmd) ([]byte, error) {
switch {
case cmd.Matches("foo", "--bar", "baz"):
return []byte(`f... |
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 | namespace NBody{
int n;
double * mass = NULL;
double * invMass = NULL;
ODEintegrator_RKF45 solver;
void forces( double t, int n_doubles, double * Ys, double * dYs ){
//printf( "DEBUG forces 1 \n" );
Vec3d * rs = ( Vec3d * )Ys ;
Vec3d * vs = (( Vec3d * )Ys ) + n ;
Vec3d * drs = ( Vec3... |
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.extract! peticion, :id, :user1, :user2, :estado, :created_at, :updated_at
json.url peticion_url(peticion, format: :json)
|
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 | import XCTest
@testable import NotNilChallengeTests
XCTMain([
testCase(NotNilChallengeTests.allTests),
])
|
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 | // For conditions of distribution and use, see copyright notice in LICENSE
#pragma once
#include "IAssetTransfer.h"
/// Utility class for identifying HTTP asset transfers for another types of asset transfers.
class HttpAssetTransfer : public IAssetTransfer
{
Q_OBJECT
public:
};
typedef shared_ptr<HttpAssetTransfe... |
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 UnityEngine;
using UnityEngine.UI;
public class PutSentence : MonoBehaviour
{
/// <summary>/// 文字送り速度/// </summary>
const float charFeedSpeed = 0.1f;
/// <summary>/// 表示用のTextComponent/// </summary>
[SerializeField] Text text;
/// ... |
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 | //
// PlatformSDK.h
// Unity-iPhone
//
// Created by loco on 14-8-26.
//
//
#ifndef __Unity_iPhone__PlatformSDK__
#define __Unity_iPhone__PlatformSDK__
#include <iostream>
struct PlatformUserInfo
{
std::string channelID; // 渠道标识
std::string channelUserID; // 平台id
std::string channelUserName; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.