prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
I need help debugging this script:
object RegisterWinLogEvent extends App {
import sys.process._
def eventCreate= Seq("EVENTCREATE", "/T", "SUCCESS", "/id", "123", "/l", "APPLICATION", "/so", "Scala RegisterWinLogEvent", "/d", "Rosetta Code Example" ).!!
println(eventCreate)
println(s"\nSuccessfully co... | {"is_valid":true,"category":{"Scala":true,"AWK":true,"Go":true}} | multi |
Quick question about this snippet:
import java.math.BigInteger;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class NextHighestIntFromDigits {
public static void main(String[] args) {
... | {"is_valid":true,"category":{"Java":true}} | single |
Take a look at this:
:: Pancake Sort from Rosetta Code
:: Batch File Implementation
@echo off
setlocal enabledelayedexpansion
:: put the input sequence of integers (only) on the list variable.
set "list=-2 0 -1 5 2 7 4 3 6 -1 7 2 1 8"
:: create a pseudo-array; start at 0.
set "range=-1"
for %%l in (%list%) do (
se... | {"is_valid":true,"category":{"Batch":true}} | single |
Here is the code I was given:
using System;
using System.Collections.Generic;
using System.Linq;
namespace Soundex
{
internal static class Program
{
private static void Main()
{
var testWords = new TestWords
{
{"So... | {"is_valid":true,"category":{"C#":true}} | single |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Researchers gathered data from hundreds of households participating in the longitudinal study. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Statistical models can sometimes obscure the... | {"is_valid":true,"category":{"Go":true}} | single |
Please review the following snippet for issues:
object LongPrimes extends App {
def primeStream = LazyList.from(3, 2)
.filter(p => (3 to math.sqrt(p).ceil.toInt by 2).forall(p % _ > 0))
def longPeriod(p: Int): Boolean = {
val mstart = 10 % p
@annotation.tailrec
def iter(mod: In... | {"is_valid":true,"category":{"Scala":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. Run the following:
def hailstone n
seq = [n]
until n == 1
n = (n.even?) ? (n / 2) : (3 * n + 1)
seq << n
end
seq
end
puts "for n = 27, show sequence length and first and last 4 elements"
hs27 = hailstone 27
p [hs27.len... | {"is_valid":true,"category":{"Ruby":true,"jq":true}} | multi |
Please review the following snippet for issues:
package main
import (
"bytes"
"fmt"
)
// Strings in Go allow arbitrary bytes. They are implemented basically as
// immutable byte slices and syntactic sugar. This program shows functions
// required by the task on byte slices, thus it mostly highlights what
... | {"is_valid":true,"category":{"Go":true}} | single |
Take a look at this:
def digits: tostring | explode | map([.] | implode | tonumber);
def lpad($len): tostring | ($len - length) as $l | (" " * $l)[:$l] + .;
Plus, for comparison, the equivalent here:
func ator(var n: Int) -> String {
var result = ""
for (value, letter) in
[( 1000, "M"),
... | {"is_valid":true,"category":{"jq":true,"Swift":true,"YAML":true}} | multi |
Software architects often debate the merits of monolithic versus microservice designs. She enjoyed reading historical novels that transported her to far away places. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Climate models suggest that ocean temperatures will continue... | {"is_valid":true,"category":{"AWK":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Researchers have been studying migration patterns of monarch butterflies for years. She organized her bookshelves by genre and then alphabet... | {"is_valid":true,"category":{"Batch":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. The botanical garden featured an impressive collection of rare orchids from tropical regions. Statistical models can sometimes obscure the limitations of the underlying data sources. Statistical models can sometimes obscure the limita... | {"is_valid":true,"category":{"Perl":true,"Terraform":true}} | multi |
Quick question about this snippet:
@echo off
setlocal enabledelayedexpansion
:: It's easier and neater to create the variables holding the random 4 digit numbers ahead of time
for /l %%i in (1,1,12) do set /a rand%%i=!random! %% 9999
:: The command output of everything within the brackets is sent to the file "ta | {"is_valid":true,"category":{"Batch":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. I need help debugging this script:
use POSIX 'fmod';
sub angle {
my($b1,$b2) = @_;
my $b = fmod( ($b2 - $b1 + 720) , 360);
$b -= 360 if $b > 180;
$b += 360 if $b < -180;
return $b;
}
@bearings = (
20, 45,
... | {"is_valid":true,"category":{"Perl":true}} | single |
The garden looked particularly vibrant after the recent rain. Energy researchers are exploring various pathways for reducing carbon emissions globally. She organized her bookshelves by genre and then alphabetically within each section. Project managers stressed the importance of clear documentation throughout the cycle... | {"is_valid":true,"category":{"R":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Production teams refined their processes to minimize waste and improve overall yield. The classroom hummed with quiet conversation as students worked through practice problems. Backend services were redesigned to handle the surge i... | {"is_valid":false,"category":{}} | benign |
Can you optimize this implementation:
# syntax: GAWK -f STREAM_MERGE.AWK filename(s) >output
# handles 1 .. N files
#
# variable purpose
# ---------- -------
# data_arr holds last record read
# fn_arr filenames on command line
# fnr_arr record counts for each file
# status_arr file status: 1=more data, 0=EOF... | {"is_valid":true,"category":{"AWK":true}} | single |
The classroom hummed with quiet conversation as students worked through practice problems. I need help debugging this script:
import Foundation
extension SequenceType {
func takeWhile(include: Generator.Element -> Bool) -> AnyGenerator<Generator.Element> {
var g = self.generate()
return anyGenerator { g.nex... | {"is_valid":true,"category":{"Swift":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Policy analysts examined the long-term implications of the proposed legislative reform. She enjoyed reading historical novels that transported her to far away places. Volunteers spent the weekend cleaning up the riverside trail a... | {"is_valid":true,"category":{"C":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. Economic indicators showed a gradual recovery following the previous quarter's downturn. The morning light filtered through the kitchen window as the coffee brewed. Statistical models can sometimes obscure the limitations of the unde... | {"is_valid":true,"category":{"Terraform":true}} | single |
Translate this into another language for me:
for (var n = 0; n < 1e14; n++) { // arbitrary limit that's not too big
document.writeln(n.toString(8)); // not sure what's the best way to output it in JavaScript
} | {"is_valid":true,"category":{"JavaScript":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Here is the code I was given:
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedure... | {"is_valid":true,"category":{"Makefile":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. The painting featured warm colors that evoked memories of childhood summers by the sea. Quarterly reports indicated a steady rise in operational efficiency across divisions. Modern microprocessors rely on pipelining and out-of-order executio... | {"is_valid":true,"category":{"Java":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The newly opened gallery showcased contemporary works by emerging regional artists. Marketing analysts examined consumer behavior trends across mult... | {"is_valid":true,"category":{"Makefile":true}} | single |
What does this output:
use ntheory qw/:all/;
use Math::GMPz;
sub lltp {
my($n, $b, $best) = (shift, Math::GMPz->new(1));
my @v = map { Math::GMPz->new($_) } @{primes($n-1)};
while (@v) {
$best = vecmax(@v);
$b *= $n;
my @u;
foreach my $vi (@v) {
push @u, grep { is_prob_prime($_) } map { $v... | {"is_valid":true,"category":{"Perl":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Researchers gathered data from hundreds of households participating in the longitudinal study. Engineering teams often adopt iterative methodologies to manage complex software projects. Policy analysts examined the long-term ... | {"is_valid":false,"category":{}} | benign |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The technology conference attracted engineers, designers, and product managers from around the world. The engineer reviewed the blueprints carefully before approving the modifications. Statistical models can sometimes obscure ... | {"is_valid":false,"category":{}} | benign |
The engineer reviewed the blueprints carefully before approving the modifications. Quarterly reports indicated a steady rise in operational efficiency across divisions. Database administrators monitor query performance and index utilization across busy schemas. Distributed systems demand careful attention to consistenc... | {"is_valid":false,"category":{}} | benign |
I need help debugging this script:
public class StackTracer {
public static void printStackTrace() {
StackTraceElement[] elems = Thread.currentThread().getStackTrace();
System.out.println("Stack trace:");
for (int i = elems.length-1, j = 2 ; i >= 3 ; i--, j+=2) {
System.out.printf("%" + j + "s%s.%s%n", ""... | {"is_valid":true,"category":{"Java":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The community center offered free workshops on photography, pottery, and creative writing. Hikers were advised to carry plenty of water and to inform someone of their planned route. Marketing analysts examined consumer behavio... | {"is_valid":true,"category":{"Bash":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Energy researchers are exploring various pathways for reducing carbon emissions globally. The library hosted a weekly book club focused on classic and contemporary literature. Children played in the park while their parents chatte... | {"is_valid":true,"category":{"Python":true,"Batch":true,"JavaScript":true}} | multi |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Visitors strolled through the cobblestone streets, admiring the historic architecture. The painting featured warm colors that evoked memories of childhood summers by the sea. Run the following:
// version 1.1.2
const val ESC = "\u... | {"is_valid":true,"category":{"Kotlin":true,"R":true}} | multi |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Economic indicators showed a gradual recovery following the previous quarter's downturn. Could you explain what this code does:
function isLeapYear(year)
return year%4==0 and (year%100~=0 or year%400==0)
end The technology co... | {"is_valid":true,"category":{"Lua":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. Local musicians performed acoustic sets every Friday evening at the small cafe. The conference featured keynote speakers from a wide variety of academic backgrounds. The neighborhood gathered every Saturday morning at the small farmers' mark... | {"is_valid":true,"category":{"Scala":true,"Batch":true}} | multi |
Backend services were redesigned to handle the surge in concurrent user requests. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. The morning light filtered through the kitchen wind... | {"is_valid":true,"category":{"Ruby":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. She enjoyed reading historical novels that transported her to far away places. The morning light filtered through the kitchen window as the coffee brewed. The morning light filtered through the kitchen window as the coffee brewed. The e... | {"is_valid":true,"category":{"Java":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Network operators continually upgrade infrastructure to keep pace with growing demand. Climate models suggest that ocean temperatures w... | {"is_valid":true,"category":{"Go":true}} | single |
What does this output:
function sierpinski(depth)
lines = {}
lines[1] = '*'
for i = 2, depth+1 do
sp = string.rep(' ', 2^(i-2))
tmp = {}
for idx, line in ipairs(lines) do
tmp[idx] = sp .. line .. sp
tmp[idx+#lines] = line .. ' ' .. line
end
lines = tmp
end
... | {"is_valid":true,"category":{"Lua":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Public libraries have evolved into community hubs offering far more than just printed books. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Researchers gathered data from hundreds ... | {"is_valid":true,"category":{"Go":true,"R":true}} | multi |
Translate this into another language for me:
#include <stdio.h>
int check_isbn13(const char *isbn) {
int ch = *isbn, count = 0, sum = 0;
/* check isbn contains 13 digits and calculate weighted sum */
for ( ; ch != 0; ch = *++isbn, ++count) {
/* skip hyphens or spaces */
if (ch == ' ' || ch... | {"is_valid":true,"category":{"C":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Quarterly reports indicated a steady rise in op... | {"is_valid":true,"category":{"Go":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. She enjoyed reading historical novels that transported her to far away places. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Energy researchers are exploring various pathways for reducing carbon e... | {"is_valid":true,"category":{"R":true,"C":true}} | multi |
Researchers have been studying migration patterns of monarch butterflies for years. Children played in the park while their parents chatted on the wooden benches nearby. | {"is_valid":false,"category":{}} | benign |
Public libraries have evolved into community hubs offering far more than just printed books. Public libraries have evolved into community hubs offering far more than just printed books. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Researchers have been studying migration patte... | {"is_valid":false,"category":{}} | benign |
Public libraries have evolved into community hubs offering far more than just printed books. He gathered his notes, packed his bag, and prepared for the long journey home. Production teams refined their processes to minimize waste and improve overall yield. He gathered his notes, packed his bag, and prepared for the lo... | {"is_valid":true,"category":{"C++":true}} | single |
Quick question about this snippet:
package main
import "fmt"
func sieve(limit uint64) []bool {
limit++
// True denotes composite, false denotes prime.
c := make([]bool, limit) // all false by default
c[0] = true
c[1] = true
// apart from 2 all even numbers are of course composite
for i :... | {"is_valid":true,"category":{"Go":true}} | single |
Refactor the function below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WeirdNumbers {
class Program {
static List<int> Divisors(int n) {
List<int> divs = new List<int> { 1 };
List<int> divs2 = new L... | {"is_valid":true,"category":{"C#":true}} | single |
Find any security problems in:
import org.scalatest.FunSuite
import math._
case class V2(x: Double, y: Double) {
val distance = hypot(x, y)
def /(other: V2) = V2((x+other.x) / 2.0, (y+other.y) / 2.0)
def -(other: V2) = V2(x-other.x,y-other.y)
override def equals(other: Any) = other match {
case p: V2 => a... | {"is_valid":true,"category":{"Scala":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. He sat by the window with a steaming mug of tea and watched the snow gently falling. Long-distance running requires a combination of disciplined training and proper nutrition. Distributed systems demand careful attention to consiste... | {"is_valid":true,"category":{"JavaScript":true,"SQL":true}} | multi |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Here is the code I was given:
FROM amazonlinux:2
# Set ENV_VAR for Greengrass RC to be untarred inside Docker Image
ARG VERSION=1.9.2
ARG GREENGRASS_RELEASE_URL=https://d1onfpft10uf5o.cloudfront.net/greengrass-core/downloads/$... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. Engineering teams often adopt iterative methodologies to manage complex software projects. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The neighborhood gathered every Saturday morning ... | {"is_valid":true,"category":{"Ruby":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. She placed the manuscript carefully on the desk and began the painstaking process of revision. The painting featured warm colors that evoked memories of childhood summers by the sea. Astronomers observed a faint signal that appear... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Quick question about this snippet:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int width = 80, year = 1969;
int cols, lead, gap;
const char *wdays[] = { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" };
struct months {
const char *name;
int days, start_wday, at;
} months[12] = {
{ "January", 31, 0, 0 },... | {"is_valid":true,"category":{"C":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. She enjoyed reading historical novels that transported her to far away places. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The classroom hummed with quiet conversation as students worked ... | {"is_valid":false,"category":{}} | benign |
Take a look at this:
CREATE TABLE Third_Party_Companies (company_name VARCHAR, company_id VARCHAR); CREATE TABLE Maintenance_Contracts (maintenance_contract_company_id VARCHAR, contract_start_date VARCHAR);
SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.ma... | {"is_valid":true,"category":{"SQL":true,"Lua":true,"Swift":true}} | multi |
Engineering teams often adopt iterative methodologies to manage complex software projects. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Climate scientists continue to refine their models in light of newly available data. Software architects often debate the merits of monolit... | {"is_valid":false,"category":{}} | benign |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. She organized her bookshelves by genre and then alphabetically within each section. Backend services were redesigned to handle the surge in concurrent user requests. The committee scheduled a follow-up meeting to discuss the b... | {"is_valid":false,"category":{}} | benign |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The painting featured warm colors that evoked memories of childhood summers by the sea. Climate models suggest that ocean temperatur... | {"is_valid":true,"category":{"YAML":true,"PowerShell":true}} | multi |
Run the following:
# 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 (the
# "Licen... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Please review the following snippet for issues:
apiVersion: apps/v1
kind: Deployment
metadata:
name: howtos-api
namespace: howtos-prod
labels:
app: howtos-api
spec:
replicas: 1
selector:
matchLabels:
app: howtos-api
template:
metadata:
labels:
app: howtos-api
spec:
... | {"is_valid":true,"category":{"YAML":true}} | single |
Climate scientists continue to refine their models in light of newly available data. The newly opened gallery showcased contemporary works by emerging regional artists. The painting featured warm colors that evoked memories of childhood summers by the sea. He wandered through the old bookstore, occasionally pulling a w... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Refactor the function below:
# syntax: GAWK -f STRONG_AND_WEAK_PRIMES.AWK
BEGIN {
for (i=1; i<1E7; i++) {
if (is_prime(i)) {
arr[++n] = i
}
}
# strong:
stop1 = 36 ; stop2 = 1E6 ; stop3 = 1E7
count1 = count2 = count3 = 0
printf("The first %d strong primes:",stop1)
for (i=2; co... | {"is_valid":true,"category":{"AWK":true,"Makefile":true,"Bash":true}} | multi |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The botanical garden featured an impressive collect... | {"is_valid":true,"category":{"JavaScript":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Please review the following snippet for issues:
// version 1.0.6
fun log2(d: Double) = Math.log(d) / Math.log(2.0)
fun shannon(s: String): Doubl... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Quick question about this snippet:
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
typedef uint64_t integer;
integer reverse(integer n) {
integer rev = 0;
while (n > 0) {
rev = rev * 10 + (n % 10);
n /= 10;
}
return rev;
}
typedef struct palgen_tag {
integer power;
... | {"is_valid":true,"category":{"C":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The community center offered free workshops... | {"is_valid":true,"category":{"SQL":true}} | single |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. She organized her bookshelves by genre and then alphabetically within each section. Volunteers spent the weekend cleaning up the riverside trail a... | {"is_valid":false,"category":{}} | benign |
Teachers reported that interactive learning tools improved student engagement significantly. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The committee scheduled a follow-up meeting to discuss the budget allocations. Marketing analysts examined consumer behavior trends across... | {"is_valid":true,"category":{"Batch":true}} | single |
Translate this into another language for me:
package main
import "fmt"
func isCusip(s string) bool {
if len(s) != 9 { return false }
sum := 0
for i := 0; i < 8; i++ {
c := s[i]
var v int
switch {
case c >= '0' && c <= '9':
v = int(c) - 48
c... | {"is_valid":true,"category":{"Go":true}} | single |
What does this output:
# An iterative algorithm for finding: self ^ (1/n) to the given
# absolute precision if "precision" > 0, or to within the precision
# allowed by IEEE 754 64-bit numbers.
# The following implementation handles underflow caused by poor estimates.
def iterative_nth_root(n; precision):
def abs: ... | {"is_valid":true,"category":{"jq":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Visitors strolled through the cobblestone streets, admiring the historic architecture. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Nutritionists generally recommend a balanced diet rich in wh... | {"is_valid":true,"category":{"Swift":true,"PowerShell":true}} | multi |
Add comments to make this clearer:
def task(dog; Dog; DOG):
"The three dogs are named \(dog), \(Dog), and \(DOG)." ;
task("Benjamin"; "Samba"; "Bernie") | {"is_valid":true,"category":{"jq":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Historians continue to debate the significance of the treaty signed in that pivotal year. Marketing analysts examined consumer behavior trends across multiple demographic segments. Marketing analysts examined consumer behavior tr... | {"is_valid":true,"category":{"Swift":true}} | single |
Find any security problems in:
package main
import (
"fmt"
"sort"
"strings"
)
type card struct {
face byte
suit byte
}
const faces = "23456789tjqka"
const suits = "shdc"
func isStraight(cards []card) bool {
sorted := make([]card, 5)
copy(sorted, cards)
sort.Slice(sorted, func(i, ... | {"is_valid":true,"category":{"Go":true}} | single |
Software architects often debate the merits of monolithic versus microservice designs. The botanical garden featured an impressive collection of rare orchids from tropical regions. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Policy analysts examined the long-term implica... | {"is_valid":true,"category":{"R":true}} | single |
Can you optimize this implementation:
###################################
include $(MakePath)/trait/freestanding.mk
include $(MakePath)/trait/ps4.mk
###################################
include $(MakePath)/trait/kernel_execute.mk
include $(MakePath)/trait/common.mk
include $(MakePath)/trait/adaptive.mk
include $(Make... | {"is_valid":true,"category":{"Makefile":true,"Go":true,"JavaScript":true}} | multi |
The garden looked particularly vibrant after the recent rain. He sat by the window with a steaming mug of tea and watched the snow gently falling. Quarterly reports indicated a steady rise in operational efficiency across divisions. Energy researchers are exploring various pathways for reducing carbon emissions globall... | {"is_valid":true,"category":{"Perl":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Database administrators monitor query performance and index utilization across busy schemas. Backend services were redesigned to handle the surg... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The painting featured warm colors that evoked memories of childhood summers by the sea. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Climate models suggest that ocean temperatures will... | {"is_valid":true,"category":{"YAML":true}} | single |
Here is the code I was given:
#include <string>
#include <iostream>
#include <cstdlib>
#include <math.h>
#include <chrono>
#include <iomanip>
using namespace std;
const int maxBase = 16; // maximum base tabulated
int base, bmo, tc; // globals: base, base minus one, test count
const string chars = "0123456789ABCDE... | {"is_valid":true,"category":{"C++":true}} | single |
Add comments to make this clearer:
# usage: awk -f 5weekends.awk cal.txt
# Filter a file of month-calendars, such as
# ...
## January 1901
## Mo Tu We Th Fr Sa Su
## 1 2 3 4 5 6
## 7 8 9 10 11 12 13
## 14 15 16 17 18 19 20
## 21 22 23 24 25 26 27
## 28 29 30 31
# ...
## ... | {"is_valid":true,"category":{"AWK":true,"YAML":true,"Swift":true}} | multi |
Long-distance running requires a combination of disciplined training and proper nutrition. Teachers reported that interactive learning tools improved student engagement significantly. Public libraries have evolved into community hubs offering far more than just printed books. The technology conference attracted enginee... | {"is_valid":false,"category":{}} | benign |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Policy analysts examined the long-term implications of the proposed legislative reform. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. He sat by the window with a steaming mug of tea and w... | {"is_valid":true,"category":{"Perl":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Marketing analysts examined consumer behavior trends across multiple demographic segments. He gathered his notes, packed his bag, a... | {"is_valid":true,"category":{"jq":true}} | single |
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The painting featured warm colors that evoked memories of childhood summers by the sea. The chef prepared a simple meal of roasted veg... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Children played in the park while their parents chatted on the wooden benches nearby. Production teams refined their processes to minimize waste and improve overall yield. The community center offered free workshops on photogra... | {"is_valid":true,"category":{"Lua":true}} | single |
Add comments to make this clearer:
package main
import "fmt"
func sieve(limit uint64) []bool {
limit++
// True denotes composite, false denotes prime.
c := make([]bool, limit) // all false by default
c[0] = true
c[1] = true
// apart from 2 all even numbers are of course composite
for i :... | {"is_valid":true,"category":{"Go":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. Visitors strolled through the cobblestone streets, admiring the historic architecture. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Engineering teams often adopt iterative methodologies ... | {"is_valid":true,"category":{"AWK":true,"Lua":true}} | multi |
The morning light filtered through the kitchen window as the coffee brewed. Software architects often debate the merits of monolithic versus microservice designs. The garden looked particularly vibrant after the recent rain. Engineering teams often adopt iterative methodologies to manage complex software projects. Loca... | {"is_valid":false,"category":{}} | benign |
Take a look at this:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
// Get a chance to make stdin input buffer dirty.
//
char text[256];
getchar();
// This DOES NOT WORK properly on all modern systems including Linux & W10.
// Obsolete, don't use this. BTW, there i... | {"is_valid":true,"category":{"C":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The committee scheduled a follow-up meeting to discuss the budget allocations. He walked along the river path, listening to the rustling of leaves overhead. Take a look at this:
# Preparation: create foo.c
test1:
touch foo.c
... | {"is_valid":true,"category":{"Makefile":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. She placed the manuscript carefully on the desk and began the painstaking process of revision. Backend services were redesigned to handle the surge in concurrent user requests. The classroom hummed with quiet conversation as student... | {"is_valid":true,"category":{"Swift":true}} | single |
Translate this into another language for me:
package main
import (
"fmt"
"log"
)
func magicSquareOdd(n int) ([][]int, error) {
if n < 3 || n%2 == 0 {
return nil, fmt.Errorf("base must be odd and > 2")
}
value := 1
gridSize := n * n
c, r := n/2, 0
result := make([][]int, n)
... | {"is_valid":true,"category":{"Go":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. She organized her bookshelves by genre and then alphabetically within each section. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Could you explain what this code does:
import strutils
# Requires 5 b... | {"is_valid":true,"category":{"Lua":true}} | single |
Add comments to make this clearer:
#include <stdio.h>
#include <stdlib.h>
char chr_legal[] = "abcdefghijklmnopqrstuvwxyz0123456789_-./";
int chr_idx[256] = {0};
char idx_chr[256] = {0};
#define FNAME 0
typedef struct trie_t *trie, trie_t;
struct trie_t {
trie next[sizeof(chr_legal)]; /* next letter; slot 0 is ... | {"is_valid":true,"category":{"C":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Researchers have been studying migration patterns of monarch butterflies for years. Production teams refined their processes to minimize waste and improve overall yield. The technology conference attracted engineers, designers... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The community center offered free workshops on photography, pottery, and creative writing. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Children played in the park while their parents chatted on the wooden benches nearby. Software architects often debate the merits of mon... | {"is_valid":false,"category":{}} | benign |
Could you explain what this code does:
# Android makefile
# Build this using ndk as
# ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libOpenCL
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/
LOCAL_SRC_FILES := src/libopencl.c
LOCAL_CFLAGS =... | {"is_valid":true,"category":{"Makefile":true}} | single |
Add comments to make this clearer:
(() => {
'use strict';
// withExpansions :: [(String, Int)] -> String -> String
const withExpansions = tbl => s =>
unwords(map(expanded(tbl), words(s)));
// expanded :: [(String, Int)] -> String -> String
const expanded = tbl => s => {
const
... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The library hosted a weekly book club focused on classic and contemporary literature. Database administrators monitor query performance... | {"is_valid":true,"category":{"Bash":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.