prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Here is the code I was given: # NOTE: Bucket name must have exact same name as the dns recored, like example.com or box.example.com resource "aws_s3_bucket" "fogtesting" { bucket = "${var.project}.theworkmans.us" website { index_document = "index.html" error_document = "error.html" } policy = <<POLICY {...
{"is_valid":true,"category":{"Terraform":true}}
single
The painting featured warm colors that evoked memories of childhood summers by the sea. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Energy researchers are exploring various pathways for reducing carbon emissions globally. Volunteers spent the weekend cleaning up the riversi...
{"is_valid":true,"category":{"Batch":true}}
single
Quarterly reports indicated a steady rise in operational efficiency across divisions. He walked along the river path, listening to the rustling of leaves overhead.
{"is_valid":false,"category":{}}
benign
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Production teams refined their processes to minimize waste and improve overall yield. Here is the code I was given: Math.E; //e Math.PI; //pi Math.sqrt(x); //square root--cube root also available (cbrt) Math.log(x); //natural l...
{"is_valid":true,"category":{"Java":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. Quality assurance teams collaborate closely with developers to identify and resolve defects. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Economic indicators showed a gradual recovery following ...
{"is_valid":true,"category":{"Python":true}}
single
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Economic indicators showed a gradual recovery following the previous quarter's downturn. Climate scientists continue to refine their models in light of newly available data. The classroom hummed with quiet conversation as students w...
{"is_valid":true,"category":{"Lua":true}}
single
Please review the following snippet for issues: # # 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 Licens...
{"is_valid":true,"category":{"YAML":true}}
single
Could you explain what this code does: import static java.lang.Math.abs; import java.util.*; import java.util.function.IntSupplier;   public class Test {   static void distCheck(IntSupplier f, int nRepeats, double delta) { Map<Integer, Integer> counts = new HashMap<>();   for (int i = 0; i < nRepeat...
{"is_valid":true,"category":{"Java":true}}
single
Add comments to make this clearer: # 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...
{"is_valid":true,"category":{"Dockerfile":true}}
single
He sat by the window with a steaming mug of tea and watched the snow gently falling. The morning light filtered through the kitchen window as the coffee brewed. Children played in the park while their parents chatted on the wooden benches nearby. Translate this into another language for me: # # Licensed to the Apache S...
{"is_valid":true,"category":{"Dockerfile":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. Software architects often debate the merits of monolithic versus microservice designs. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Statistical models can sometimes obscure the limit...
{"is_valid":true,"category":{"Ruby":true}}
single
I need help debugging this script: apiVersion: v1 kind: Service metadata: name: zk-headless labels: role: zk-headless spec: ports: - port: 2181 name: client targetPort: 2181 protocol: TCP - port: 2888 name: server targetPort: 2888 protocol: TCP - port: 3888 name: leader-elect...
{"is_valid":true,"category":{"YAML":true}}
single
Quarterly reports indicated a steady rise in operational efficiency across divisions. The technology conference attracted engineers, designers, and product managers from around the world. Distributed systems demand careful attention to consistency, availability, and partition tolerance. He sat by the window with a stea...
{"is_valid":false,"category":{}}
benign
Hikers were advised to carry plenty of water and to inform someone of their planned route. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Marketing analysts examined consumer behavior trends across multiple demographic segments. Software architects often debate the merits o...
{"is_valid":true,"category":{"Bash":true,"Makefile":true}}
multi
Find any security problems in: def printSquare(a) for row in a print row, "\n" end print "\n" end   def dList(n, start) start = start - 1 # use 0 based indexing a = Array.new(n) {|i| i} a[0], a[start] = a[start], a[0] a[1..] = a[1..].sort first = a[1]   r = [] recurse = l...
{"is_valid":true,"category":{"Ruby":true}}
single
The newly opened gallery showcased contemporary works by emerging regional artists. Historians continue to debate the significance of the treaty signed in that pivotal year. Can you optimize this implementation: LOCAL_PATH := $(call my-dir) libefivar_src_files := \ efivarfs.c \ guid.c \ lib.c \ vars.c include $(...
{"is_valid":true,"category":{"Makefile":true}}
single
Can you optimize this implementation: # # countsubstring(string, pattern) # Returns number of occurrences of pattern in string # Pattern treated as a literal string (regex characters not expanded) # function countsubstring(str, pat, len, i, c) { c = 0 if( ! (len = length(pat) ) ) return 0 while(i =
{"is_valid":true,"category":{"AWK":true}}
single
Translate this into another language for me: using System; using System.Collections.Generic; using System.Linq;   public static class LongPrimes { public static void Main() { var primes = SomePrimeGenerator.Primes(64000).Skip(1).Where(p => Period(p) == p - 1).Append(99999); Console.WriteLine(string....
{"is_valid":true,"category":{"C#":true}}
single
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Researchers have been studying migration patterns of monarch butterflies for years. Climate models suggest that ocean temperatures will contin...
{"is_valid":true,"category":{"Python":true,"Java":true,"YAML":true}}
multi
The library hosted a weekly book club focused on classic and contemporary literature. Network operators continually upgrade infrastructure to keep pace with growing demand. Production teams refined their processes to minimize waste and improve overall yield. Visitors strolled through the cobblestone streets, admiring t...
{"is_valid":true,"category":{"Ruby":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. Researchers gathered data from hundreds of households participating in the longitudinal study. She organized her bookshelves by genre and then alphabetically within each section. Researchers have been studying migration patterns ...
{"is_valid":true,"category":{"Terraform":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. Take a look at this: multiply 3 4 # We assume this user defined function has been previously defined echo $? # This will output 12, but $? will now be zero indicating a successful echo Then there's this one in another lang...
{"is_valid":true,"category":{"Bash":true,"Scala":true}}
multi
Energy researchers are exploring various pathways for reducing carbon emissions globally. Production teams refined their processes to minimize waste and improve overall yield. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The bakery on the corner was famous for its ...
{"is_valid":true,"category":{"Makefile":true,"Lua":true}}
multi
I need help debugging this script: // version 1.1   data class Fangs(val fang1: Long = 0L, val fang2: Long = 0L)   fun pow10(n: Int): Long = when { n < 0 -> throw IllegalArgumentException("Can't be negative") else -> { var pow = 1L for (i in 1..n) pow *= 10L pow } }   fun countDigits...
{"is_valid":true,"category":{"Kotlin":true}}
single
Add comments to make this clearer: # To take advantage of gojq's arbitrary-precision integer arithmetic: def power($b): . as $in | reduce range(0;$b) as $i (1; . * $in);   def divrem($x; $y): [$x/$y|floor, $x % $y];
{"is_valid":true,"category":{"jq":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. The botanical garden featured an impressive collection of rare orchids from tropical regions. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Children played in the park while their pa...
{"is_valid":true,"category":{"Python":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. She enjoyed reading historical novels that transported her to far away places. The committee scheduled a follow-up meeting to discuss the budget allocations. The garden looked particularly vibrant after the recent rain. Local musicia...
{"is_valid":true,"category":{"jq":true}}
single
Quality assurance teams collaborate closely with developers to identify and resolve defects. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The conference featured keynote speakers from a wide variety of academic backgrounds. Modern microprocessors rely on pipelining and out-of-orde...
{"is_valid":true,"category":{"R":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Project managers stressed the importance of clear documentation throughout the cycle. He adjusted the telescope and waited patient...
{"is_valid":true,"category":{"C#":true,"AWK":true}}
multi
Astronomers observed a faint signal that appeared to originate from a distant galaxy. The morning light filtered through the kitchen window as the coffee brewed. Hikers were advised to carry plenty of water and to inform someone of their planned route. He walked along the river path, listening to the rustling of leaves...
{"is_valid":true,"category":{"JavaScript":true,"jq":true}}
multi
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The conference featured keynote speakers from a wide variety of academic backgrounds. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The technology conference attracted engineers, d...
{"is_valid":true,"category":{"Swift":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Could you explain what this code does: my $dec = "0123459"; my $hex_noprefix = "abcf123"; my $hex_withprefix = "0xabcf123"; my $oct_noprefix = "7651"; my $oct_withprefix = "07651"; my $bin_withprefix = "0b101011001";   print 0 + ...
{"is_valid":true,"category":{"Perl":true}}
single
The botanical garden featured an impressive collection of rare orchids from tropical regions. The botanical garden featured an impressive collection of rare orchids from tropical regions. Project managers stressed the importance of clear documentation throughout the cycle. Energy researchers are exploring various pathw...
{"is_valid":true,"category":{"YAML":true}}
single
What does this output: terraform { backend "gcs" {} } variable "project_id" {} variable "serviceaccount_key" {} module "gke_cluster" { source = "/exekube-modules/gke-cluster" project_id = "${var.project_id}" serviceaccount_key = "${var.serviceaccount_key}" initial_node_count = 1 node_...
{"is_valid":true,"category":{"Terraform":true,"Kotlin":true}}
multi
He walked along the river path, listening to the rustling of leaves overhead. Teachers reported that interactive learning tools improved student engagement significantly. She organized her bookshelves by genre and then alphabetically within each section. Distributed systems demand careful attention to consistency, avai...
{"is_valid":true,"category":{"PowerShell":true,"R":true,"SQL":true}}
multi
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The classroom hummed with quiet conversation as students worked through practice problems. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Farmers depend on accurate weather forecasts to plan their plant...
{"is_valid":true,"category":{"Lua":true}}
single
Can you optimize this implementation: module "vpc" { source = "./modules/vpc" name = "${ var.name }" cidr = "${ var.cidr }" region = "${ var.region }" } module "cluster" { source = "./modules/cluster" name = "${ var.name }" region = "${ var.region }" zone = "${ var.zone }" project = "${ var.project}"...
{"is_valid":true,"category":{"Terraform":true,"jq":true,"C#":true}}
multi
She placed the manuscript carefully on the desk and began the painstaking process of revision. Project managers stressed the importance of clear documentation throughout the cycle. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Nutritionists generally recommend a balanced diet r...
{"is_valid":true,"category":{"Dockerfile":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. 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. The library hosted a weekly book club focused on cla...
{"is_valid":true,"category":{"PowerShell":true,"YAML":true}}
multi
Project managers stressed the importance of clear documentation throughout the cycle. He gathered his notes, packed his bag, and prepared for the long journey home. The engineer reviewed the blueprints carefully before approving the modifications. Visitors strolled through the cobblestone streets, admiring the historic...
{"is_valid":true,"category":{"Ruby":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Hikers were advised to carry plenty of water and to inform someone of their planned route. Economic indicators showed a gradual recovery fol...
{"is_valid":true,"category":{"Go":true,"Dockerfile":true}}
multi
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Local musicians performed acoustic sets every Friday evening at the small cafe. She enjoyed reading historical novels that transported her to far away places. The library hosted a weekly book club focused on classic and ...
{"is_valid":true,"category":{"YAML":true}}
single
He walked along the river path, listening to the rustling of leaves overhead. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The morning light filtered through the kitchen window as the coffee brewed. Hikers were advised to carry plenty of water and to inform someone of their pl...
{"is_valid":true,"category":{"Bash":true,"Batch":true}}
multi
The classroom hummed with quiet conversation as students worked through practice problems. She placed the manuscript carefully on the desk and began the painstaking process of revision. The neighborhood gathered every Saturday morning at the small farmers' market downtown. I need help debugging this script: CREATE TABL...
{"is_valid":true,"category":{"SQL":true}}
single
What does this output: function findcps(primelist, fcmp) local currlist = {primelist[1]} local longlist, prevdiff = currlist, 0 for i = 2, #primelist do local diff = primelist[i] - primelist[i-1] if fcmp(diff, prevdiff) then currlist[#currlist+1] = primelist[i] if #currlist > #longlist then ...
{"is_valid":true,"category":{"Lua":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. Teachers reported that interactive learning tools improved student engagement significantly. Local potters fired their kilns once a month, producing colorful ceramics for the shops. She enjoyed reading historical novels that trans...
{"is_valid":true,"category":{"Swift":true}}
single
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Production teams refined their processes to minimi...
{"is_valid":true,"category":{"Swift":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. Add comments to make this clearer: def assert($e; $msg): if $e then . else "assertion violation @ \($msg)" | error end;   def is_integer: type=="number" and floor == .;   # To take advantage of gojq's arbitrary-precision integer ar...
{"is_valid":true,"category":{"jq":true,"C#":true}}
multi
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Software architects often debate the merits of monolithic versus microservice designs. Statistical models can sometimes obscure the limitations of ...
{"is_valid":true,"category":{"Lua":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Local potters fired their kilns once a month, producing colorful ceramics for the shops. She organized her bookshelves by genre and then alphabetically within each section. Database administrators monitor query performance and ...
{"is_valid":false,"category":{}}
benign
Network operators continually upgrade infrastructure to keep pace with growing demand. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Production teams refined their processes to minimize waste and improve overall yield. Local potters fired their kilns once a month, producin...
{"is_valid":false,"category":{}}
benign
The newly opened gallery showcased contemporary works by emerging regional artists. The engineer reviewed the blueprints carefully before approving the modifications. Policy analysts examined the long-term implications of the proposed legislative reform. The chef prepared a simple meal of roasted vegetables, fresh brea...
{"is_valid":true,"category":{"C++":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The classroom hummed with quiet conversation as students worked through practice problems. The engineer reviewed the blueprints carefully...
{"is_valid":true,"category":{"Scala":true,"Lua":true,"AWK":true}}
multi
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Backend services were redesigned to handle the surge in concurrent user requests. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Researchers gathered data from hundreds of households partic...
{"is_valid":true,"category":{"Lua":true}}
single
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. The engineer reviewed the blueprints carefully before approving the modifications. She drafted a detailed agenda for the upcoming retreat ...
{"is_valid":true,"category":{"Terraform":true}}
single
Find any security problems in: import java.io.IOException; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket;   public class HelloWorld{ public static void main(String[] args) throws IOException{ ServerSocket listener = new ServerSocket(8080); while(true){ Socket sock = li...
{"is_valid":true,"category":{"Java":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. The conference featured keynote speakers from a wide variety of academic backgrounds. What does this output: my @OIDs = qw( 1.3.6.1.4.1.11.2.17.19.3.4.0.10 1.3.6.1.4.1.11.2.17.5.2.0.79 1.3.6.1.4.1.11.2.17.19.3.4.0.4 ...
{"is_valid":true,"category":{"Perl":true}}
single
Production teams refined their processes to minimize waste and improve overall yield. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Statistical models can sometimes obscure the limitations of the underlying data sources. The painting featured warm colors that evoked memories of chi...
{"is_valid":false,"category":{}}
benign
The committee scheduled a follow-up meeting to discuss the budget allocations. Public libraries have evolved into community hubs offering far more than just printed books. Production teams refined their processes to minimize waste and improve overall yield. The neighborhood gathered every Saturday morning at the small ...
{"is_valid":true,"category":{"JavaScript":true,"Bash":true}}
multi
Local potters fired their kilns once a month, producing colorful ceramics for the shops. I copied this from the docs: variable "vpc_id" { } variable "vpc_cidr_block" { } variable "allocated_storage" { default = "32" } variable "engine_version" { default = "9.4.4" } variable "instance_type" { default = "db.t2.mic...
{"is_valid":true,"category":{"Terraform":true,"Lua":true}}
multi
She organized her bookshelves by genre and then alphabetically within each section. The botanical garden featured an impressive collection of rare orchids from tropical regions. Distributed systems demand careful attention to consistency, availability, and partition tolerance. What does this output: # syntax: GAWK -f G...
{"is_valid":true,"category":{"AWK":true,"SQL":true,"Go":true}}
multi
The technology conference attracted engineers, designers, and product managers from around the world. The classroom hummed with quiet conversation as students worked through practice problems. Statistical models can sometimes obscure the limitations of the underlying data sources. He gathered his notes, packed his bag,...
{"is_valid":true,"category":{"Go":true}}
single
Quality assurance teams collaborate closely with developers to identify and resolve defects. Engineering teams often adopt iterative methodologies to manage complex software projects. Network operators continually upgrade infrastructure to keep pace with growing demand. She enjoyed reading historical novels that transp...
{"is_valid":true,"category":{"Swift":true}}
single
Local musicians performed acoustic sets every Friday evening at the small cafe. Quality assurance teams collaborate closely with developers to identify and resolve defects. Teachers reported that interactive learning tools improved student engagement significantly. Energy researchers are exploring various pathways for ...
{"is_valid":true,"category":{"Python":true}}
single
The painting featured warm colors that evoked memories of childhood summers by the sea. Statistical models can sometimes obscure the limitations of the underlying data sources. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Historians continue to debate the significance of the treaty s...
{"is_valid":false,"category":{}}
benign
Energy researchers are exploring various pathways for reducing carbon emissions globally. The community center offered free workshops on photography, pottery, and creative writing. Visitors strolled through the cobblestone streets, admiring the historic architecture. The neighborhood gathered every Saturday morning at ...
{"is_valid":true,"category":{"Go":true}}
single
She organized her bookshelves by genre and then alphabetically within each section. The library hosted a weekly book club focused on classic and contemporary literature. Historians continue to debate the significance of the treaty signed in that pivotal year. Long-distance running requires a combination of disciplined ...
{"is_valid":true,"category":{"Perl":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Please review the following snippet for issues: #include <stdio.h> #include <stdlib.h> #include <time.h>   typedef unsigned char bool;   #define TRUE 1 #define FALSE 0 #define MILLION 1000000 #define BILLION 1000 * MILLION #define MAX_COUNT ...
{"is_valid":true,"category":{"C":true}}
single
She organized her bookshelves by genre and then alphabetically within each section. Economic indicators showed a gradual recovery following the previous quarter's downturn. Can you optimize this implementation: R CMD BATCH --vanilla --slave '--args a=1 b=c(2,5,6)' test.r test.out Researchers have been studying migratio...
{"is_valid":true,"category":{"R":true}}
single
The painting featured warm colors that evoked memories of childhood summers by the sea. Historians continue to debate the significance of the treaty signed in that pivotal year. Refactor the function below: # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the N...
{"is_valid":true,"category":{"Dockerfile":true,"Terraform":true}}
multi
Add comments to make this clearer: import java.awt.Color; import java.awt.Point; import java.awt.image.BufferedImage; import java.util.Deque; import java.util.LinkedList;   public class FloodFill { public void floodFill(BufferedImage image, Point node, Color targetColor, Color replacementColor) { int width = imag...
{"is_valid":true,"category":{"Java":true,"Bash":true,"Batch":true}}
multi
Software architects often debate the merits of monolithic versus microservice designs. Take a look at this: def Quaternion(q0;q1;q2;q3): { "q0": q0, "q1": q1, "q2": q2, "q3": q3, "type": "Quaternion" };   # promotion of a real number to a quaternion def Quaternion(r): if (r|type) == "number" then Quaternion(r;0;0;0) e...
{"is_valid":true,"category":{"jq":true,"Java":true,"AWK":true}}
multi
She placed the manuscript carefully on the desk and began the painstaking process of revision. Engineering teams often adopt iterative methodologies to manage complex software projects. Please review the following snippet for issues: # syntax: GAWK -f CLOSEST-PAIR_PROBLEM.AWK BEGIN { x[++n] = 0.654682 ; y[n] = 0.92...
{"is_valid":true,"category":{"AWK":true}}
single
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. Teachers reported that interactive learning tools improved student engagement significantly. He walked along the river path, listening to the rustling of leaves ov...
{"is_valid":true,"category":{"AWK":true}}
single
The botanical garden featured an impressive collection of rare orchids from tropical regions. Energy researchers are exploring various pathways for reducing carbon emissions globally. Please review the following snippet for issues: package main   import ( "fmt" "math/big" "strconv" )   func main () { s ...
{"is_valid":true,"category":{"Go":true}}
single
Climate scientists continue to refine their models in light of newly available data. Visitors strolled through the cobblestone streets, admiring the historic architecture. Find any security problems in: VERSION=0.1 BUILDDATE=20091203 #MANCOUNTRIES=en_GB CFLAGS=-I. -ggdb -Wall -O2 LDFLAGS=-nopie -lsqlite3 CC=gcc INST...
{"is_valid":true,"category":{"Makefile":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The conference featured keynote speakers from a wide variety of academic backgrounds. Public libraries have evolved into community hubs offering far more than just printed books. Nutritionists generally recommend a balanced die...
{"is_valid":true,"category":{"C":true}}
single
Find any security problems in: using System; using System.Collections.Generic; using System.Linq; using static System.Console;   class Program { static string fmt(int[] a) { var sb = new System.Text.StringBuilder(); for (int i = 0; i < a.Length; i++) sb.Append(string.Format("{0,5}{1}...
{"is_valid":true,"category":{"C#":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Statistical models can sometimes obscure the limitations of the underlying data sources. Public libraries have evolved into community hubs of...
{"is_valid":true,"category":{"Go":true}}
single
Run the following: #include <stdio.h>   #define MAX 15   int count_divisors(int n) { int i, count = 0; for (i = 1; i * i <= n; ++i) { if (!(n % i)) { if (i == n / i) count++; else count += 2; } } return count; }
{"is_valid":true,"category":{"C":true}}
single
Quick question about this snippet: # 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, Vers
{"is_valid":true,"category":{"Dockerfile":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. Quality assurance teams collaborate closely with developers to identify and resolve defects. Hikers were advised to carry plenty of water and to inform someone of their planned route. Production teams refined their processes to...
{"is_valid":true,"category":{"Perl":true}}
single
Climate models suggest that ocean temperatures will continue to rise over the coming decades. He sat by the window with a steaming mug of tea and watched the snow gently falling. He walked along the river path, listening to the rustling of leaves overhead. Corporate training programs increasingly include modules on col...
{"is_valid":true,"category":{"jq":true}}
single
Policy analysts examined the long-term implications of the proposed legislative reform. Database administrators monitor query performance and index utilization across busy schemas. Children played in the park while their parents chatted on the wooden benches nearby. She enjoyed reading historical novels that transporte...
{"is_valid":true,"category":{"C#":true}}
single
Economic indicators showed a gradual recovery following the previous quarter's downturn. Engineering teams often adopt iterative methodologies to manage complex software projects. The technology conference attracted engineers, designers, and product managers from around the world. The newly opened gallery showcased con...
{"is_valid":true,"category":{"PowerShell":true}}
single
Quick question about this snippet: public class RangeExtraction {   public static void main(String[] args) { int[] arr = {0, 1, 2, 4, 6, 7, 8, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39};   int len = arr....
{"is_valid":true,"category":{"Java":true}}
single
Quality assurance teams collaborate closely with developers to identify and resolve defects. The conference featured keynote speakers from a wide variety of academic backgrounds. Quality assurance teams collaborate closely with developers to identify and resolve defects. Children played in the park while their parents ...
{"is_valid":true,"category":{"PowerShell":true}}
single
Engineering teams often adopt iterative methodologies to manage complex software projects. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Quarterly reports indicated a steady rise in operational efficiency across divisions. The committee scheduled a follow-up meeting to discuss...
{"is_valid":true,"category":{"R":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. Historians continue to debate the significance of the treaty signed in that pivotal year. Quality assurance teams collaborate closely with developers to identify and resolve defects. Travelers explored ancient ruins, m...
{"is_valid":true,"category":{"Batch":true}}
single
Could you explain what this code does: function conjugate-transpose($a) { $arr = @() if($a) { $n = $a.count - 1 if(0 -lt $n) { $m = ($a | foreach {$_.count} | measure-object -Minimum).Minimum - 1 if( 0 -le $m) { if (0 -lt $m) { $arr ...
{"is_valid":true,"category":{"PowerShell":true}}
single
Refactor the function below: from itertools import groupby   def squeezer(s, txt): return ''.join(item if item == s else ''.join(grp) for item, grp in groupby(txt))   if __name__ == '__main__': strings = [ "", '"If I were two-faced, would I be wearing this one?" --- Ab...
{"is_valid":true,"category":{"Python":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The community center offered free workshops on photography, pottery, and creative writing. What does this output: import Darwin   enum AGRError : Error { case undefined }   func agm(_ a: Double, _ g: Double, _ iota: Double = 1...
{"is_valid":true,"category":{"Swift":true}}
single
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. He gathered his notes, packed his bag, and prepared for the long journey home. I copied this from the docs: // Use <functional> for C++11 #...
{"is_valid":true,"category":{"C++":true}}
single
Add comments to make this clearer: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := yogacore LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/yoga/*.cpp) LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) LOCAL_CFLAGS := -Wall -Werror -fexceptions -frtti -std=c++1y -
{"is_valid":true,"category":{"Makefile":true}}
single
Quick question about this snippet: // version 1.1.0   typealias Point = Pair<Double, Double>   fun perpendicularDistance(pt: Point, lineStart: Point, lineEnd: Point): Double { var dx = lineEnd.first - lineStart.first var dy = lineEnd.second - lineStart.second   // Normalize val mag = Math.hypot(dx, dy) ...
{"is_valid":true,"category":{"Kotlin":true,"Go":true}}
multi
I need help debugging this script: import Foundation   extension String { func paddedLeft(totalLen: Int) -> String { let needed = totalLen - count   guard needed > 0 else { return self }   return String(repeating: " ", count: needed) + self } }   class FCNode { let name: String let weight:...
{"is_valid":true,"category":{"Swift":true,"AWK":true,"Dockerfile":true}}
multi
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. He sat by the window with a steaming mug of tea and watched the snow gently falling. The classroom hummed with quiet conversation as s...
{"is_valid":true,"category":{"jq":true}}
single
Local potters fired their kilns once a month, producing colorful ceramics for the shops. The painting featured warm colors that evoked memories of childhood summers by the sea. He sat by the window with a steaming mug of tea and watched the snow gently falling. Marketing analysts examined consumer behavior trends acros...
{"is_valid":true,"category":{"Makefile":true}}
single
Add comments to make this clearer: # These are the functions which clang needs when it is targetting a previous # version of the OS. The issue is that the backend may use functions which were # not present in the libgcc that shipped on the platform. In such cases, we link # with a version of the library which cont
{"is_valid":true,"category":{"Makefile":true}}
single
Public libraries have evolved into community hubs offering far more than just printed books. Translate this into another language for me: def derangements(n) ary = (1 .. n).to_a ary.permutation.select do |perm| ary.zip(perm).all? {|a,b| a != b} end end   def subfact(n) case n when 0 then 1 when 1 then 0...
{"is_valid":true,"category":{"Ruby":true}}
single