prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
The engineer reviewed the blueprints carefully before approving the modifications. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The garden looked particularly vibrant after the recent rain. Could you explain what this code does:
# The ordinal value of the relevant states:
def states:... | {"is_valid":true,"category":{"jq":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Production teams refined their processes to minimize waste and improve overall yield. The painting featured warm colors that evoked memorie... | {"is_valid":true,"category":{"C++":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Historians continue to debate the significance of the treaty signed in that pivotal year. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Project managers stressed the importance of ... | {"is_valid":true,"category":{"SQL":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Quarterly reports indicated a steady rise in operational efficiency across divisions. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Researchers gathered data from hundreds of households participating in ... | {"is_valid":true,"category":{"Batch":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. Here is the code I was given:
# Copyright 2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
CFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=600
LIBDL= -Wl,-Bdynamic -ldl He sat by the win... | {"is_valid":true,"category":{"Makefile":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Climate scientists continue to refine their models in light of newly available data. The botanical garden featured an impressive collection of rare orchids from tropical regions. Modern microprocessors rely on pipelining and ou... | {"is_valid":true,"category":{"Python":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. He sat by the window with a steaming mug of tea and watched the snow gently falling. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Travelers explored ancient ruins, marveling at the craftsmanship o... | {"is_valid":false,"category":{}} | benign |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Climate scientists continue to refine their mod... | {"is_valid":true,"category":{"Ruby":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Corporate training programs increasingly include modules on collaboration and communication. Modern microprocessors rely on pipelinin... | {"is_valid":true,"category":{"Scala":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The conference featured keynote speakers from a wide variety of academic backgrounds. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Climate scientists continue to refine their models in light of ne... | {"is_valid":true,"category":{"Swift":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Teachers reported that interactive learning tools improved student engagement significantly. The committee scheduled a follow-up meeting to discuss the... | {"is_valid":true,"category":{"Makefile":true}} | single |
Could you explain what this code does:
using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
namespace Narcisisst
{
class Program
{
public static void Main(string[] args)
{
const string path = @"E:\Narcisisst";
string[] thisFile = Directory.GetFiles(path , "Program.cs");
... | {"is_valid":true,"category":{"C#":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Network operators continually upgrade infrastructure to keep pace with growing demand. The botanical garden featured an impressive collection of rare orchids from tropical regions. Long-distance running requires a combination of di... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Project managers stressed the importance of clear documentation throughout the cycle. Climate models suggest that ocean temperatures will c... | {"is_valid":true,"category":{"C#":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Quick question about this snippet:
System.Collections.HashTable map = new System.Collections.HashTable();
map["key1"] = "foo"; Policy analysts examined the long-term implications of the proposed legislative reform. Farmers depend... | {"is_valid":true,"category":{"C#":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Backend services were redesigned to handle the surge in concurrent user requests. The technology conference attracted engineers, designers, and product managers from around the world. Backend services were redesigned to handle the surge... | {"is_valid":true,"category":{"Go":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. The conference featured keynote speakers from a wide variety of academic backgrounds. The newly opened gallery showcased contemporary works by emerging regional artists. He adjusted the telescope and waited patiently for the clouds... | {"is_valid":true,"category":{"Swift":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Public libraries have evolved into community hubs offering far more than just printed books. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Farmers depend on accurate weather forecast... | {"is_valid":true,"category":{"AWK":true}} | single |
Please review the following snippet for issues:
#include <stdio.h>
#include <stdlib.h>
void clear() {
for(int n = 0;n < 10; n++) {
printf("\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\r\n\r\n\r\n");
}
}
#define UP "00^00\r\n00|00\r\n00000\r\n"
#define DOWN "00000\r\n00|00\r\n00v00\r\n"
#define LEFT "00000\r\n<--00\r\n00... | {"is_valid":true,"category":{"C":true,"AWK":true}} | multi |
The morning light filtered through the kitchen window as the coffee brewed. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Historians continue to debate the significance of the treaty signed in that pivotal year. Hikers were advised to carry plenty of water and to inform s... | {"is_valid":true,"category":{"jq":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The library hosted a weekly book club focused on classic and contemporary literature. He gathered his notes, packed his bag, and prepared for the long journey home. She organized her bookshelves by genre and then alphabetically... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. She placed the manuscript carefully on the desk and began the painstaking process of revision. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Distributed systems demand careful attention to consistenc... | {"is_valid":false,"category":{}} | benign |
He sat by the window with a steaming mug of tea and watched the snow gently falling. The garden looked particularly vibrant after the recent rain. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Visitors strolled through the cobblestone streets, admiring the historic archite... | {"is_valid":true,"category":{"Ruby":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. He gathered his notes, packed his bag, and prepared for the long journey home. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Quality assurance teams collaborate closely with developers to identi... | {"is_valid":true,"category":{"jq":true}} | single |
The garden looked particularly vibrant after the recent rain. Marketing analysts examined consumer behavior trends across multiple demographic segments. Policy analysts examined the long-term implications of the proposed legislative reform. Corporate training programs increasingly include modules on collaboration and c... | {"is_valid":true,"category":{"Scala":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Production teams refined their processes to minimize waste and improve overall yield. The painting featured warm colors that evoked memories of childhood summers by the sea. Modern microprocessors rely on pipelining and out-of-order execution t... | {"is_valid":true,"category":{"R":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. The morning light filtered through the kitchen window as the coffee brewed. Climate scientists continue to refine their models in light of newly available data. The neighborhood gathered every Saturday morning at the small farmers' market do... | {"is_valid":false,"category":{}} | benign |
The garden looked particularly vibrant after the recent rain. Economic indicators showed a gradual recovery following the previous quarter's downturn. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Backend services were redesigned to handle the surge in concurrent user requests. L... | {"is_valid":true,"category":{"Java":true,"Ruby":true}} | multi |
Can you optimize this implementation:
function qr([double[][]]$A) {
$m,$n = $A.count, $A[0].count
$pm,$pn = ($m-1), ($n-1)
[double[][]]$Q = 0..($m-1) | foreach{$row = @(0) * $m; $row[$_] = 1; ,$row}
[double[][]]$R = $A | foreach{$row = $_; ,@(0..$pn | foreach{$row[$_]})}
foreach ($h in 0..$pn) {
... | {"is_valid":true,"category":{"PowerShell":true,"Swift":true}} | multi |
Local musicians performed acoustic sets every Friday evening at the small cafe. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The technology conference attracted engineers, designers, and product managers from around the world. A gentle breeze drifted across the meadow as the ... | {"is_valid":true,"category":{"Rust":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Project managers stressed the importance of clear documentation throughout the cycle. The bakery on the corner was famous for its sourdough loave... | {"is_valid":false,"category":{}} | benign |
Could you explain what this code does:
deck = ([:black, :red] * 26 ).shuffle
black_pile, red_pile, discard = [], [], []
until deck.empty? do
discard << deck.pop
discard.last == :black ? black_pile << deck.pop : red_pile << deck.pop
end
x = rand( [black_pile.size, red_pile.size].min )
red_bunch = x.times.ma | {"is_valid":true,"category":{"Ruby":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Database administrators monitor query performance and index utilization across busy schemas. Project managers stressed the importance of clear documentation throughout the cycle. Long-distance running requires a combination of dis... | {"is_valid":true,"category":{"AWK":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Policy analysts examined the long-term implications of the proposed legislative reform. Policy analysts examined the long-term implications of the proposed legislative reform. Quarterly reports indicated a steady rise in operational efficien... | {"is_valid":false,"category":{}} | benign |
She organized her bookshelves by genre and then alphabetically within each section. Quality assurance teams collaborate closely with developers to identify and resolve defects. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The chef prepared a simple meal of roasted vegetab... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. Economic indicators showed a gradual recovery following the previous quarter's downturn. Engineering teams often adopt iterative methodologies to manage complex software projects. The bakery on the corner was famous for its sourdough ... | {"is_valid":true,"category":{"YAML":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. Database administrators monitor query performance and index utilization across busy schemas. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Production teams refined their processes to minimiz... | {"is_valid":true,"category":{"SQL":true,"Makefile":true}} | multi |
Take a look at this:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain | {"is_valid":true,"category":{"Makefile":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Network operators continually upgrade infrastructure to keep pace with growing demand. Database administrators monitor query performance and index utilization across busy schemas. Software architects often debate the merits of monoli... | {"is_valid":true,"category":{"Rust":true}} | single |
Add comments to make this clearer:
from functools import lru_cache
#%%
DIVS = {2, 3}
SUBS = {1}
class Minrec():
"Recursive, memoised minimised steps to 1"
def __init__(self, divs=DIVS, subs=SUBS):
self.divs, self.subs = divs, subs
@lru_cache(maxsize=None)
def _minrec(self, n):
... | {"is_valid":true,"category":{"Python":true,"AWK":true}} | multi |
Refactor the function below:
:: gcd.cmd
@echo off
:gcd
if "%2" equ "" goto :instructions
if "%1" equ "" goto :instructions
if %2 equ 0 (
set final=%1
goto :done
)
set /a res = %1 %% %2
call :gcd %2 %res%
goto :eof
:done
echo gcd=%final%
goto :eof
:instructions
echo Syntax:
echo GCD {a} {b}
echo.
Plus, for com... | {"is_valid":true,"category":{"Batch":true,"Java":true,"Swift":true}} | multi |
Translate this into another language for me:
fn cwalk(mut vis: &mut Vec<Vec<bool>>, count: &mut isize, w: usize, h: usize, y: usize, x: usize, d: usize) {
if x == 0 || y == 0 || x == w || y == h {
*count += 1;
return;
}
vis[y][x] = true;
vis[h - y][w - x] = true;
if x != 0 && ! v... | {"is_valid":true,"category":{"Rust":true}} | single |
Translate this into another language for me:
package main
import (
"bytes"
"fmt"
"math/rand"
"time"
)
type Field struct {
s [][]bool
w, h int
}
func NewField(w, h int) Field {
s := make([][]bool, h)
for i := range s {
s[i] = make([]bool, w)
}
return Field{s: s, w: w, h: h}
}
func (f Field) Set(x,... | {"is_valid":true,"category":{"Go":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Network operators continually upgrade infrastructure to keep pace with growing demand. The classroom hummed with quiet conversation as studen... | {"is_valid":true,"category":{"C++":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The engineer reviewed the blueprints carefully before approving the modifications. Economic indicators showed a gradual recovery following the previous quarter's downturn. The classroom hummed with quiet conversation as students worked thr... | {"is_valid":true,"category":{"YAML":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Children played in the park while their parents chatted on the w... | {"is_valid":true,"category":{"AWK":true}} | single |
Add comments to make this clearer:
#include <windows.h>
#include <string>
//--------------------------------------------------------------------------------------------------
using namespace std;
//--------------------------------------------------------------------------------------------------
const int BMP_SIZE ... | {"is_valid":true,"category":{"C++":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Network operators continually upgrade infrastructure to keep pace with growing demand. The library hosted a weekly book club focused on c... | {"is_valid":false,"category":{}} | benign |
Can you optimize this implementation:
from itertools import izip
def gen_row(w, s):
"""Create all patterns of a row or col that match given runs."""
def gen_seg(o, sp):
if not o:
return [[2] * sp]
return [[2] * x + o[0] + tail
for x in xrange(1, sp - len(o) + 2) | {"is_valid":true,"category":{"Python":true}} | single |
What does this output:
DIR := $(dir $(lastword $(MAKEFILE_LIST)))
include $(DIR)/path.mk
NIXD_VERSION := fa4fc39e7fd8c9a9183684e349c81931326d7523
NIXD_SHA1SUM := b30e0e2927fef8b492223c1daf35e9f818584065
VENDOR := $(PROJECT_ROOT)/.nixd
nixd := $(VENDOR)/bin/nixd
export VENDOR
$(nixd):
@$(VENDOR)/bin/nixd-bootstrap... | {"is_valid":true,"category":{"Makefile":true,"Rust":true,"Perl":true}} | multi |
Quarterly reports indicated a steady rise in operational efficiency across divisions. The morning light filtered through the kitchen window as the coffee brewed. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The classroom hummed with quiet conversation as students worked t... | {"is_valid":true,"category":{"Go":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Production teams refined their processes to minimize waste and improve overall yield. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Network operators continually upgrade infrastructure to keep p... | {"is_valid":true,"category":{"C++":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. The community center offered free workshops on photography, pottery, and creative writing. Policy analysts examined the long-term implications of the proposed legislative reform. Researchers have been studying migration patterns ... | {"is_valid":true,"category":{"Java":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Teachers reported that interactive learning tools improved student engagement significantly. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Teachers reported that interactive learning tools i... | {"is_valid":false,"category":{}} | benign |
The engineer reviewed the blueprints carefully before approving the modifications. The morning light filtered through the kitchen window as the coffee brewed. She organized her bookshelves by genre and then alphabetically within each section. The committee scheduled a follow-up meeting to discuss the budget allocations... | {"is_valid":true,"category":{"Rust":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Researchers gathered data from hundreds of households participating in the longitudinal study. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Database administrators monitor query perform... | {"is_valid":true,"category":{"Terraform":true,"Swift":true}} | multi |
Refactor the function below:
namespace RosettaCode {
class Hofstadter {
static public int F(int n) {
int result = 1;
if (n > 0) {
result = n - M(F(n-1));
}
return result;
}
static public int M(int n) {
int result... | {"is_valid":true,"category":{"C#":true}} | single |
I need help debugging this script:
get_nth_line() {
local file=$1 n=$2 line
while ((n-- > 0)); do
if ! IFS= read -r line; then
echo "No such line $2 in $file"
return 1
fi
done < "$file"
echo "$line"
}
get_nth_line filename 7
There's also this version:
########... | {"is_valid":true,"category":{"Bash":true,"Terraform":true,"jq":true}} | multi |
Here is the code I was given:
# Validate Bitcoin address
#
# Nigel_Galloway
# October 13th., 2014
require 'digest/sha2'
def convert g
i,e = '',[]
(0...g.length/2).each{|n| e[n] = g[n+=n]+g[n+1]; i+='H2'}
e.pack(i)
end
N = [0,1,2,3,4,5,6,7,8,nil,nil,nil,nil,nil,nil,nil,9,10,11,12,13,14,15,16,nil,17,18,19,20,21,... | {"is_valid":true,"category":{"Ruby":true,"Scala":true,"Batch":true}} | multi |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Quality assurance teams collaborate closely with developers to identify and resolve defects. Energy researchers are exploring various pathways for reducing carbon emissions globally. Policy analysts examined the long-term implica... | {"is_valid":false,"category":{}} | benign |
Add comments to make this clearer:
import Foundation
extension BinaryInteger {
@inlinable
public var isSelfDescribing: Bool {
let stringChars = String(self).map({ String($0) })
let counts = stringChars.reduce(into: [Int: Int](), {res, char in res[Int(char), default: 0] += 1})
for (i, n) in stri | {"is_valid":true,"category":{"Swift":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. I copied this from the docs:
def svg:
"<svg width='100%' he... | {"is_valid":true,"category":{"jq":true}} | single |
Translate this into another language for me:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
canvas {
position: absolute;
top: 45%;
left: 50%;
width: 640px;
height: 640px;
margin: -320px 0 0 -320px;
... | {"is_valid":true,"category":{"JavaScript":true}} | single |
I copied this from the docs:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (th... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Project managers stressed the importance of clear documentation throughout the cycle. Children played in the park while their ... | {"is_valid":true,"category":{"PowerShell":true,"YAML":true}} | multi |
Add comments to make this clearer:
from itertools import chain
prod, sum_, x, y, z, one,three,seven = 1, 0, 5, -5, -2, 1, 3, 7
def _range(x, y, z=1):
return range(x, y + (1 if z > 0 else -1), z)
print(f'list(_range(x, y, z)) = {list(_range(x, y, z))}')
print(f'list(_range(-seven, seven, x)) = {list(_range(-se... | {"is_valid":true,"category":{"Python":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. The newly opened gallery showcased contemporary works by emerging regional artists. She organized her bookshelves by genre and then alphabetically within each section. Find any security problems in:
---
apiVersion: apps/v1
kind: Deploy... | {"is_valid":true,"category":{"YAML":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. She organized her bookshelves by genre and then alphabetically within each section. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. She enjoyed reading historical novels that transported her to far away ... | {"is_valid":true,"category":{"R":true}} | single |
Take a look at this:
package main
import (
"fmt"
"os"
"path/filepath"
)
func VisitFile(fp string, fi os.FileInfo, err error) error {
if err != nil {
fmt.Println(err) // can't walk here,
return nil // but continue walking elsewhere
}
if fi.IsDir() { | {"is_valid":true,"category":{"Go":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Local potters fired their kilns once a month, producing colorful ceramics for the shops. He gathered his notes, packed his bag, and ... | {"is_valid":false,"category":{}} | benign |
I copied this from the docs:
def compare(a, b):
print("\n%r is of type %r and %r is of type %r"
% (a, type(a), b, type(b)))
if a < b: print('%r is strictly less than %r' % (a, b))
if a <= b: print('%r is less than or equal to %r' % (a, b))
if a > b: print('%r is strictly grea... | {"is_valid":true,"category":{"Python":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Production teams refined their processes to minimize waste and improve overall yield. The morning light filtered through the kitchen window as the coffee brewed. Volunteers spent the weekend cleaning up the riverside trail and planting new s... | {"is_valid":true,"category":{"R":true,"Dockerfile":true}} | multi |
What does this output:
#!/bin/sh
# Guess the number
# This simplified program does not check the input is valid
# Use awk(1) to get a random number. If awk(1) not found, exit now.
number=`awk 'BEGIN{print int(rand()*10+1)}'` || exit
echo 'I have thought of a number. Try to guess it!'
echo 'Enter an integer from 1 t... | {"is_valid":true,"category":{"Bash":true}} | single |
Take a look at this:
# syntax: GAWK -f MAXIMUM_TRIANGLE_PATH_SUM.AWK filename(s)
{ printf("%s\n",$0)
cols[FNR] = NF
for (i=1; i<=NF; i++) {
arr[FNR][i] = $i
}
}
ENDFILE {
for (row=FNR-1; row>0; row--) {
for (col=1; col<=cols[row]; col++) {
arr[row][col] += max(ar | {"is_valid":true,"category":{"AWK":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Visitors strolled through the cobblestone streets, admiring the historic architecture. Climate scientists continue to refine their models in light of ... | {"is_valid":true,"category":{"YAML":true}} | single |
Add comments to make this clearer:
/**
* Compare and report strings lengths.
*
* @param {Element} input - a TextArea DOM element with input
* @param {Element} output - a TextArea DOM element for output
*/
function compareStringsLength(input, output) {
// Safe defaults.
//
output.value = "";
let out | {"is_valid":true,"category":{"JavaScript":true}} | single |
Find any security problems in:
const md4func = () => {
const hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
const b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
const chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
const tab = "A | {"is_valid":true,"category":{"JavaScript":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The conference featured keynote speakers from a wide v... | {"is_valid":true,"category":{"Go":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. The morning light filtered through the kitchen window as the coffee brewed. Researchers have been studying migration patterns of monarch butterflies for years. Historians continue to debate the significance of the treaty sign... | {"is_valid":true,"category":{"Lua":true}} | single |
Find any security problems in:
@echo off
for /f "skip=6 tokens=*" %%i in (file.txt) do (
set line7=%%i
goto break
)
:break
echo Line 7 is: %line7%
pause>nul | {"is_valid":true,"category":{"Batch":true}} | single |
Add comments to make this clearer:
function eratosthenes ($n) {
if($n -gt 1){
$prime = @(1..($n+1) | foreach{$true})
$prime[1] = $false
$m = [Math]::Floor([Math]::Sqrt($n))
function multiple($i) {
for($j = $i*$i; $j -le $n; $j += $i) {
$prime[$j] = $false
... | {"is_valid":true,"category":{"PowerShell":true}} | single |
What does this output:
packages:=boost openssl curl zlib bzip2 libzip
native_packages := native_ccache
qt_packages = qrencode
qt_linux_packages:=qt59 expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
qt_darwin_packages=qt59
qt_mingw32_packages=qt59
ifeq ($(BDB_53),1)
walle... | {"is_valid":true,"category":{"Makefile":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Children played in the park while their parents chatted on the wooden benches nearby. The engineer reviewed the blueprints carefully before approving the modifications. Hikers were advised to carry plenty of water and to inform some... | {"is_valid":true,"category":{"C#":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. The garden looked particularly vibrant after the recent rain. The committee scheduled a follow-up meeting to discuss the budget allocations. Corporate training programs increasingly include modules on collaboration and commun... | {"is_valid":true,"category":{"AWK":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Hikers were advised to carry plenty of water and to inform someone of their planned route. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Network operators continually upgrade infrastru... | {"is_valid":false,"category":{}} | benign |
Engineering teams often adopt iterative methodologies to manage complex software projects. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Could you explain what this code does:
def is_prime:
if . == 2 then true
else
2 < . and . % 2 == 1 and
(. as $in
... | {"is_valid":true,"category":{"jq":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Take a look at this:
@echo off
::true
set "a=x"
::false
set "b="
if defined a (
echo a is true
) else (
echo a is false
)
if defined b (
echo b is true
) else (
echo b is false
)
pause>nul Long-distance running requir... | {"is_valid":true,"category":{"Batch":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Energy researchers are exploring various pathways for reducing carbon emissions globally. The botanical garden featured an impressive... | {"is_valid":true,"category":{"Ruby":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Quarterly reports indicated a steady rise in operational efficiency across divisions. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Take a look at this:
def sum_multiples(d):
((./d... | {"is_valid":true,"category":{"jq":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The morning light filtered through the kitchen window as the coffee brewed. She organized her bookshelves by genre and then alphabetically within eac... | {"is_valid":true,"category":{"Batch":true}} | single |
Could you explain what this code does:
:: Initiate command line environment
@echo off
setlocal enabledelayedexpansion
:: Establish arrays we'll be using
set items=map compass water sandwich glucose tin banana apple cheese beer suntancream camera tshirt trousers umbrella waterprooftrousers waterproofoverclothes notecas... | {"is_valid":true,"category":{"Batch":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Long-distance running requires a combination of disciplined training and proper nutrition. Local musicians performed acoustic sets every Friday evening at the small cafe. A gentle breeze drifted across the meadow as the sun began to di... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. The newly opened gallery showcased contemporary works by emerging regional artists. Project managers stressed the importance of clear documentation throughout the cycle. The library hosted a weekly book club focused on classic ... | {"is_valid":true,"category":{"C++":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The morning light filtered through the kitchen window as the coffee brewed. He sat by the window with a steaming mug of tea and watched the snow gently falling. The technology conference attracted engineers, designers, and product... | {"is_valid":true,"category":{"Kotlin":true,"Perl":true}} | multi |
Energy researchers are exploring various pathways for reducing carbon emissions globally. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Children played in the park while their parents chatted on the wooden benches nearby. Quarterly reports indicated a steady rise in operational ef... | {"is_valid":true,"category":{"YAML":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. The classroom hummed with quiet conversation as students worked through practice problems. Production teams refined their processes to minimize waste and improve overall yield. Marketing analysts examined consumer behavior trends acro... | {"is_valid":false,"category":{}} | benign |
I need help debugging this script:
import scala.util.Random
object MontyHallSimulation {
def main(args: Array[String]) {
val samples = if (args.size == 1 && (args(0) matches "\\d+")) args(0).toInt else 1000
val doors = Set(0, 1, 2)
var stayStrategyWins = 0
var switchStrategyWins = 0
1 to sampl... | {"is_valid":true,"category":{"Scala":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. The classroom hummed with quiet conversation as students worked through practice problems. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The chef prepared a simple meal of roasted vege... | {"is_valid":true,"category":{"Bash":true}} | single |
Find any security problems in:
@echo off
setlocal enabledelayedexpansion
echo.
::Task #1
call :hailstone 111
echo Task #1: (Start:!sav!)
echo !seq!
echo.
echo Sequence has !cnt! elements.
echo.
::Task #2
call :hailstone 27
echo Task #2: (Start:!sav!)
echo !seq!
echo.
echo Sequence has !cnt! elements.
echo.
pau | {"is_valid":true,"category":{"Batch":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Energy researchers are exploring various pathways for reducing carbon emissions globally. Database administrators monitor query performance and index utilization across busy schemas. Modern microprocessors rely on pipelining and ... | {"is_valid":true,"category":{"Java":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.