prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
Translate this into another language for me:
CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR);
SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211' | {"is_valid":true,"category":{"SQL":true}} | single |
Quick question about this snippet:
#include <stdio.h>
struct ModularArithmetic {
int value;
int modulus;
};
struct ModularArithmetic make(const int value, const int modulus) {
struct ModularArithmetic r = { value % modulus, modulus };
return r;
}
struct ModularArithmetic add(const struct ModularAr... | {"is_valid":true,"category":{"C":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. Climate scientists continue to refine their models in light of newly available data. Project managers stressed the importance of clear documentation throughout the cycle. Project managers stressed the importance of clear docume... | {"is_valid":true,"category":{"Batch":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. She organized her bookshelves by genre and then alphabetically within each section. Researchers gathered data from hundreds of households participating in the longitudinal study. Energy researchers are exploring various pathways ... | {"is_valid":true,"category":{"R":true}} | single |
I need help debugging this script:
#!/bin/bash
# Produce lines of the form: URI TITLE
function titles {
local uri="http://www.rosettacode.org/mw/api.php?action=query&list=categorymembers"
uri+="&cmtitle=Category:Programming_Tasks&cmlimit=5000&format=json"
curl -Ss "$uri" |
jq -r '.query.categorymemb... | {"is_valid":true,"category":{"jq":true}} | single |
I need help debugging this script:
terraform {
backend "gcs" {}
}
provider "google" {
project = "${var.project_id}"
credentials = "${var.serviceaccount_key}"
}
variable "project_id" {}
variable "serviceaccount_key" {}
variable "keyring_name" {}
variable "encryption_keys" {
type = "list"
}
variable "stor... | {"is_valid":true,"category":{"Terraform":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. Take a look at this:
apiVersion: v1
kind: Service
metadata:
name: rook-prometheus
namespace: rook-ceph
spec:
type: LoadBalancer
ports:
- name: web
# nodePort: 30900
port: 9090
protocol: TCP
targetPort: we... | {"is_valid":true,"category":{"YAML":true}} | single |
I copied this from the docs:
# Compute the number of divisors, without calling sqrt
def ndivisors:
def sum(s): reduce s as $x (null; .+$x);
if . == 1 then 1
else . as $n
| sum( label $out
| range(1; $n) as $i
| ($i * $i) as $i2
| if $i2 > $n then break $out
else if $i2 == $... | {"is_valid":true,"category":{"jq":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Add comments to make this clearer:
from numpy import base_repr
def sumDigits(num, base=10):
return sum(int(x, base) for x in list(base_repr(num, ... | {"is_valid":true,"category":{"Python":true}} | single |
Climate scientists continue to refine their models in light of newly available data. Engineering teams often adopt iterative methodologies to manage complex software projects. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. She organized her bookshelves by genre and then alp... | {"is_valid":true,"category":{"Java":true}} | single |
Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Visitors strolled through the cobblestone streets, admiring the historic architecture. Visitors strolled through the cobblestone streets, admir... | {"is_valid":false,"category":{}} | benign |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The morning light filtered through the kitchen window as the coffee brewed. The morning light filtered through the kitchen window as the coffee brewed. Long-distance running requires a combination of disciplined training and proper nut... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Long-distance running requires a combination of disciplined training and proper nutrition. He sat by the window with a steaming mug of tea and watc... | {"is_valid":true,"category":{"Java":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. She enjoyed reading historical novels that transported her to far away places. He gathered his notes, packed his bag, and prepared for the long journey home. The morning light filtered through the kitchen window as the coffee brewe... | {"is_valid":true,"category":{"Swift":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. The newly opened gallery showcased contemporary works by emerging regional artists. Statistical models can sometimes obscure the limitations ... | {"is_valid":true,"category":{"Python":true}} | single |
Translate this into another language for me:
left=()
right=()
value=()
# node node#, left#, right#, value
#
# if value is empty, use node#
node() {
nx=${1:-'Missing node index'}
leftx=${2}
rightx=${3}
val=${4:-$1}
value[$nx]="$val"
left[$nx]="$leftx"
right[$nx]="$rightx"
}
# define the tree
node 1... | {"is_valid":true,"category":{"Bash":true}} | single |
He sat by the window with a steaming mug of tea and watched the snow gently falling. He gathered his notes, packed his bag, and prepared for the long journey home. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The library hosted a weekly book club focused on classic and co... | {"is_valid":true,"category":{"Lua":true,"AWK":true}} | multi |
Children played in the park while their parents chatted on the wooden benches nearby. Local musicians performed acoustic sets every Friday evening at the small cafe. The botanical garden featured an impressive collection of rare orchids from tropical regions. Corporate training programs increasingly include modules on ... | {"is_valid":true,"category":{"Terraform":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. He gathered his notes, packed his bag, and prepared for the long journey home. Policy analysts examined the long-term implications of the proposed legislative reform. The committee scheduled a follow-up meeting to discuss the budget allocat... | {"is_valid":true,"category":{"C":true}} | single |
Refactor the function below:
import java.util.List;
public class ShoelaceFormula {
private static class Point {
int x, y;
Point(int x, int y) {
this.x = x;
this.y = y;
}
@Override
public String toString() {
return String.format("(%d, ... | {"is_valid":true,"category":{"Java":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. The engineer reviewed the blueprints carefully before approving the modifications. Researchers have been studying migration patterns of monarch butterflies for years. She enjoyed reading historical novels that transported her to fa... | {"is_valid":true,"category":{"Lua":true,"AWK":true}} | multi |
Engineering teams often adopt iterative methodologies to manage complex software projects. Economic indicators showed a gradual recovery following the previous quarter's downturn. Network operators continually upgrade infrastructure to keep pace with growing demand. She organized her bookshelves by genre and then alpha... | {"is_valid":true,"category":{"Perl":true}} | single |
Run the following:
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus
namespace: monitoring
labels:
app: prometheus
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: prometheus
template:
... | {"is_valid":true,"category":{"YAML":true}} | single |
Find any security problems in:
resource "datadog_monitor" "dns_can_resolve" {
name = "${format("%s DNS resolution working", var.env)}"
type = "service check"
message = "${format("DNS resolution is failing on {{host.name}} @govpaas-alerting-%s@digital.cabinet-office.gov.uk", var.aws_account)}"
query = "${... | {"is_valid":true,"category":{"Terraform":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Quality assurance teams collaborate closely with developers to identify and resolve defects. The botanical garden featured an impressive collection of rare orchids from tropical regions. Climate models suggest that ocean temperatures will conti... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. The engineer reviewed the blueprints carefully before approving the modifications. Production teams refined their processes to minimize waste and improve overall yield. Refactor the function below:
Delimiters #$:.%\^
Operators , = := == !... | {"is_valid":true,"category":{"Perl":true}} | single |
Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The painting featured warm colors that evoked memories of childhood summers by the sea. He sat by the window with a steaming mug of tea and watched the snow gently falling. Nutritionists generally recommend a balanced diet rich... | {"is_valid":true,"category":{"C":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. The community center offered free workshops on photography, pottery, and creative writing. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Climate scientists continue to refine their models i... | {"is_valid":true,"category":{"Ruby":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Network operators continually upgrade infrastructure to keep pace with growing demand. Could you explain what this code does:
function f(a, b... | {"is_valid":true,"category":{"AWK":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Could you explain what this code does:
fn main() {
let mut a = vec![vec![1., 2.], vec![3., 4.]];
let mut b = vec![vec![0., 5.], vec![6., 7.]];
let mut a_ref = &mut a;
let a_rref = &mut a_ref;
let mut b_r... | {"is_valid":true,"category":{"Rust":true}} | single |
Quick question about this snippet:
# syntax: GAWK -f TRUNCATABLE_PRIMES.AWK
BEGIN {
limit = 1000000
for (i=1; i<=limit; i++) {
if (is_prime(i)) {
prime_count++
arr[i] = ""
if (truncate_left(i) == 1) {
max_left = max(max_left,i)
}
if (truncate_right(i) == 1... | {"is_valid":true,"category":{"AWK":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. Production teams refined their processes to minimize waste and improve overall yield. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Local potters fired their kilns once a month, produ... | {"is_valid":true,"category":{"JavaScript":true,"Dockerfile":true}} | multi |
Researchers have been studying migration patterns of monarch butterflies for years. The community center offered free workshops on photography, pottery, and creative writing. Please review the following snippet for issues:
x <- list(list(1), 2, list(list(3, 4), 5), list(list(list())), list(list(list(6))), 7, 8, list())... | {"is_valid":true,"category":{"R":true}} | single |
Quick question about this snippet:
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ZumkellerNumbers {
public static void main(String[] args) {
int n = 1;
System.out.printf("First 220 Zumkeller numbers:%n");
for ( int count = 1 ; count <= 220 ... | {"is_valid":true,"category":{"Java":true}} | single |
The garden looked particularly vibrant after the recent rain. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Farmers depend on accurate weather forecasts to plan their planting and har... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Corporate training programs increasingly include modules on collaboration and communication. Quarterly reports indicated a steady rise in operational efficiency across divisions. Quarterly reports indicated a steady rise in operational eff... | {"is_valid":true,"category":{"Swift":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. Could you explain what this code does:
import sys
with open(sys.argv[0]) as quine:
code = raw_input("Enter source code: ")
if code == quine.read():
print("Accept")
else:
print("Reject") The chef prep... | {"is_valid":true,"category":{"Python":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. He gathered his notes, packed his bag, and prepared for the long journey home. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The neighborhood gathered every Saturday morning at the small farmers' ... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Here is the code I was given:
#! /bin/bash
declare -a doors
for((i=1; i <= 100; i++)); do
doors[$i]=0
done
for((i=1; i <= 100; i++)); do
for((j=i; j <= 100; j += i)); do
echo $i $j
doors[$j]=$(( doors[j] ^ 1 ))
done
done
for((i=1; i <= 100; i++)); do
if [[ ${doors[$i]} -eq 0 ]]; then | {"is_valid":true,"category":{"Bash":true}} | single |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. 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. Hikers were advised to carry plenty of water and to i... | {"is_valid":true,"category":{"Batch":true}} | single |
I need help debugging this script:
deps <- list(
"des_system_lib" = c("std", "synopsys", "std_cell_lib", "des_system_lib", "dw02", "dw01", "ramlib", "ieee"),
"dw01" = c("ieee", "dw01", "dware", "gtech", "dw04"),
"dw02" = c("ieee", "dw02", "dware"),
"dw03" = c("std", "synopsys", "dware", "dw03", "dw02", "dw01", "ieee", ... | {"is_valid":true,"category":{"R":true}} | single |
Could you explain what this code does:
tutor = True
def halve(x):
return x // 2
def double(x):
return x * 2
def even(x):
return not x % 2
def ethiopian(multiplier, multiplicand):
if tutor:
print("Ethiopian multiplication of %i and %i" %
(multiplier, multiplicand))
resul... | {"is_valid":true,"category":{"Python":true,"C++":true,"Swift":true}} | multi |
She organized her bookshelves by genre and then alphabetically within each section. 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. The community center offered free worksh... | {"is_valid":true,"category":{"Bash":true,"YAML":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. The garden looked particularly vibrant after the recent rain. Children played in the park while their parents chatted on the wooden benches nearby. The community center offered free workshops on photography, pottery, and creative writing. Re... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. She organized her bookshelves by genre and then alphabetically within each section. Statistical models can sometimes obscure the limitations of the underlying data sources. The classroom hummed with quiet conversation as students... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Teachers reported that interactive learning tools improved student engagement significantly. Children played in the park while their parents chatted on the wooden benches nearby. Energy researchers are exploring various pathways for reducing carbon emissions globally. Volunteers spent the weekend cleaning up the rivers... | {"is_valid":true,"category":{"Python":true,"C#":true}} | multi |
The conference featured keynote speakers from a wide variety of academic backgrounds. 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. Project managers stressed the importance of clear ... | {"is_valid":true,"category":{"Rust":true,"JavaScript":true,"Python":true}} | multi |
Database administrators monitor query performance and index utilization across busy schemas. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Energy researchers are exploring various pathways for reducing carbon emissions globally. Quarterly reports indicated a steady rise in operat... | {"is_valid":false,"category":{}} | benign |
Project managers stressed the importance of clear documentation throughout the cycle. She enjoyed reading historical novels that transported her to far away places. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. Backend services were redesigned to handle the surge in concurrent user... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. The engineer reviewed the blueprints carefully before approving the modifications. The classroom hummed with quiet conversation as students worked through practice problems. Modern microprocessors rely on pipelining and out-of-order e... | {"is_valid":true,"category":{"C++":true,"C":true}} | multi |
He sat by the window with a steaming mug of tea and watched the snow gently falling. Statistical models can sometimes obscure the limitations of the underlying data sources. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Backend services were redesigned to handle the surge in c... | {"is_valid":false,"category":{}} | benign |
Run the following:
package expand
// Expander is anything that can be expanded into a slice of strings.
type Expander interface {
Expand() []string
}
// Text is a trivial Expander that expands to a slice with just itself.
type Text string
func (t Text) Expand() []string { return []string{string(t)} }
// Altern... | {"is_valid":true,"category":{"Go":true}} | single |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. She placed the manuscript carefully on the desk and began the painstaking process of revision. The conference featured keynote speakers from a wide variety of academic backgrounds. He gathered his notes, packed his bag, ... | {"is_valid":true,"category":{"jq":true}} | single |
The bakery on the corner was famous for its sourdough loaves and seasonal pastries. 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. Travelers explored ancient ruins, marveling at the craftsmanship o... | {"is_valid":true,"category":{"Terraform":true,"Scala":true}} | multi |
Find any security problems in:
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
"strings"
"unicode"
)
// line represents a single line in the configuration file.
type line struct {
kind lineKind
option string
value string
disabled bool
}
// lineKind represents the different kinds of configu... | {"is_valid":true,"category":{"Go":true,"Dockerfile":true,"jq":true}} | multi |
Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Astronomers observed a faint signal that appeared to originate from a distant galaxy. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Visitors strolled through the cobblestone streets, admiring the h... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Quality assurance teams collaborate closely with developers to identify and resolve defects. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Can you optimize this implementation:
... | {"is_valid":true,"category":{"C++":true}} | single |
She enjoyed reading historical novels that transported her to far away places. Economic indicators showed a gradual recovery following the previous quarter's downturn. The committee scheduled a follow-up meeting to discuss the budget allocations. Long-distance running requires a combination of disciplined training and ... | {"is_valid":true,"category":{"YAML":true}} | single |
Researchers gathered data from hundreds of households participating in the longitudinal study. Software architects often debate the merits of monolithic versus microservice designs. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Local potters fired their kilns once a month... | {"is_valid":true,"category":{"Terraform":true}} | single |
Backend services were redesigned to handle the surge in concurrent user requests. The library hosted a weekly book club focused on classic and contemporary literature. What does this output:
@echo off
::Main thing...
call :Nth 0 25
call :Nth 250 265
call :Nth 1000 1025
pause
exit /b
::The subroutine
:Nth <lbound> <ubo... | {"is_valid":true,"category":{"Batch":true}} | single |
I copied this from the docs:
#!/usr/bin/env bash
declare -A pinyin=(
[甲]='jiă'
[乙]='yĭ'
[丙]='bĭng'
[丁]='dīng'
[戊]='wù'
[己]='jĭ'
[庚]='gēng'
[辛]='xīn'
[壬]='rén'
[癸]='gŭi'
[子]='zĭ'
[丑]='chŏu'
[寅]='yín'
[卯]='măo'
[辰]='chén'
[巳]='sì'
[午]='wŭ'
[未]='wèi'
[申]='shén'
[酉]='yŏu'
[戌]='xū'... | {"is_valid":true,"category":{"Bash":true}} | single |
What does this output:
>>> from itertools import permutations
>>> pieces = 'KQRrBbNN'
>>> starts = {''.join(p).upper() for p in permutations(pieces)
if p.index('B') % 2 != p.index('b') % 2 # Bishop constraint
and ( p.index('r') < p.index('K') < p.index('R') # King constraint ... | {"is_valid":true,"category":{"Python":true,"R":true}} | multi |
She enjoyed reading historical novels that transported her to far away places. Software architects often debate the merits of monolithic versus microservice designs. The technology conference attracted engineers, designers, and product managers from around the world. The morning light filtered through the kitchen windo... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Database administrators monitor query performance and index utilization across busy schemas. Policy analysts examined the long-ter... | {"is_valid":true,"category":{"Makefile":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Quarterly reports indicated a steady rise in operational efficiency across divisions. Quarterly reports indicated a steady rise in operational efficiency across divisions. Engineering teams often adopt iterative methodologies to mana... | {"is_valid":true,"category":{"Python":true}} | single |
Find any security problems in:
use strict;
use warnings;
no warnings 'uninitialized';
use feature 'say';
use constant True => 1;
use List::Util qw(head uniq);
sub GraphNodeColor {
my(%OneMany, %NodeColor, %NodePool, @ColorPool);
my(@data) = @_;
for (@data) {
my($a,$b) = @$_;
push @{$OneM... | {"is_valid":true,"category":{"Perl":true}} | single |
The classroom hummed with quiet conversation as students worked through practice problems. Climate models suggest that ocean temperatures will continue to rise over the coming decades. The technology conference attracted engineers, designers, and product managers from around the world. Farmers depend on accurate weathe... | {"is_valid":false,"category":{}} | benign |
He gathered his notes, packed his bag, and prepared for the long journey home. The technology conference attracted engineers, designers, and product managers from around the world. | {"is_valid":false,"category":{}} | benign |
Please review the following snippet for issues:
library(RDCOMClient)
send.mail <- function(to, title, body) {
olMailItem <- 0
ol <- COMCreate("Outlook.Application")
msg <- ol$CreateItem(olMailItem)
msg[["To"]] <- to
msg[["Subject"]] <- title
msg[["Body"]] <- body
msg$Send()
ol$Quit()
}
send.mail("so... | {"is_valid":true,"category":{"R":true,"Rust":true}} | multi |
Can you optimize this implementation:
use std::fmt::{Display, Formatter};
// We could use std::ops::RangeInclusive, but we would have to extend it to
// normalize self (not much trouble) and it would not have to handle pretty
// printing for it explicitly. So, let's make rather an own type.
#[derive(Clone, Debug, P... | {"is_valid":true,"category":{"Rust":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. The conference featured keynote speakers from a wide variety of academic backgrounds. Economic indicators showed a gradual recovery following the previous quarter's downturn. Local potters fired their kilns once a month, producing ... | {"is_valid":true,"category":{"Makefile":true}} | single |
Please review the following snippet for issues:
_ = love.graphics
p1, p2, points = {}, {}, {}
function hypotenuse( a, b )
return a * a + b * b
end
function love.load()
size = _.getWidth()
currentTime, doub, half = 0, size * 2, size / 2
local b1, b2
for j = 0, size * 2 do
for i = 0, size ... | {"is_valid":true,"category":{"Lua":true}} | single |
Quick question about this snippet:
@echo off
setlocal enableDelayedExpansion
:: 0 = closed
:: 1 = open
:: SET /A treats undefined variable as 0
:: Negation operator ! must be escaped because delayed expansion is enabled
for /l %%p in (1 1 100) do for /l %%d in (%%p %%p 100) do set /a "door%%d=^!door%%d"
for /l %%d in (... | {"is_valid":true,"category":{"Batch":true}} | single |
Add comments to make this clearer:
# ========================================
# ===== Build image for the frontend =====
# ========================================
FROM node:24-alpine@sha256:91aa1bb6b5f57ec5109155332f4af2aa5d73ff7b4512c8e5dfce5dc88dbbae0e AS builder-frontend
WORKDIR /node/src/app
COPY --link web ./
... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Find any security problems in:
public class HelloWorld
{
public static void main(String[] args)
{
System.out.print("Goodbye, World!");
}
} The bakery on the corner was famous for its sourdough loaves and seasonal pastries. E... | {"is_valid":true,"category":{"Java":true}} | single |
I copied this from the docs:
function heapsort($a, $count) {
$a = heapify $a $count
$end = $count - 1
while( $end -gt 0) {
$a[$end], $a[0] = $a[0], $a[$end]
$end--
$a = siftDown $a 0 $end
}
$a
}
function heapify($a, $count) {
$start = [Math]::Floor(($count - 2) / 2)
while($sta... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Please review the following snippet for issues:
import Foundation
typealias SodukuPuzzle = [[Int]]
class Soduku {
let mBoardSize:Int!
let mBoxSize:Int!
var mBoard:SodukuPuzzle!
var mRowSubset:[[Bool]]!
var mColSubset:[[Bool]]!
var mBoxSubset:[[Bool]]!
init(board:SodukuPuzzle) {
... | {"is_valid":true,"category":{"Swift":true}} | single |
Translate this into another language for me:
@echo off
setlocal
set /a "a=%~1, b=%~2"
call :num2bin %a% aStr
call :num2bin %b% bStr
::AND
set /a "val=a&b"
call :display "%a% AND %b%" %val% %aStr% %bStr%
::OR
set /a "val=a|b"
call :display "%a% OR %b%" %val% %aStr% %bStr%
::XOR
set /a "val=a^b"
call :display "%a% XOR... | {"is_valid":true,"category":{"Batch":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. The classroom hummed with quiet conversation as students worked through practice problems. Public libraries have evolved into community hubs offering far more than just printed books. She drafted a detailed agenda for the upcoming retrea... | {"is_valid":true,"category":{"PowerShell":true,"C++":true}} | multi |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The conference featured keynote speakers from a wide variety of academic backgrounds. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Network operators continually upgrade infrastructure ... | {"is_valid":true,"category":{"Rust":true,"Swift":true,"AWK":true}} | multi |
Climate models suggest that ocean temperatures will continue to rise over the coming decades. He walked along the river path, listening to the rustling of leaves overhead. Project managers stressed the importance of clear documentation throughout the cycle. Hikers were advised to carry plenty of water and to inform som... | {"is_valid":true,"category":{"Terraform":true,"Kotlin":true,"Lua":true}} | multi |
Translate this into another language for me:
// version 1.0.6
/* Rather than remove elements from a MutableList which would be a relatively expensive operation
we instead use two arrays:
1. An array of the Ludic numbers to be returned.
2. A 'working' array of a suitable size whose elements are set to 0 to ... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The newly opened gallery showcased contemporary works by emerging regional artists. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The engineer reviewed the blueprints carefully before ... | {"is_valid":true,"category":{"Scala":true,"Swift":true}} | multi |
The painting featured warm colors that evoked memories of childhood summers by the sea. Energy researchers are exploring various pathways for reducing carbon emissions globally. Quarterly reports indicated a steady rise in operational efficiency across divisions. Late spring rains caused the lake to swell beyond its us... | {"is_valid":false,"category":{}} | benign |
Could you explain what this code does:
#include <iostream>
#include <gmpxx.h>
// This function template works for any type representing integers or
// nonnegative integers, and has the standard operator overloads for
// arithmetic and comparison operators, as well as explicit conversion
// from int.
//
// OutputItera... | {"is_valid":true,"category":{"C++":true}} | single |
Network operators continually upgrade infrastructure to keep pace with growing demand. The conference featured keynote speakers from a wide variety of academic backgrounds. Can you optimize this implementation:
>>> def a(answer):
print(" # Called function a(%r) -> %r" % (answer, answer))
return answer
>>> def b(an... | {"is_valid":true,"category":{"Python":true,"Ruby":true}} | multi |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Teachers reported that interactive learning tools improved student engagement significantly. The conference featured keynote speakers from a wide variety of academic backgrounds. Policy analysts examined the long-term implications of t... | {"is_valid":false,"category":{}} | benign |
Take a look at this:
# 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 required by applicable law or agreed to in writing, software
# d... | {"is_valid":true,"category":{"Dockerfile":true,"jq":true}} | multi |
Marketing analysts examined consumer behavior trends across multiple demographic segments. Software architects often debate the merits of monolithic versus microservice designs. Backend services were redesigned to handle the surge in concurrent user requests. Researchers gathered data from hundreds of households partic... | {"is_valid":true,"category":{"Scala":true,"C":true}} | multi |
Translate this into another language for me:
extension Sequence {
func take(_ n: Int) -> [Element] {
var res = [Element]()
for el in self {
guard res.count != n else {
return res
}
res.append(el)
}
return res
}
}
extension String {
func isEsthetic(base: Int = 10) ... | {"is_valid":true,"category":{"Swift":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Climate scientists continue to refine their models in light of newly available data. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. The technology conference attracted engineers, designers... | {"is_valid":true,"category":{"Bash":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Quick question about this snippet:
#!/usr/bin/lua
require "crypto"
print(crypto.digest("MD4", "Rosetta Code")) The engineer reviewed the blueprints carefully before approving the modifications. Researchers have been studying mi... | {"is_valid":true,"category":{"Lua":true}} | single |
Could you explain what this code does:
#
# Copyright (C) 2009 The Android Open Source Project
#
# 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... | {"is_valid":true,"category":{"Makefile":true,"Swift":true}} | multi |
Climate scientists continue to refine their models in light of newly available data. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. I need help debugging this script:
sub sieve {
my $n = shift;
my @composite;
for my $i (2 .. int(sqrt($n))) {
if (!$composite[$i]) ... | {"is_valid":true,"category":{"Perl":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Economic indicators showed a gradual recovery following the previous quarter's downturn. Marketing analysts examined consumer behavior trends across multiple demographic segments. She placed the manuscript carefully on the desk and be... | {"is_valid":true,"category":{"Bash":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. The committee scheduled a follow-up meeting to discuss the budget allocations. Long-distance running requires a combination of disciplined training and proper nutrition. The newly opened gallery showcased contemporary works by emergi... | {"is_valid":true,"category":{"Scala":true}} | single |
Energy researchers are exploring various pathways for reducing carbon emissions globally. Researchers have been studying migration patterns of monarch butterflies for years. Find any security problems in:
CREATE TABLE station (id VARCHAR, local_authority VARCHAR); CREATE TABLE route (station_id VARCHAR, train_id VARCHA... | {"is_valid":true,"category":{"SQL":true}} | single |
Long-distance running requires a combination of disciplined training and proper nutrition. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. | {"is_valid":false,"category":{}} | benign |
Engineering teams often adopt iterative methodologies to manage complex software projects. Here is the code I was given:
local file = io.open("input.txt","r")
local data = file:read("*a")
file:close()
local output = {}
local key = nil
-- iterate through lines
for line in data:gmatch("(.-)\r?\n") do
if line:match("... | {"is_valid":true,"category":{"Lua":true}} | single |
He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. Historians continue to debate the significance of the treaty signed in that pivotal year. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The community center offered free workshops on ... | {"is_valid":false,"category":{}} | benign |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.