prompt
large_stringlengths
150
7.97k
target
large_stringlengths
32
83
kind
large_stringclasses
3 values
Run the following: FROM alpine:3.21.3 RUN apk --no-cache add ca-certificates git COPY trivy /usr/local/bin/trivy COPY contrib/*.tpl contrib/ ENTRYPOINT ["trivy"]
{"is_valid":true,"category":{"Dockerfile":true}}
single
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Modern microprocessors rely on pipelining and out-of-order executi...
{"is_valid":false,"category":{}}
benign
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Distributed systems demand careful attention t...
{"is_valid":true,"category":{"Java":true}}
single
He gathered his notes, packed his bag, and prepared for the long journey home. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Translate this into another language for me: def crossp(a, b): '''Cross product of two 3D vectors''' assert len(a) == len(b) == 3, 'For 3D ...
{"is_valid":true,"category":{"Python":true}}
single
Backend services were redesigned to handle the surge in concurrent user requests. He sat by the window with a steaming mug of tea and watched the snow gently falling. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Economic indicators showed a gradual recovery following the ...
{"is_valid":false,"category":{}}
benign
Statistical models can sometimes obscure the limitations of the underlying data sources. Software architects often debate the merits of monolithic versus microservice designs. Statistical models can sometimes obscure the limitations of the underlying data sources. Nutritionists generally recommend a balanced diet rich ...
{"is_valid":true,"category":{"Kotlin":true}}
single
Policy analysts examined the long-term implications of the proposed legislative reform. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Take a look at this: int[] intArray = { 1, 2, 3, 4, 5 }; // Simplest method: LINQ, functional int[] squares1 = intArray.Select(x => x * x).ToArra...
{"is_valid":true,"category":{"C#":true,"Terraform":true,"jq":true}}
multi
Quick question about this snippet: using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace Fibonacci { class Program { static void Main(string[] args) { PrintNumberSequence("Fibonacci", GetNnacciNumbers(2, 10)); PrintNumberSequenc...
{"is_valid":true,"category":{"C#":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. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Local potters fired their kilns once a mont...
{"is_valid":true,"category":{"Rust":true}}
single
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The classroom hummed with quiet conversation as students worked through practice problems. Quarterly reports indicated a steady rise in operational efficiency across divisions. Farmers depend on accurate weather forecasts to plan th...
{"is_valid":true,"category":{"Swift":true}}
single
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. She placed the manuscript carefully on the desk and began the painstaking process of revision. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Policy analysts examined the long-term im...
{"is_valid":true,"category":{"PowerShell":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. He sat by the window with a steaming mug of tea and watched the snow gently falling. Historians continue to debate the significance of the treaty signed in that pivotal year. Astronomers observed a faint signal that appeared to...
{"is_valid":true,"category":{"Makefile":true}}
single
Could you explain what this code does: class KnightTour { constructor() { this.width = 856; this.height = 856; this.cellCount = 8; this.size = 0; this.knightPiece = "\u2658"; this.knightPos = { x: 0, y: 0 }; this.ctx = null; this.step = this.width / this.cellCount; this.lastTime = 0; this.w...
{"is_valid":true,"category":{"JavaScript":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings.
{"is_valid":false,"category":{}}
benign
I copied this from the docs: import java.util.*;   public class LZW { /** Compress a string to a list of output symbols. */ public static List<Integer> compress(String uncompressed) { // Build the dictionary. int dictSize = 256; Map<String,Integer> dictionary = new HashMap<Str
{"is_valid":true,"category":{"Java":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Can you optimize this implementation: function meanAngle (angleList) local sumSin, sumCos = 0, 0 for i, angle in pairs(angleList) d...
{"is_valid":true,"category":{"Lua":true}}
single
I copied this from the docs: apiVersion: v1 kind: ConfigMap metadata: name: peercalls data: config.yaml: | base_url: /test ice_servers: - urls: - 'stun:stun.l.google.com:19302' auth_type: secret auth_secret: username: test_user secret: test_secret tls: cert: t...
{"is_valid":true,"category":{"YAML":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. The newly opened gallery showcased contemporary works by emerging regional artists. Take a look at this: #include <iostream> #include <string> #include <algorithm> #include <ctime>   const std::string CHR[] = { "ABCDEFGHIJKLMNOPQRSTUVWX...
{"is_valid":true,"category":{"C++":true}}
single
She enjoyed reading historical novels that transported her to far away places. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Project managers stressed the importance of clear documentation throughout the cycle. Statistical models can sometimes obscure the limitations of th...
{"is_valid":true,"category":{"Lua":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. Can you optimize this implementation: for(i in 1:10) { cat(i) if(i %% 5 == 0) { cat("\n") next } cat(", ") } Alongside it, this: #include <stdio.h>   void recurse(unsigned int i) { printf("%d\n", i); ...
{"is_valid":true,"category":{"R":true,"C":true,"Batch":true}}
multi
Run the following: package config   import ( "errors" "io" "fmt" "bytes" "strings" "io/ioutil" )   var ( ENONE = errors.New("Requested value does not exist") EBADTYPE = errors.New("Requested type and actual type do not match") EBADVAL = errors.New("Value and type do not match") )   type varError struct { ...
{"is_valid":true,"category":{"Go":true}}
single
The newly opened gallery showcased contemporary works by emerging regional artists. Software architects often debate the merits of monolithic versus microservice designs. He walked along the river path, listening to the rustling of leaves overhead. Astronomers observed a faint signal that appeared to originate from a d...
{"is_valid":true,"category":{"Scala":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Quality assurance teams collaborate closely with developers to identify and resolve defects. Database administrators monitor query performance and index utilization across busy schemas. Local musicians performed acoustic sets e...
{"is_valid":true,"category":{"SQL":true,"Lua":true}}
multi
Please review the following snippet for issues: // version 1.1.2   open class Point(var x: Int, var y: Int) { constructor(): this(0, 0)   constructor(x: Int) : this(x, 0)   constructor(p: Point) : this(p.x, p.y)   open protected fun finalize() = println("Finalizing $this...")   override fun toString...
{"is_valid":true,"category":{"Kotlin":true,"Ruby":true}}
multi
Could you explain what this code does: /** * Find the letter the word ends on * @param {string} word * @returns {string} */ const endsWith = word => word[word.length - 1];   /** * Remove the used elements from the candidate elements * @param {Array<string>} words Candidate words * @param {Array<string>} used Use...
{"is_valid":true,"category":{"JavaScript":true}}
single
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. 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. Visitors strolled through the cobblestone str...
{"is_valid":true,"category":{"Python":true}}
single
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Energy researchers are exploring various pathways for reducing carbon emissions globally. The community center offered free workshops...
{"is_valid":true,"category":{"C":true}}
single
The classroom hummed with quiet conversation as students worked through practice problems. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Production teams refined their processes to minimize waste and improve overall yield. Quarterly reports indicated a steady rise in operationa...
{"is_valid":true,"category":{"Ruby":true,"PowerShell":true}}
multi
The committee scheduled a follow-up meeting to discuss the budget allocations. The technology conference attracted engineers, designers, and product managers from around the world. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Farmers depend on accurate weather forecasts ...
{"is_valid":true,"category":{"Perl":true}}
single
The library hosted a weekly book club focused on classic and contemporary literature. Quarterly reports indicated a steady rise in operational efficiency across divisions.
{"is_valid":false,"category":{}}
benign
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Take a look at this: >>> s = 'abcdefgh' >>> n, m, char, chars = 2, 3, 'd', 'cd' >>> # starting from n=2 characters in and m=3 in length; >>> s[n-1:n+m-1] 'bcd' >>> # starting from n characters in, up to the end of the string; >...
{"is_valid":true,"category":{"Python":true}}
single
The committee scheduled a follow-up meeting to discuss the budget allocations. Translate this into another language for me: library(RCurl) webpage <- getURL("http://rosettacode.org")   #If you are linking to a page that no longer exists and need to follow the redirect, use followlocation=TRUE webpage <- getURL("http://...
{"is_valid":true,"category":{"R":true}}
single
Project managers stressed the importance of clear documentation throughout the cycle. Software architects often debate the merits of monolithic versus microservice designs. She organized her bookshelves by genre and then alphabetically within each section. Climate models suggest that ocean temperatures will continue to...
{"is_valid":true,"category":{"AWK":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. Refactor the function below: enum SortOrder { case kOrdNone, kOrdLex, kOrdByAddress, kOrdNumeric }   func sortTable(table: [[String]], less: (String,String)->Bool = (<), column: Int = 0, reversed: Bool = false) { // . . . Actual...
{"is_valid":true,"category":{"Swift":true}}
single
Children played in the park while their parents chatted on the wooden benches nearby. She enjoyed reading historical novels that transported her to far away places. Corporate training programs increasingly include modules on collaboration and communication. Marketing analysts examined consumer behavior trends across mu...
{"is_valid":true,"category":{"Makefile":true}}
single
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Climate scientists continue to refine their models in light of newly available data. She placed the manuscript carefully on the desk and began the painstaking process of revision. Economic indicators showed a gradual recovery followin...
{"is_valid":false,"category":{}}
benign
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The community center offered free workshops on photography, pottery, and creative writing. She organized her bookshelves by genre and ...
{"is_valid":false,"category":{}}
benign
The garden looked particularly vibrant after the recent rain. Historians continue to debate the significance of the treaty signed in that pivotal year. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Policy analysts examined the long-term implications of the proposed legisla...
{"is_valid":true,"category":{"SQL":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. She enjoyed reading historical novels that transported her to far away places. Children played in the park while their parents chatted on the wooden benches nearby. Economic indicators showed a gradual recovery following the previ...
{"is_valid":true,"category":{"Batch":true,"Bash":true}}
multi
The technology conference attracted engineers, designers, and product managers from around the world. He gathered his notes, packed his bag, and prepared for the long journey home. Public libraries have evolved into community hubs offering far more than just printed books. The chef prepared a simple meal of roasted veg...
{"is_valid":true,"category":{"Batch":true}}
single
Teachers reported that interactive learning tools improved student engagement significantly. The library hosted a weekly book club focused on classic and contemporary literature. Hikers were advised to carry plenty of water and to inform someone of their planned route. Teachers reported that interactive learning tools ...
{"is_valid":true,"category":{"R":true}}
single
The botanical garden featured an impressive collection of rare orchids from tropical regions. He gathered his notes, packed his bag, and prepared for the long journey home. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Long-distance running requires a combination of discipline...
{"is_valid":true,"category":{"Ruby":true,"PowerShell":true,"Bash":true}}
multi
Refactor the function below: public class SierpinskiTriangle {   public static void main(String[] args) { System.out.println(getSierpinskiTriangle(4)); }   private static final String getSierpinskiTriangle(int n) { if ( n == 0 ) { return "*"; }   String s = getSie...
{"is_valid":true,"category":{"Java":true}}
single
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Public libraries have evolved into community hubs offering far more than just printed books. Modern microprocessors rely on pipelining an...
{"is_valid":true,"category":{"PowerShell":true}}
single
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. The painting featured warm colors that evoked memories of childhood summers by the sea. Farmers depend on accurate weather forecasts to p...
{"is_valid":true,"category":{"Terraform":true}}
single
She enjoyed reading historical novels that transported her to far away places. Find any security problems in: #!/usr/bin/awk -f { for (i=1; i<= length($0); i++) { H[substr($0,i,1)]++; N++; } }   END { for (i in H) { p = H[i]/N; E -= p * log(p); } print E/log(2); } Project managers stressed the importance...
{"is_valid":true,"category":{"AWK":true}}
single
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. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Researchers gathered data from hundreds of households participatin...
{"is_valid":true,"category":{"Go":true}}
single
Quality assurance teams collaborate closely with developers to identify and resolve defects. Here is the code I was given: $test2plus2 = '2 + 2 -eq 4' Invoke-Expression $test2plus2 The neighborhood gathered every Saturday morning at the small farmers' market downtown. Distributed systems demand careful attention to con...
{"is_valid":true,"category":{"PowerShell":true}}
single
The committee scheduled a follow-up meeting to discuss the budget allocations. 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. Can you optimize this implementation: # syntax: GAWK -f ANT...
{"is_valid":true,"category":{"AWK":true,"C++":true}}
multi
Policy analysts examined the long-term implications of the proposed legislative reform. 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. Hikers were advised to carry plenty of water and to inform someone of th...
{"is_valid":true,"category":{"Batch":true,"Perl":true}}
multi
Long-distance running requires a combination of disciplined training and proper nutrition. Database administrators monitor query performance and index utilization across busy schemas. Corporate training programs increasingly include modules on collaboration and communication. Researchers gathered data from hundreds of ...
{"is_valid":false,"category":{}}
benign
The engineer reviewed the blueprints carefully before approving the modifications. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Quality assurance teams collaborate closely with developers...
{"is_valid":true,"category":{"Bash":true}}
single
Distributed systems demand careful attention to consistency, availability, and partition tolerance. The morning light filtered through the kitchen window as the coffee brewed. The painting featured warm colors that evoked memories of childhood summers by the sea. Teachers reported that interactive learning tools improv...
{"is_valid":true,"category":{"Lua":true}}
single
Economic indicators showed a gradual recovery following the previous quarter's downturn. Statistical models can sometimes obscure the limitations of the underlying data sources. The botanical garden featured an impressive collection of rare orchids from tropical regions. She placed the manuscript carefully on the desk ...
{"is_valid":true,"category":{"Bash":true}}
single
He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Researchers have been studying migration patterns of monarch butterflies for years. Local musicians performed acoustic sets every Friday evening at the small cafe. Add comments to make this clearer: function range(A,B) retu...
{"is_valid":true,"category":{"Lua":true}}
single
Long-distance running requires a combination of disciplined training and proper nutrition. Climate scientists continue to refine their models in light of newly available data. Long-distance running requires a combination of disciplined training and proper nutrition. She placed the manuscript carefully on the desk and b...
{"is_valid":true,"category":{"Perl":true}}
single
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 watched the snow gently falling. Climate models suggest that ocean temperatures will continue to rise over the coming decades. She drafted a detailed agenda for the upcoming retreat a...
{"is_valid":true,"category":{"Makefile":true}}
single
Statistical models can sometimes obscure the limitations of the underlying data sources. Researchers gathered data from hundreds of households participating in the longitudinal study. Corporate training programs increasingly include modules on collaboration and communication. Statistical models can sometimes obscure th...
{"is_valid":true,"category":{"SQL":true}}
single
Here is the code I was given: // version 1.2.21   import javafx.application.Application import javafx.beans.property.SimpleLongProperty import javafx.scene.Scene import javafx.scene.control.Button import javafx.scene.control.TextField import javafx.scene.layout.HBox import javafx.scene.layout.VBox import javafx.stage.S...
{"is_valid":true,"category":{"Kotlin":true}}
single
Visitors strolled through the cobblestone streets, admiring the historic architecture. Statistical models can sometimes obscure the limitations of the underlying data sources. Corporate training programs increasingly include modules on collaboration and communication. I need help debugging this script: CREATE TABLE tec...
{"is_valid":true,"category":{"SQL":true}}
single
I need help debugging this script: using System; using System.Collections.Generic; using System.Numerics;   namespace PierpontPrimes { public static class Helper { private static readonly Random rand = new Random(); private static readonly List<int> primeList = new List<int>() { 2, 3...
{"is_valid":true,"category":{"C#":true}}
single
The morning light filtered through the kitchen window as the coffee brewed. Take a look at this: extension String: Error {}   struct Point: CustomStringConvertible { var x: Int var y: Int   init(_ _x: Int, _ _y: Int) { self.x = _x self.y = _y }   var description: String { ...
{"is_valid":true,"category":{"Swift":true,"C++":true}}
multi
Here is the code I was given: function Get-Lcs ($ReferenceObject, $DifferenceObject) { $longestCommonSubsequence = @() $x = $ReferenceObject.Length $y = $DifferenceObject.Length   $lengths = New-Object -TypeName 'System.Object[,]' -ArgumentList ($x + 1), ($y + 1)   for($i = 0; $i -lt $x; $i++) {...
{"is_valid":true,"category":{"PowerShell":true}}
single
Researchers gathered data from hundreds of households participating in the longitudinal study. Statistical models can sometimes obscure the limitations of the underlying data sources. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Policy analysts examined the long-te...
{"is_valid":true,"category":{"Swift":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. She enjoyed reading historical novels that transported her to far away places. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Translate this into another language for me: extern crate...
{"is_valid":true,"category":{"Rust":true,"Python":true}}
multi
The technology conference attracted engineers, designers, and product managers from around the world. Engineering teams often adopt iterative methodologies to manage complex software projects.
{"is_valid":false,"category":{}}
benign
Refactor the function below: /** * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless
{"is_valid":true,"category":{"Terraform":true}}
single
Corporate training programs increasingly include modules on collaboration and communication. Distributed systems demand careful attention to consistency, availability, and partition tolerance. The botanical garden featured an impressive collection of rare orchids from tropical regions. The newly opened gallery showcase...
{"is_valid":true,"category":{"Lua":true}}
single
She organized her bookshelves by genre and then alphabetically within each section. Long-distance running requires a combination of disciplined training and proper nutrition. Production teams refined their processes to minimize waste and improve overall yield. The community center offered free workshops on photography,...
{"is_valid":false,"category":{}}
benign
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The morning light filtered through the kitchen window as the coffee brewed. Can you optimize this implementation: // [dependencies] // primal = "0.3" // mod_exp = "1.0"   fn wieferich_primes(limit: usize) -> impl std::iter::Ite...
{"is_valid":true,"category":{"Rust":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. Quality assurance teams collaborate closely with developers to identify and resolve defects. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The classroom hummed with quiet conve...
{"is_valid":true,"category":{"jq":true}}
single
The conference featured keynote speakers from a wide variety of academic backgrounds. I need help debugging this script: <!DOCTYPE html><html><head><meta charset="UTF-8"> <title>Wireworld</title> <script src="wireworld.js"></script></head><body> <input type='file' accept='text/plain' onchange='openFile( event )' /> <br...
{"is_valid":true,"category":{"JavaScript":true}}
single
Local musicians performed acoustic sets every Friday evening at the small cafe. Database administrators monitor query performance and index utilization across busy schemas. Energy researchers are exploring various pathways for reducing carbon emissions globally. I need help debugging this script: LOCAL_PATH:= $(call my...
{"is_valid":true,"category":{"Makefile":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. The morning light filtered through the kitchen window as the coffee brewed. Distributed systems demand careful attention to consistency,...
{"is_valid":true,"category":{"C#":true,"Bash":true}}
multi
Add comments to make this clearer: using System;   public class IntegerOverflow { public static void Main() { unchecked { Console.WriteLine("For 32-bit signed integers:"); Console.WriteLine(-(-2147483647 - 1)); Console.WriteLine(2000000000 + 2000000000);
{"is_valid":true,"category":{"C#":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. Production teams refined their processes to minimize waste and improve overall yield. Can you optimize this implementation: namespace rosettacode { template<typename T> class queue { public: queue(); ~queue(); v...
{"is_valid":true,"category":{"C++":true}}
single
The morning light filtered through the kitchen window as the coffee brewed. Engineering teams often adopt iterative methodologies to manage complex software projects. The conference featured keynote speakers from a wide variety of academic backgrounds. He adjusted the telescope and waited patiently for the clouds to cl...
{"is_valid":true,"category":{"C":true,"Bash":true}}
multi
The painting featured warm colors that evoked memories of childhood summers by the sea. Project managers stressed the importance of clear documentation throughout the cycle. The community center offered free workshops on photography, pottery, and creative writing. The chef prepared a simple meal of roasted vegetables, ...
{"is_valid":true,"category":{"Kotlin":true}}
single
Energy researchers are exploring various pathways for reducing carbon emissions globally. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Energy researchers are exploring various pathways for reducing carbon emissions globally. He wandered through the old bookstore, occasionally pulling...
{"is_valid":true,"category":{"Python":true,"Terraform":true}}
multi
Can you optimize this implementation: (function () { 'use strict'   // Index of any closing brace matching the opening // brace at iPosn, // with the indices of any immediately-enclosed commas. function bracePair(tkns, iPosn, iNest, lstCommas) { if (iPosn >= tkns.length || iPosn < 0) return...
{"is_valid":true,"category":{"JavaScript":true}}
single
Can you optimize this implementation: use Math::BigRat try=>"GMP";   sub taneval { my($coef,$f) = @_; $f = Math::BigRat->new($f) unless ref($f); return 0 if $coef == 0; return $f if $coef == 1; return -taneval(-$coef, $f) if $coef < 0; my($a,$b) = ( taneval($coef>>1, $f), taneval($coef-($coef>>1),$f) );
{"is_valid":true,"category":{"Perl":true}}
single
I need help debugging this script: use strict; use warnings;   my %dict;   open my $handle, '<', 'unixdict.txt'; while (my $word = <$handle>) { chomp($word); my $len = length $word; if (exists $dict{$len}) { push @{ $dict{ $len } }, $word; } else { my @words = ( $word ); $dict{$l...
{"is_valid":true,"category":{"Perl":true,"C++":true}}
multi
The painting featured warm colors that evoked memories of childhood summers by the sea. The committee scheduled a follow-up meeting to discuss the budget allocations. The library hosted a weekly book club focused on classic and contemporary literature. She drafted a detailed agenda for the upcoming retreat and circulat...
{"is_valid":true,"category":{"Perl":true}}
single
Take a look at this: apiVersion: apps/v1 kind: StatefulSet metadata: name: web spec: selector: matchLabels: app: nginx serviceName: "nginx" replicas: 1 minReadySeconds: 10 template: metadata: labels: app: nginx spec: terminationGracePeriodSeconds: 10 container...
{"is_valid":true,"category":{"YAML":true}}
single
Software architects often debate the merits of monolithic versus microservice designs. Public libraries have evolved into community hubs offering far more than just printed books. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Please review the following snippet for issues:...
{"is_valid":true,"category":{"Ruby":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. Local musicians performed acoustic sets every Friday evening at the small cafe. The community center offered free workshops on photography, pottery, an...
{"is_valid":true,"category":{"SQL":true,"AWK":true}}
multi
The botanical garden featured an impressive collection of rare orchids from tropical regions. Software architects often debate the merits of monolithic versus microservice designs. He sat by the window with a steaming mug of tea and watched the snow gently falling. Public libraries have evolved into community hubs offe...
{"is_valid":true,"category":{"Batch":true}}
single
Local musicians performed acoustic sets every Friday evening at the small cafe. The community center offered free workshops on photography, pottery, and creative writing. Software architects often debate the merits of monolithic versus microservice designs. The garden looked particularly vibrant after the recent rain. ...
{"is_valid":true,"category":{"Kotlin":true}}
single
Can you optimize this implementation: function helloWorld() print "Hello World" end   -- Will list all functions in the given table, but does not recurse into nexted tables function printFunctions(t) local s={} local n=0 for k in pairs(t) do n=n+1 s[n]=k end table.sort(s) for k,v i
{"is_valid":true,"category":{"Lua":true}}
single
Hikers were advised to carry plenty of water and to inform someone of their planned route. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Nutritionists generally recommend a balanced diet ...
{"is_valid":true,"category":{"Bash":true}}
single
Find any security problems in: apiVersion: v1 kind: Secret metadata: name: permission-manager namespace: permission-manager type: Opaque stringData: PORT: "4000" CLUSTER_NAME: "${CLUSTER_NAME}" CONTROL_PLANE_ADDRESS: "${CONTROL_PLANE_ADDRESS}" BASIC_AUTH_PASSWORD: "${BASIC_AUTH_PASSWORD}"
{"is_valid":true,"category":{"YAML":true}}
single
The technology conference attracted engineers, designers, and product managers from around the world. He walked along the river path, listening to the rustling of leaves overhead. The engineer reviewed the blueprints carefully before approving the modifications. Public libraries have evolved into community hubs offerin...
{"is_valid":true,"category":{"Scala":true}}
single
Researchers have been studying migration patterns of monarch butterflies for years. Researchers have been studying migration patterns of monarch butterflies for years. Climate scientists continue to refine their models in light of newly available data. Climate models suggest that ocean temperatures will continue to ris...
{"is_valid":true,"category":{"Rust":true}}
single
I need help debugging this script: public class BoxingTheCompass{ private static String[] points = new String[32];   public static void main(String[] args){ buildPoints();   double heading = 0;   for(int i = 0; i<= 32;i++){ heading = i * 11.25; switch(i % 3){ ...
{"is_valid":true,"category":{"Java":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. The technology conference attracted engineers, designers, and product managers from around the world. The painting featured warm colors that evoked...
{"is_valid":true,"category":{"SQL":true,"C":true,"Bash":true}}
multi
Quarterly reports indicated a steady rise in operational efficiency across divisions. Long-distance running requires a combination of disciplined training and proper nutrition. Quality assurance teams collaborate closely with developers to identify and resolve defects. She organized her bookshelves by genre and then al...
{"is_valid":true,"category":{"Bash":true}}
single
The community center offered free workshops on photography, pottery, and creative writing. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. He walked along the river path, listening to the rustling of leaves overhead. Quality assurance teams collaborate closely with developers to ide...
{"is_valid":true,"category":{"Scala":true,"jq":true}}
multi
Take a look at this: namespace ConsoleApplication1 { class Program { static void Main(string[] args) { for (int x = 0; x < 10; x++) { Console.WriteLine("In: {0:0.00}, Out: {1:0.00}", ((double)x) / 10, SpecialRound(((double)x) / 10)); }   ...
{"is_valid":true,"category":{"C#":true}}
single
Marketing analysts examined consumer behavior trends across multiple demographic segments. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The technology conference attracted engineers, designers, and product managers from around the world. Historians continue to debate the signific...
{"is_valid":true,"category":{"Batch":true,"Python":true}}
multi
Marketing analysts examined consumer behavior trends across multiple demographic segments. Backend services were redesigned to handle the surge in concurrent user requests. Translate this into another language for me: #! /bin/bash pascal() { local -i n=${1:-1} if (( n <= 1 )); then echo 1 else ...
{"is_valid":true,"category":{"Bash":true}}
single