prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Translate this into another language for me:
class Card
include Comparable
attr_accessor :ordinal
attr_reader :suit, :face
SUITS = %i(♥ ♦ ♣ ♠)
FACES = %i(2 3 4 5 6 7 8 9 10 j q k a)
def initialize(str)
@face, @suit = parse(str)
@ordinal = FACES.index(@face)
end
def <=> (other) #used for s... | {"is_valid":true,"category":{"Ruby":true}} | single |
Database administrators monitor query performance and index utilization across busy schemas. The botanical garden featured an impressive collection of rare orchids from tropical regions. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Quarterly reports indicated a steady rise in ope... | {"is_valid":true,"category":{"PowerShell":true,"C++":true}} | multi |
Public libraries have evolved into community hubs offering far more than just printed books. The garden looked particularly vibrant after the recent rain. Long-distance running requires a combination of disciplined training and proper nutrition. Economic indicators showed a gradual recovery following the previous quart... | {"is_valid":true,"category":{"Lua":true,"R":true}} | multi |
Corporate training programs increasingly include modules on collaboration and communication. The morning light filtered through the kitchen window as the coffee brewed. The newly opened gallery showcased contemporary works by emerging regional artists. The neighborhood gathered every Saturday morning at the small farme... | {"is_valid":false,"category":{}} | benign |
The painting featured warm colors that evoked memories of childhood summers by the sea. Astronomers observed a faint signal that appeared to originate from a distant galaxy. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. She enjoyed reading historical novels that transported her to ... | {"is_valid":false,"category":{}} | benign |
Database administrators monitor query performance and index utilization across busy schemas. Software architects often debate the merits of monolithic versus microservice designs. Researchers have been studying migration patterns of monarch butterflies for years. Add comments to make this clearer:
CREATE TABLE exhibiti... | {"is_valid":true,"category":{"SQL":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 |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Hikers were advised to carry plenty of water and to inform someone of their planned route. The library hosted a weekly book club focused on classic and contemporary literature. Astronomers observed a faint signal that appeared to origi... | {"is_valid":true,"category":{"C#":true,"YAML":true}} | multi |
Local musicians performed acoustic sets every Friday evening at the small cafe. Network operators continually upgrade infrastructure to keep pace with growing demand. Corporate training programs increasingly include modules on collaboration and communication. Project managers stressed the importance of clear documentat... | {"is_valid":true,"category":{"C#":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. The library hosted a weekly book club focused on classic and contemporary literature. The technology conference attracted engineers, designer... | {"is_valid":true,"category":{"Go":true}} | single |
Can you optimize this implementation:
import java.io.FileInputStream
import java.net.URL
import java.security.KeyStore
import javax.net.ssl.{HttpsURLConnection, KeyManagerFactory, SSLContext}
import scala.io.BufferedSource
object ClientAuthenticated extends App {
val con: HttpsURLConnection =
new URL("htt... | {"is_valid":true,"category":{"Scala":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. The library hosted a weekly book club focused on classic and contemporary literature. Could you explain what this code does:
def is_prime:
. as $n
| if ($n < 2) then false
elif ($n % 2 == 0) then $n == 2
elif ... | {"is_valid":true,"category":{"jq":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. Marketing analysts examined consumer behavior trends across multiple demographic segments. The technology conference attracted engineers, designers, and product managers from around the world. Economic indicators showed a gradual recovery... | {"is_valid":true,"category":{"Perl":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Researchers gathered data from hundreds of households participating in the longitudinal study. Climate scientists continue to refine their models in light of newly available data. Quality assurance teams collaborate closely with deve... | {"is_valid":true,"category":{"JavaScript":true,"R":true,"C#":true}} | multi |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Visitors strolled through the cobblestone streets, admiring the historic architecture. He walked along the river path, listening to the rustling of leaves overhead. Policy analysts examined the long-term implications of the pr... | {"is_valid":false,"category":{}} | benign |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Take a look at this:
WScript.Echo("Enter a string");
var str = WScript.StdIn.ReadLine();
var val = 0;
while (val != 75000) {
WScript.Echo("Enter the integer 75000");
val = parseInt( WScript.StdIn.ReadLine() );
} Distributed sy... | {"is_valid":true,"category":{"JavaScript":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. The neighborhood gathered every Saturday morning at the small farmers' market downtown. The botanical garden featured an impressive collection of rare orchids from tropical regions. Researchers gathered data from hundreds of households particip... | {"is_valid":true,"category":{"Swift":true}} | single |
Please review the following snippet for issues:
public class MagicSquare {
public static void main(String[] args) {
int n = 5;
for (int[] row : magicSquareOdd(n)) {
for (int x : row)
System.out.format("%2s ", x);
System.out.println();
}
Syste... | {"is_valid":true,"category":{"Java":true}} | single |
The newly opened gallery showcased contemporary works by emerging regional artists. Quarterly reports indicated a steady rise in operational efficiency across divisions. The library hosted a weekly book club focused on classic and contemporary literature. Energy researchers are exploring various pathways for reducing c... | {"is_valid":true,"category":{"Ruby":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. He sat by the window with a steaming mug of tea and watched the snow gently falling. Policy analysts examined the long-term implications of the proposed leg... | {"is_valid":true,"category":{"Rust":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Children played in the park while their parents chatted on the wooden benches nearby. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Modern microprocessors rely on pipelining and out-of-order execut... | {"is_valid":true,"category":{"Go":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. Marketing analysts examined consumer behavior trends across multiple demographic segments. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The conference featured keynote speakers f... | {"is_valid":false,"category":{}} | benign |
Economic indicators showed a gradual recovery following the previous quarter's downturn. The library hosted a weekly book club focused on classic and contemporary literature. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. The neighborhood gathered every Saturday morning at ... | {"is_valid":false,"category":{}} | benign |
Run the following:
SHELL := /usr/bin/env bash
RUBY_SOURCE_FILES = $(shell find . -name "*.rb")
GEMSPEC = $(shell find . -name "*.gemspec")
default: .tested
.PHONY: default
.deps: Gemfile.lock
touch $@
Gemfile.lock: Gemfile $(GEMSPEC)
bundle install
touch $@
.tested: .deps $(RUBY_SOURCE_FILES)
bundle exec rspec ... | {"is_valid":true,"category":{"Makefile":true,"Rust":true}} | multi |
Translate this into another language for me:
import Foundation
func setup(ruleset: String) -> [(String, String, Bool)] {
return ruleset.componentsSeparatedByCharactersInSet(NSCharacterSet.newlineCharacterSet())
.filter { $0.rangeOfString("^s*#", options: .RegularExpressionSearch) == nil }
.reduce(... | {"is_valid":true,"category":{"Swift":true}} | single |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Production teams refined their processes to minimize waste and improve overall yield. Researchers gathered data from hundreds of households participating in the longitudinal study. She enjoyed reading historical novels that transported... | {"is_valid":true,"category":{"Bash":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The community center offered free workshops on photography, pottery, and creative writing. Run the following:
$ awk 'BEGIN{split("1 2 3 4 5 6 7 8 9",a);for(i in a)if(!(a[i]%2))r=r" "a[i];print r}' She drafted a detailed agenda for... | {"is_valid":true,"category":{"AWK":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Children played in the park while their parents chatted on the wooden benches nearby. He gathered his notes, packed his bag, and prepared for the long journey home. Production teams refined their processes to minimize waste and i... | {"is_valid":true,"category":{"Makefile":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The garden looked particularly vibrant after the recent rain. The painting featured warm colors that evoked memories of childhood summ... | {"is_valid":true,"category":{"Perl":true}} | single |
Researchers have been studying migration patterns of monarch butterflies for years. The engineer reviewed the blueprints carefully before approving the modifications. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Quality assurance teams collaborate closely with developers to ... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Translate this into another language for me:
function Get-MeanTimeOfDay
{
[CmdletBinding()]
[OutputType([timespan])]
Param
(
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[ValidatePattern("(?:2[0-3]|[01]... | {"is_valid":true,"category":{"PowerShell":true}} | single |
She placed the manuscript carefully on the desk and began the painstaking process of revision. Find any security problems in:
#include <windows.h>
#include <iostream>
#include <string>
//--------------------------------------------------------------------------------------------------
using namespace std;
//-------... | {"is_valid":true,"category":{"C++":true,"Batch":true}} | multi |
Teachers reported that interactive learning tools improved student engagement significantly. Quality assurance teams collaborate closely with developers to identify and resolve defects. Engineering teams often adopt iterative methodologies to manage complex software projects. Engineering teams often adopt iterative met... | {"is_valid":true,"category":{"YAML":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Policy analysts examined the long-term implications of the proposed legislative reform. Climate scientists continue to refine their models in l... | {"is_valid":false,"category":{}} | benign |
Quality assurance teams collaborate closely with developers to identify and resolve defects. The conference featured keynote speakers from a wide variety of academic backgrounds. Refactor the function below:
dir /b "%windir%\system32\*.exe" A gentle breeze drifted across the meadow as the sun began to dip below the hor... | {"is_valid":true,"category":{"Batch":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Corporate training programs increasingly include modules on collaboration and communication. The garden looked particularly vibrant after the recent rain. Distributed systems demand careful attention to consistency, availabil... | {"is_valid":true,"category":{"Java":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Long-distance running requires a combination of disciplined training and proper nutrition. Distributed systems demand careful attent... | {"is_valid":true,"category":{"Bash":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Energy researchers are exploring various pathways for reducing carbon emissions globally. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The bakery on the corner was famous for its sourdough... | {"is_valid":true,"category":{"Ruby":true,"Makefile":true}} | multi |
Can you optimize this implementation:
def longest_increasing_subsequence(X):
"""Returns the Longest Increasing Subsequence in the Given List/Array"""
N = len(X)
P = [0] * N
M = [0] * (N+1)
L = 0
for i in range(N):
lo = 1
hi = L
while lo <= hi:
mid = (lo+hi)//2
... | {"is_valid":true,"category":{"Python":true}} | single |
Please review the following snippet for issues:
List arrayList = new ArrayList();
arrayList.add(new Integer(0));
// alternative with primitive autoboxed to an Integer object automatically
arrayList.add(0);
//other features of ArrayList
//define the type in the arraylist, you can substitute a proprietary class in the... | {"is_valid":true,"category":{"Java":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Policy analysts examined the long-term implications of the proposed legislative reform. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The classroom hummed with quiet conversation as students worked t... | {"is_valid":true,"category":{"AWK":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. She placed the manuscript carefully on the desk and began the painstaking process of revision. Marketing analysts examined consumer b... | {"is_valid":true,"category":{"C":true,"jq":true}} | multi |
Production teams refined their processes to minimize waste and improve overall yield. Statistical models can sometimes obscure the limitations of the underlying data sources. The garden looked particularly vibrant after the recent rain. Quality assurance teams collaborate closely with developers to identify and resolve... | {"is_valid":true,"category":{"Makefile":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Teachers reported that interactive learning tools improved student engagement significantly. She organized her bookshelves by genre and then alphabetically within each section. The library hosted a weekly book club focused on classic ... | {"is_valid":true,"category":{"Makefile":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. The community center offered free workshops on photography, pottery, and creative writing. The library hosted a weekly book club focused on classic and c... | {"is_valid":false,"category":{}} | benign |
Find any security problems in:
# 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 (... | {"is_valid":true,"category":{"Dockerfile":true,"C#":true}} | multi |
Production teams refined their processes to minimize waste and improve overall yield. Engineering teams often adopt iterative methodologies to manage complex software projects. Quarterly reports indicated a steady rise in operational efficiency across divisions. Teachers reported that interactive learning tools improve... | {"is_valid":false,"category":{}} | benign |
The botanical garden featured an impressive collection of rare orchids from tropical regions. 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. The engineer reviewed the blueprints carefully be... | {"is_valid":true,"category":{"jq":true,"Kotlin":true}} | multi |
Researchers gathered data from hundreds of households participating in the longitudinal study. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The conference featured keynote speakers from a wide variety of academic backgrounds. The committee scheduled a follow-up meeting t... | {"is_valid":true,"category":{"C#":true,"Go":true}} | multi |
Long-distance running requires a combination of disciplined training and proper nutrition. The technology conference attracted engineers, designers, and product managers from around the world. The committee scheduled a follow-up meeting to discuss the budget allocations. Astronomers observed a faint signal that appeare... | {"is_valid":true,"category":{"Makefile":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. 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 newly opened gallery showcased contemporar... | {"is_valid":false,"category":{}} | benign |
Production teams refined their processes to minimize waste and improve overall yield. Production teams refined their processes to minimize waste and improve overall yield. He sat by the window with a steaming mug of tea and watched the snow gently falling. Production teams refined their processes to minimize waste and ... | {"is_valid":true,"category":{"Python":true}} | single |
Refactor the function below:
#include <time.h>
#include <iostream>
#include <string>
typedef unsigned char byte;
using namespace std;
class flip
{
public:
flip() { field = 0; target = 0; }
void play( int w, int h ) { wid = w; hei = h; createField(); gameLoop(); }
private:
void gameLoop()
{
int mo... | {"is_valid":true,"category":{"C++":true}} | single |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Climate scientists continue to refine their models in light of newly available data. Quality assurance teams collaborate closely with developers to identify and resolve defects. Backend services were redesigned to handle the s... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. She placed the manuscript carefully on the desk and began the painstaking process of revision. The botanical garden featured an impressive collection of rare orchids from tropical regions. Long-distance running requires a combination ... | {"is_valid":true,"category":{"Scala":true}} | single |
Please review the following snippet for issues:
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR);
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON... | {"is_valid":true,"category":{"SQL":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Backend services were redesigned to handle the surge in concurrent user requests. Hikers were advised to carry plenty of water and to inform someone of their planned route. Policy analysts examined the long-term implications of the pr... | {"is_valid":true,"category":{"Bash":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Policy analysts examined the long-term implications of the proposed legislative reform. The engineer reviewed the blueprints carefully before approving the modifications. The morning light filtered through the kitchen window as... | {"is_valid":true,"category":{"PowerShell":true,"Bash":true}} | multi |
The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Production teams refined their processes to minimize waste and improve overall yield. Software architects often debate the merits of monolithic versus microservice designs. Project managers stressed the importance of clear docu... | {"is_valid":true,"category":{"Ruby":true,"C":true}} | multi |
Please review the following snippet for issues:
# Gen Certs
resource "null_resource" "ssl_gen" {
provisioner "local-exec" {
command = <<EOF
${ path.module }/init-cfssl \
${ var.data_dir }/.cfssl \
${ var.aws_region } \
${ var.internal_tld } \
${ var.k8s_service_ip }
EOF
}
resource "null_resource" "dummy_depen... | {"is_valid":true,"category":{"Terraform":true,"C#":true,"Ruby":true}} | multi |
She placed the manuscript carefully on the desk and began the painstaking process of revision. Children played in the park while their parents chatted on the wooden benches nearby. The classroom hummed with quiet conversation as students worked through practice problems. Nutritionists generally recommend a balanced die... | {"is_valid":true,"category":{"Kotlin":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Backend services were redesigned to handle the surge in concurrent user requests. Network operators continually upgrade infrastructure to keep pace with growing demand. The conference featured keynote speakers from a wide variety of ac... | {"is_valid":true,"category":{"Perl":true}} | single |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. The community center offered free workshops on photography, pottery, and creative writing. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The botanical garden featured an impressive collect... | {"is_valid":true,"category":{"SQL":true,"JavaScript":true}} | multi |
Project managers stressed the importance of clear documentation throughout the cycle. She enjoyed reading historical novels that transported her to far away places. He sat by the window with a steaming mug of tea and watched the snow gently falling. Local musicians performed acoustic sets every Friday evening at the sm... | {"is_valid":false,"category":{}} | benign |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Quick question about this snippet:
function Test-SelfDescribing ([int]$Number)
{
[int[]]$digits = $Number.ToString().ToCharArray() | ForEach-Object {[Char]::GetNumericValue($_)}
[int]$sum = 0
for ($i = 0; $i -lt $di... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Refactor the function below:
#!/bin/bash
# Simulates the "monty hall" probability paradox and shows results.
# http://en.wikipedia.org/wiki/Monty_Hall_problem
# (should rewrite this in C for faster calculating of huge number of rounds)
# (Hacked up by Éric Tremblay, 07.dec.2010)
num_rounds=10 #default number of round... | {"is_valid":true,"category":{"Bash":true}} | single |
Take a look at this:
extern crate rand;
use rand::Rng;
use rand::seq::SliceRandom;
#[derive(Clone, Copy, PartialEq)]
enum Prize {Goat , Car}
const GAMES: usize = 3_000_000;
fn main() {
let mut switch_wins = 0;
let mut rng = rand::thread_rng();
for _ in 0..GAMES {
let mut doors = [Prize::Goat; ... | {"is_valid":true,"category":{"Rust":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Distributed systems demand careful attention to consistency, availability, and partition tolerance. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The community center offered free workshops ... | {"is_valid":true,"category":{"Perl":true}} | single |
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 garden looked particularly vibrant after the recent rain. Project managers stressed the importance of clear documentation throughout the c... | {"is_valid":true,"category":{"Perl":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Researchers have been studying migration patterns of monarch butterflies for years. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Distributed systems demand careful attention to consist... | {"is_valid":true,"category":{"Rust":true}} | single |
Find any security problems in:
HADDOCK_DOCS = YES
SRC_CC_OPTS = -Werror
SRC_HC_OPTS = -Werror -H64m -Onot -fasm
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -Onot -fasm
GhcLibHcOpts = -O -fasm -dcore-lint
GhcLibWays =
SplitObjs = NO
NoFibWays =
STRIP = :
GhcBootLibs | {"is_valid":true,"category":{"Makefile":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. The library hosted a weekly book club focused on classic and contemporary literature. Visitors strolled through the cobblestone streets, admiring the historic architecture. Farmers depend on accurate weather forecasts to plan their planting and... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The painting featured warm colors that evoked memories ... | {"is_valid":false,"category":{}} | benign |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Network operators continually upgrade infrastructure to keep pace with growing demand. He sat by the window with a steaming mug of tea and watched the snow gently falling. The technology conference attracted engineers, designer... | {"is_valid":false,"category":{}} | benign |
Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. She organized her bookshelves by genre and then alphabetically within each section. Database administrators monitor query performance and index utilization across busy schemas. Travelers explored ancient ruins, marveling at th... | {"is_valid":true,"category":{"AWK":true}} | single |
Quality assurance teams collaborate closely with developers to identify and resolve defects. Run the following:
library(RGtk2) # bindings to Gtk
w <- gtkWindowNew()
l <- gtkLabelNew("Goodbye, World!")
w$add(l) | {"is_valid":true,"category":{"R":true}} | single |
She organized her bookshelves by genre and then alphabetically within each section. The morning light filtered through the kitchen window as the coffee brewed. Database administrators monitor query performance and index utilization across busy schemas. A gentle breeze drifted across the meadow as the sun began to dip b... | {"is_valid":true,"category":{"JavaScript":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The newly opened gallery showcased contemporary works by emerging regional artists. The morning light filtered through the kitchen window as the coffee brewe... | {"is_valid":true,"category":{"Lua":true}} | single |
Refactor the function below:
@echo off
:: Pick 2 random, non-zero, 2-digit numbers to send to :_main
set /a param1=%random% %% 98 + 1
set /a param2=%random% %% 98 + 1
call:_main %param1% %param2%
pause>nul
exit /b
:: This is the main function that outputs the answer in the form of "%1 * %2 = %answer%"
:_main
setlocal ... | {"is_valid":true,"category":{"Batch":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Please review the following snippet for issues:
#include <boost/iterator/counting_iterator.hpp>
#include <algorithm>
int factorial(int n)
{
// last is one-past-end
return std::accumulate(boost::counting_iterator<int>(1), boost::cou... | {"is_valid":true,"category":{"C++":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. She organized her bookshelves by genre and the... | {"is_valid":true,"category":{"Terraform":true,"JavaScript":true}} | multi |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Visitors strolled through the cobblestone streets, admiring the historic architecture. Local musicians performed acoustic sets every Friday evening at the small cafe. Find any security problems in:
# degrees to radians
def radians:
(-... | {"is_valid":true,"category":{"jq":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Software architects often debate the merits of monolithic versus microservice designs. Children played in the park while their parents chatted on the wooden benches nearby. He wandered through the old bookstore, occasionally pulling... | {"is_valid":false,"category":{}} | benign |
Public libraries have evolved into community hubs offering far more than just printed books. Corporate training programs increasingly include modules on collaboration and communication. Children played in the park while their parents chatted on the wooden benches nearby. The chef prepared a simple meal of roasted veget... | {"is_valid":true,"category":{"PowerShell":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Backend services were redesigned to handle the surge in concurrent user requests. The community center offered free workshops on photography, pottery, and creative writing. Public libraries have evolved into community hubs offering far more tha... | {"is_valid":true,"category":{"Kotlin":true,"Rust":true}} | multi |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Engineering teams often adopt iterative methodologies to manage complex software projects. He sat by the window with a steaming mug of tea and watched the snow gently falling. Nutritionists generally recommend a balanced diet rich in ... | {"is_valid":false,"category":{}} | benign |
What does this output:
package main
import (
"fmt"
"math/big"
"time"
)
var maxChar = 128
type Node struct {
children []*Node
suffixLink *Node
start int
end *int
suffixIndex int
}
var (
text string
root *Node
lastNewNod... | {"is_valid":true,"category":{"Go":true,"C#":true}} | multi |
Please review the following snippet for issues:
package main
import (
"fmt"
"strconv"
"strings"
)
// types needed to implement general purpose sets are element and set
// element is an interface, allowing different kinds of elements to be
// implemented and stored in sets.
type elem interface {
//... | {"is_valid":true,"category":{"Go":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Quick question about this snippet:
$Set = -split '12 127 28 42 39 113 42 18 44 118 44 37 113 124 37 48 127 36 29 31 125 139 131 115 1... | {"is_valid":true,"category":{"PowerShell":true}} | single |
What does this output:
// version 1.0.6
/* clears console on Windows 10 */
fun cls() = ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor()
fun main(args: Array<String>) {
val units = listOf("tochka", "liniya", "dyuim", "vershok", "piad", "fut",
"arshin", "sazhen", "versta", "... | {"is_valid":true,"category":{"Kotlin":true,"Batch":true,"Swift":true}} | multi |
Historians continue to debate the significance of the treaty signed in that pivotal year. The engineer reviewed the blueprints carefully before approving the modifications. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. A gentle breeze drifted across the meadow as the sun b... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. Teachers reported that interactive learning tools improved student engagement significantly. Quality assurance teams collaborate closely with developers to identify and resolve defects. She placed the manuscript carefully on the desk ... | {"is_valid":true,"category":{"Python":true}} | single |
The committee scheduled a follow-up meeting to discuss the budget allocations. Please review the following snippet for issues:
Get-Process | Out-File -FilePath .\ProcessList.txt
And separately, here's a related piece:
# New log bucket with short TTL for access logs
resource "google_logging_project_bucket_config" "remo... | {"is_valid":true,"category":{"PowerShell":true,"Terraform":true}} | multi |
Add comments to make this clearer:
package main
import "fmt"
func a(k int, x1, x2, x3, x4, x5 func() int) int {
var b func() int
b = func() int {
k--
return a(k, b, x1, x2, x3, x4)
}
if k <= 0 {
return x4() + x5()
}
return b()
}
func main() {
x := func(i int) func() int { return func() int { return i }... | {"is_valid":true,"category":{"Go":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Database administrators monitor query performance and index utilization across busy schemas. Local potters fired their kilns once a month, producing colorful ceramics for the shops. The classroom hummed with quiet conversation as ... | {"is_valid":true,"category":{"Bash":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. 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. Engineering teams often adopt iterative methodologies to m... | {"is_valid":false,"category":{}} | benign |
Refactor the function below:
max.subseq <- function(x) {
cumulative <- cumsum(x)
min.cumulative.so.far <- Reduce(min, cumulative, accumulate=TRUE)
end <- which.max(cumulative-min.cumulative.so.far)
begin <- which.min(c(0, cumulative[1:end]))
if (end >= begin) x[begin:end] else x[c()]
}
Plus, for comparison, ... | {"is_valid":true,"category":{"R":true,"Makefile":true}} | multi |
The morning light filtered through the kitchen window as the coffee brewed. 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. Visitors strolled through the cobblestone streets, admiring the histori... | {"is_valid":true,"category":{"Lua":true}} | single |
Take a look at this:
# syntax: GAWK -f LONG_LITERALS_WITH_CONTINUATIONS.AWK
BEGIN {
ll_using_concatenation() ; ll_info()
ll_using_continuation() ; ll_info()
exit(0)
}
function ll_info( arr,n,x) {
n = split(str,arr," ")
printf("version: %s\n",revised)
printf("number of elements: %d\n",n)
pri... | {"is_valid":true,"category":{"AWK":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. Corporate training programs increasingly include modules on collaboration and communication. Local potters fired their kilns once a month, producing color... | {"is_valid":true,"category":{"Python":true,"AWK":true}} | multi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.