prompt large_stringlengths 150 7.97k | target large_stringlengths 32 83 | kind large_stringclasses 3
values |
|---|---|---|
He walked along the river path, listening to the rustling of leaves overhead. Project managers stressed the importance of clear documentation throughout the cycle. Find any security problems in:
def nBytes(x: Double) = ((Math.log(x) / Math.log(2) + 1e-10).round + 1) / 8
val primitives: List[(Any, Long)] =
List(... | {"is_valid":true,"category":{"Scala":true}} | single |
Public libraries have evolved into community hubs offering far more than just printed books. Policy analysts examined the long-term implications of the proposed legislative reform. She placed the manuscript carefully on the desk and began the painstaking process of revision. The neighborhood gathered every Saturday mor... | {"is_valid":true,"category":{"AWK":true,"Swift":true,"C++":true}} | multi |
Quick question about this snippet:
COLORS=(red white blue)
# to go from name to number, we make variables out of the color names
# (e.g. the variable "$red" has value "1").
for (( i=0; i<${#COLORS[@]}; ++i )); do
eval ${COLORS[i]}=$i
done
# Make a random list
function random_balls {
local -i n="$1"
local -i ... | {"is_valid":true,"category":{"Bash":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Find any security problems in:
date # Thu Dec 3 15:38:06 PST 2009
date +%s # 1259883518, seconds since the epoch, like C stdlib time(0) | {"is_valid":true,"category":{"Bash":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. Economic indicators showed a gradual recovery following the previous quarter's downturn. Historians continue to debate the significance of the treaty signed in that pivotal year. Children played in the park while their parents chat... | {"is_valid":true,"category":{"Perl":true}} | single |
The garden looked particularly vibrant after the recent rain. Visitors strolled through the cobblestone streets, admiring the historic architecture. Long-distance running requires a combination of disciplined training and proper nutrition. Add comments to make this clearer:
def is_prime:
if . == 2 then true
else
... | {"is_valid":true,"category":{"jq":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. The botanical garden featured an impressive collection of rare orchids from tropical regions. Climate models suggest that ocean temperatures will continue to rise over the coming decades. Astronomers observed a faint signal that appeared to o... | {"is_valid":true,"category":{"YAML":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Researchers have been studying migration patterns of monarch butterflies for years. Late spring rains caused the lake to swell beyond its usual seasonal boundaries. Researchers gathered data from hundreds of households participating in the... | {"is_valid":true,"category":{"JavaScript":true,"Terraform":true}} | multi |
Here is the code I was given:
/***************************************************************************\
|* Pure UTF-8 handling without detailed error reporting functionality. *|
|***************************************************************************|
|* utf8encode ... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Translate this into another language for me:
object Generators {
def main(args: Array[String]): Unit = {
def squares(n:Int=0):Stream[Int]=(n*n) #:: squares(n+1)
def cubes(n:Int=0):Stream[Int]=(n*n*n) #:: cubes(n+1)
def filtered(s:Stream[Int], c:Stream[Int]):Stream[Int]={
if(s.head>c.head... | {"is_valid":true,"category":{"Scala":true}} | single |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. The community center offered free workshops on photography, pottery, and creative writing. Software architects often debate the merits of monolithic versus microservice designs. Astronomers observed a faint signal that appeare... | {"is_valid":true,"category":{"JavaScript":true}} | single |
Here is the code I was given:
#include <stdio.h>
#include <math.h>
#define N 5
double Pi;
double lroots[N];
double weight[N];
double lcoef[N + 1][N + 1] = {{0}};
void lege_coef()
{
int n, i;
lcoef[0][0] = lcoef[1][1] = 1;
for (n = 2; n <= N; n++) {
lcoef[n][0] = -(n - 1) * lcoef[n - 2][0] / n;
for (i = 1; i ... | {"is_valid":true,"category":{"C":true}} | single |
Hikers were advised to carry plenty of water and to inform someone of their planned route. Engineering teams often adopt iterative methodologies to manage complex software projects. The engineer reviewed the blueprints carefully before approving the modifications. Public libraries have evolved into community hubs offer... | {"is_valid":true,"category":{"Terraform":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. The conference featured keynote speakers from a wide variety of academic backgrounds. The morning light filtered through the kitchen window as the coffee brewed. The engineer reviewed the blueprints carefully before approving the mo... | {"is_valid":true,"category":{"jq":true,"JavaScript":true,"Rust":true}} | multi |
Here is the code I was given:
variable "job_instances" {
description = "List of pairs <job_name>:<job_count> of expected bosh job instance count"
default = []
}
variable "support_email" {
description = "DeskPro email address"
default = "govpaas-alerting-dev@digital.cabinet-office.gov.uk"
}
variable "e... | {"is_valid":true,"category":{"Terraform":true,"C#":true,"Dockerfile":true}} | multi |
Long-distance running requires a combination of disciplined training and proper nutrition. A gentle breeze drifted across the meadow as the sun began to dip below the horizon. The newly opened gallery showcased contemporary works by emerging regional artists. The library hosted a weekly book club focused on classic and... | {"is_valid":true,"category":{"Java":true}} | single |
Marketing analysts examined consumer behavior trends across multiple demographic segments. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Corporate training programs increasingly in... | {"is_valid":true,"category":{"SQL":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Could you explain what this code does:
apiVersion: batch/v1
kind: Job
metadata:
generateName: job-app-
namespace: jobs
spec:
template:
spec:
containers:
- name: job-app
image: cimox/job-app:0.0.6
env:
... | {"is_valid":true,"category":{"YAML":true,"Bash":true}} | multi |
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. Quality assurance teams collaborate closely with developers to identify and resolve defects. Economic indicators showed a gradual recovery following the prev... | {"is_valid":true,"category":{"Python":true}} | single |
Find any security problems in:
#!/usr/bin/env bash
# BrainF*** interpreter in bash
if (( ! $# )); then
printf >&2 'Usage: %s program-file\n' "$0"
exit 1
fi
# load the program
exec 3<"$1"
program=()
while IFS= read -r line <&3; do
mapfile -t instr < <(tr -cd '[]<>.,+-' <<<"$line" | sed $'s/./&\\\n/g') | {"is_valid":true,"category":{"Bash":true}} | single |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Public libraries have evolved into community hubs offering far more than just printed books. Network operators continually upgrade infrastructure to keep pace with growing demand. Database administrators monitor query performance an... | {"is_valid":true,"category":{"Scala":true}} | single |
Find any security problems in:
#include <boost/filesystem/operations.hpp>
#include <ctime>
#include <iostream>
int main( int argc , char *argv[ ] ) {
if ( argc != 2 ) {
std::cerr << "Error! Syntax: moditime <filename>!\n" ;
return 1 ;
}
boost::filesystem::path p( argv[ 1 ] ) ;
if ( bo | {"is_valid":true,"category":{"C++":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Teachers reported that interactive learning tools im... | {"is_valid":true,"category":{"Python":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Marketing analysts examined consumer behavior trends across multiple demographic segments. Could you explain what this code does:
CREATE TABLE Player (pName VARCHAR, yCard VARCHAR, HS VARCHAR);
SELECT pName FROM Player WHERE yCard = '... | {"is_valid":true,"category":{"SQL":true}} | single |
Translate this into another language for me:
[12, 8, 4].each do |remaining|
puts "There are #{remaining} dots.\nHow many dots would you like to take? "
unless (num=gets.to_i).between?(1, 3)
puts "Please enter one of 1, 2 or 3"
redo
end
puts "You took #{num} dots, leaving #{remaining-num}.\nComputer take... | {"is_valid":true,"category":{"Ruby":true}} | single |
Corporate training programs increasingly include modules on collaboration and communication. 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 conference featured keynote speakers from a ... | {"is_valid":false,"category":{}} | benign |
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. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. The neighborhood gathered every Saturday morning at the small farmer... | {"is_valid":true,"category":{"Batch":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Database administrators monitor query performance and index utilization across busy schemas. Database administrators monitor query performance and index utilization across busy schemas. Researchers gathered data from h... | {"is_valid":false,"category":{}} | benign |
He walked along the river path, listening to the rustling of leaves overhead. What does this output:
f=`cat foo.txt` # f will contain the entire contents of the file
printf '%s\n' "$f"
Plus, for comparison, the equivalent here:
import java.awt.event.{KeyAdapter, KeyEvent, MouseAdapter, MouseEvent}
import java.awt.{... | {"is_valid":true,"category":{"Bash":true,"Scala":true}} | multi |
Corporate training programs increasingly include modules on collaboration and communication. Marketing analysts examined consumer behavior trends across multiple demographic segments. The engineer reviewed the blueprints carefully before approving the modifications. The engineer reviewed the blueprints carefully before... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Could you explain what this code does:
package main
import "fmt"
func sieve(limit int) []int {
primes := []int{2}
c := make([]bool, limit+1) // composite = true
// no need to process even numbers > 2
p := 3
for {
p2 := p * p
if p2 > limit {
break
}
fo | {"is_valid":true,"category":{"Go":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Researchers gathered data from hundreds of households participating in the longitudinal study. Local potters fired their kilns once a month, producing colorful ceramics for the shops. Energy researchers are exploring various pathways for reduci... | {"is_valid":true,"category":{"Go":true}} | single |
Find any security problems in:
BEGIN {
# Do not put quotes round the numeric values, or the tests will fail
a = 1 # True
b = 0 # False
# Boolean evaluations
if (a) { print "first test a is true" } # This should print
if (b) { print "second test b is true" } # This should | {"is_valid":true,"category":{"AWK":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. I copied this from the docs:
from functools import total_ordering
from bisect import bisect_left
from heapq import merge
@total_ordering
class Pile(list):
def __lt__(self, other): return self[-1] < other[-1]
def __eq__(self,... | {"is_valid":true,"category":{"Python":true,"Ruby":true}} | multi |
Corporate training programs increasingly include modules on collaboration and communication. Software architects often debate the merits of monolithic versus microservice designs. He walked along the river path, listening to the rustling of leaves overhead. Can you optimize this implementation:
func a() // fun... | {"is_valid":true,"category":{"Go":true}} | single |
Climate scientists continue to refine their models in light of newly available data. Network operators continually upgrade infrastructure to keep pace with growing demand. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The community center offered free workshops on photogra... | {"is_valid":false,"category":{}} | benign |
Software architects often debate the merits of monolithic versus microservice designs. Project managers stressed the importance of clear documentation throughout the cycle. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Statistical models can sometimes obscure the limitations of... | {"is_valid":true,"category":{"Makefile":true,"Swift":true}} | multi |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Distributed systems demand careful attention... | {"is_valid":true,"category":{"jq":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Researchers gathered data from hundreds of households participating in the longitudinal study. Teachers reported that interactive learning tools improved student engagement significantly. Engineering teams often adopt iterative met... | {"is_valid":true,"category":{"Makefile":true}} | single |
Late spring rains caused the lake to swell beyond its usual seasonal boundaries. 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. Visitors strolled through the cobblestone streets, ad... | {"is_valid":true,"category":{"Go":true}} | single |
Please review the following snippet for issues:
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#define MAXLEN 100
typedef char TWord[MAXLEN];
typedef struct Node {
TWord word;
struct Node *next;
} Node;
int is_ordered_word(const TWord word) {
assert(word != NULL);... | {"is_valid":true,"category":{"C":true}} | single |
Economic indicators showed a gradual recovery following the previous quarter's downturn. The committee scheduled a follow-up meeting to discuss the budget allocations. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. Database administrators monitor query performance and index util... | {"is_valid":true,"category":{"AWK":true,"Lua":true}} | multi |
She placed the manuscript carefully on the desk and began the painstaking process of revision. 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. Hikers were advised to carry plenty of water and to i... | {"is_valid":true,"category":{"R":true}} | single |
Translate this into another language for me:
.INTERMEDIATE: testfn testbuildin testheader
testfn:
@echo '#!/bin/bash'>$@
@echo 'echo "void $$1(); int main() {$$1();return 0;}" > testfn.c' >>$@
@echo 'if gcc -o testfn.out testfn.c 2> /dev/null; then echo "#define $$2 1"; else echo "#define $$2 0"; fi' >>$@
@echo '... | {"is_valid":true,"category":{"Makefile":true,"Rust":true}} | multi |
Policy analysts examined the long-term implications of the proposed legislative reform. She enjoyed reading historical novels that transported her to far away places. Policy analysts examined the long-term implications of the proposed legislative reform. Late spring rains caused the lake to swell beyond its usual seaso... | {"is_valid":true,"category":{"AWK":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The committee scheduled a follow-up meeting to discuss the budget allocations. Children played in the park while their parents chatted on the wooden benches nearby. Researchers gathered data from hundreds of households participating... | {"is_valid":true,"category":{"Scala":true}} | single |
Translate this into another language for me:
LOCAL_PATH := $(call my-dir)
################################
include $(CLEAR_VARS)
LOCAL_MODULE := cve-2013-6123
LOCAL_SRC_FILES := put_get_user_check.c
LOCAL_CFLAGS += -Ijni/include/
include $(BUILD_SHARED_LIBRARY)
################################
#################... | {"is_valid":true,"category":{"Makefile":true}} | single |
Engineering teams often adopt iterative methodologies to manage complex software projects. The garden looked particularly vibrant after the recent rain. He adjusted the telescope and waited patiently for the clouds to clear over the observatory. I need help debugging this script:
$string = 'alphaBETA'
$lower = $string... | {"is_valid":true,"category":{"PowerShell":true}} | single |
Children played in the park while their parents chatted on the wooden benches nearby. Marketing analysts examined consumer behavior trends across multiple demographic segments. Production teams refined their processes to minimize waste and improve overall yield. Economic indicators showed a gradual recovery following t... | {"is_valid":true,"category":{"C":true,"Java":true}} | multi |
A gentle breeze drifted across the meadow as the sun began to dip below the horizon. Network operators continually upgrade infrastructure to keep pace with growing demand. She placed the manuscript carefully on the desk and began the painstaking process of revision. Project managers stressed the importance of clear doc... | {"is_valid":true,"category":{"C++":true,"Lua":true}} | multi |
Could you explain what this code does:
function Person(name) {
var candidateIndex = 0;
this.name = name;
this.fiance = null;
this.candidates = [];
this.rank = function(p) {
for (i = 0; i < this.candidates.length; i++)
if (this.candidates[i] === p) return i;
return t... | {"is_valid":true,"category":{"JavaScript":true}} | single |
The technology conference attracted engineers, designers, and product managers from around the world. Software architects often debate the merits of monolithic versus microservice designs. Climate scientists continue to refine their models in light of newly available data. Statistical models can sometimes obscure the l... | {"is_valid":false,"category":{}} | benign |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. The committee scheduled a follow-up meeting to discuss the budget allocations. Production teams refined their processes to minimize waste and improve overall yield. Travelers explored ancient ruins, marveling at the craftsmanship of... | {"is_valid":true,"category":{"R":true}} | single |
He gathered his notes, packed his bag, and prepared for the long journey home. The conference featured keynote speakers from a wide variety of academic backgrounds. | {"is_valid":false,"category":{}} | benign |
The morning light filtered through the kitchen window as the coffee brewed. Network operators continually upgrade infrastructure to keep pace with growing demand. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. He walked along the river path, listening to the rustling of lea... | {"is_valid":true,"category":{"Rust":true}} | single |
What does this output:
// version 1.1.4-3
import java.awt.Color
import java.awt.Graphics
import java.awt.image.BufferedImage
import javax.swing.JOptionPane
import javax.swing.JLabel
import javax.swing.ImageIcon
class BasicBitmapStorage(width: Int, height: Int) {
val image = BufferedImage(width, height, Buffered... | {"is_valid":true,"category":{"Kotlin":true}} | single |
The painting featured warm colors that evoked memories of childhood summers by the sea. Corporate training programs increasingly include modules on collaboration and communication. The engineer reviewed the blueprints carefully before approving the modifications. The conference featured keynote speakers from a wide var... | {"is_valid":false,"category":{}} | benign |
Researchers have been studying migration patterns of monarch butterflies for years. Travelers explored ancient ruins, marveling at the craftsmanship of long-lost civilizations. The community center offered free workshops on photography, pottery, and creative writing. Hikers were advised to carry plenty of water and to ... | {"is_valid":true,"category":{"Ruby":true}} | single |
Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Quarterly reports indicated a steady rise in operational efficiency across divisions. Engineering teams often adopt iterative methodologi... | {"is_valid":true,"category":{"Ruby":true}} | single |
The library hosted a weekly book club focused on classic and contemporary literature. The committee scheduled a follow-up meeting to discuss the budget allocations. Project managers stressed the importance of clear documentation throughout the cycle. Distributed systems demand careful attention to consistency, availabi... | {"is_valid":true,"category":{"Go":true}} | single |
Historians continue to debate the significance of the treaty signed in that pivotal year. Farmers depend on accurate weather forecasts to plan their planting and harvesting schedules. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Add comments to make this clearer:
e... | {"is_valid":true,"category":{"R":true}} | single |
Quick question about this snippet:
library(combinat)
col <- factor(c("Red","Green","White","Yellow","Blue"))
own <- factor(c("English","Swedish","Danish","German","Norwegian"))
pet <- factor(c("Dog","Birds","Cats","Horse","Zebra"))
drink <- factor(c("Coffee","Tea","Milk","Beer","Water"))
smoke <- factor(c("PallMall",... | {"is_valid":true,"category":{"R":true}} | single |
Please review the following snippet for issues:
object Jaro {
fun distance(s1: String, s2: String): Double {
val s1_len = s1.length
val s2_len = s2.length
if (s1_len == 0 && s2_len == 0) return 1.0
val match_distance = Math.max(s1_len, s2_len) / 2 - 1
val s1_matches = Boolean... | {"is_valid":true,"category":{"Kotlin":true}} | single |
Production teams refined their processes to minimize waste and improve overall yield. Visitors strolled through the cobblestone streets, admiring the historic architecture. Nutritionists generally recommend a balanced diet rich in whole grains and fresh produce. He walked along the river path, listening to the rustling... | {"is_valid":true,"category":{"Java":true,"R":true}} | multi |
Economic indicators showed a gradual recovery following the previous quarter's downturn. Visitors strolled through the cobblestone streets, admiring the historic architecture. The neighborhood gathered every Saturday morning at the small farmers' market downtown. Take a look at this:
queens <- function(n) {
a <- seq(... | {"is_valid":true,"category":{"R":true,"Rust":true}} | multi |
The neighborhood gathered every Saturday morning at the small farmers' market downtown. Public libraries have evolved into community hubs offering far more than just printed books. Researchers gathered data from hundreds of households participating in the longitudinal study. Quarterly reports indicated a steady rise in... | {"is_valid":true,"category":{"Swift":true,"C++":true}} | multi |
Distributed systems demand careful attention to consistency, availability, and partition tolerance. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Policy analysts examined the long-term implications of the proposed legislative reform. Volunteers spent the weekend cleaning u... | {"is_valid":true,"category":{"C#":true}} | single |
He walked along the river path, listening to the rustling of leaves overhead. Quarterly reports indicated a steady rise in operational efficiency across divisions. Project managers stressed the importance of clear documentation throughout the cycle. The painting featured warm colors that evoked memories of childhood su... | {"is_valid":true,"category":{"Perl":true}} | single |
Here is the code I was given:
import java.io.*;
import java.nio.*;
import java.nio.file.*;
import java.nio.file.attribute.*;
import java.security.*;
import java.util.*;
public class DuplicateFiles {
public static void main(String[] args) {
if (args.length != 2) {
System.err.println("Directory ... | {"is_valid":true,"category":{"Java":true}} | single |
Project managers stressed the importance of clear documentation throughout the cycle. Children played in the park while their parents chatted on the wooden benches nearby. Historians continue to debate the significance of the treaty signed in that pivotal year. Visitors strolled through the cobblestone streets, admirin... | {"is_valid":true,"category":{"Go":true,"Perl":true}} | multi |
She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Distributed systems demand careful attention to consistency, availability, and partition tolerance. Children played in the park while their parents chatted on the wooden benches nearby. He walked along the river path, listenin... | {"is_valid":true,"category":{"C#":true}} | single |
The botanical garden featured an impressive collection of rare orchids from tropical regions. Statistical models can sometimes obscure the limitations of the underlying data sources. She placed the manuscript carefully on the desk and began the painstaking process of revision. The classroom hummed with quiet conversati... | {"is_valid":true,"category":{"Rust":true,"Perl":true}} | multi |
Visitors strolled through the cobblestone streets, admiring the historic architecture. Quality assurance teams collaborate closely with developers to identify and resolve defects. He wandered through the old bookstore, occasionally pulling a worn paperback from the shelf. The technology conference attracted engineers, ... | {"is_valid":true,"category":{"JavaScript":true,"Kotlin":true}} | multi |
Climate scientists continue to refine their models in light of newly available data. 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. Distributed systems demand careful attention to ... | {"is_valid":true,"category":{"Batch":true}} | single |
The conference featured keynote speakers from a wide variety of academic backgrounds. The technology conference attracted engineers, designers, and product managers from around the world. The bakery on the corner was famous for its sourdough loaves and seasonal pastries. He gathered his notes, packed his bag, and prepa... | {"is_valid":true,"category":{"AWK":true}} | single |
Here is the code I was given:
#
# 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,"R":true}} | multi |
Add comments to make this clearer:
#include <stdio.h>
typedef unsigned long long ull;
int is89(int x)
{
while (1) {
int s = 0;
do s += (x%10)*(x%10); while ((x /= 10));
if (s == 89) return 1;
if (s == 1) return 0;
x = s;
}
}
int main(void)
{
// array bounds is sort of random here, it's big enough... | {"is_valid":true,"category":{"C":true}} | single |
Local musicians performed acoustic sets every Friday evening at the small cafe. Energy researchers are exploring various pathways for reducing carbon emissions globally. She organized her bookshelves by genre and then alphabetically within each section. Travelers explored ancient ruins, marveling at the craftsmanship o... | {"is_valid":true,"category":{"Batch":true}} | single |
Visitors strolled through the cobblestone streets, admiring the historic architecture. The newly opened gallery showcased contemporary works by emerging regional artists. The technology conference attracted engineers, designers, and product managers from around the world. Engineering teams often adopt iterative methodo... | {"is_valid":true,"category":{"Java":true,"C++":true,"Rust":true}} | multi |
Astronomers observed a faint signal that appeared to originate from a distant galaxy. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Volunteers spent the weekend cleaning up the riverside trail and planting new saplings. A gentle breeze drifted across the meadow as the sun ... | {"is_valid":true,"category":{"AWK":true}} | single |
The engineer reviewed the blueprints carefully before approving the modifications. Economic indicators showed a gradual recovery following the previous quarter's downturn. The morning light filtered through the kitchen window as the coffee brewed. The conference featured keynote speakers from a wide variety of academic... | {"is_valid":false,"category":{}} | benign |
Translate this into another language for me:
a <- function(x) {cat("a called\n"); x}
b <- function(x) {cat("b called\n"); x}
tests <- expand.grid(op=list(quote(`||`), quote(`&&`)), x=c(1,0), y=c(1,0))
invisible(apply(tests, 1, function(row) {
call <- substitute(op(a(x),b(y)), row)
cat(deparse(call), "->", eval(... | {"is_valid":true,"category":{"R":true}} | single |
The garden looked particularly vibrant after the recent rain. Modern microprocessors rely on pipelining and out-of-order execution to maximize throughput. Production teams refined their processes to minimize waste and improve overall yield. Teachers reported that interactive learning tools improved student engagement s... | {"is_valid":true,"category":{"SQL":true,"Perl":true}} | multi |
Here is the code I was given:
#include <stdio.h>
#include <math.h>
#define N 5
double Pi;
double lroots[N];
double weight[N];
double lcoef[N + 1][N + 1] = {{0}};
void lege_coef()
{
int n, i;
lcoef[0][0] = lcoef[1][1] = 1;
for (n = 2; n <= N; n++) {
lcoef[n][0] = -(n - 1) * lcoef[n - 2][0] / n;
for (i = 1; i ... | {"is_valid":true,"category":{"C":true}} | single |
The morning light filtered through the kitchen window as the coffee brewed. Production teams refined their processes to minimize waste and improve overall yield. She enjoyed reading historical novels that transported her to far away places. Could you explain what this code does:
import scala.io.Source
object parseCSV... | {"is_valid":true,"category":{"Scala":true}} | single |
Policy analysts examined the long-term implications of the proposed legislative reform. The chef prepared a simple meal of roasted vegetables, fresh bread, and a light vinaigrette. Can you optimize this implementation:
#include <stdio.h>
int main(int argc, char **argv) {
int user1 = 0, user2 = 0;
printf("Ente... | {"is_valid":true,"category":{"C":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. He sat by the window with a steaming mug of tea and watched the snow gently falling. Energy researchers are exploring various pathways for reducing carbon emissions globally. Marketing analysts examined consumer behavior trends across... | {"is_valid":true,"category":{"Rust":true,"Java":true,"Dockerfile":true}} | multi |
Can you optimize this implementation:
apiVersion: apps/v1
kind: Deployment
metadata:
name: graphql-server-deployment
namespace: hm
spec:
replicas: 1
selector:
matchLabels:
component: graphql-server
template:
metadata:
labels:
component: graphql-server
spec:
containers:
... | {"is_valid":true,"category":{"YAML":true}} | single |
The garden looked particularly vibrant after the recent rain. Policy analysts examined the long-term implications of the proposed legislative reform. Researchers have been studying migration patterns of monarch butterflies for years. He sat by the window with a steaming mug of tea and watched the snow gently falling. P... | {"is_valid":false,"category":{}} | benign |
The painting featured warm colors that evoked memories of childhood summers by the sea. Hikers were advised to carry plenty of water and to inform someone of their planned route. Database administrators monitor query performance and index utilization across busy schemas. Children played in the park while their parents ... | {"is_valid":true,"category":{"YAML":true}} | single |
Translate this into another language for me:
# DO NOT EDIT FILES CALLED 'Dockerfile'; they are automatically
# generated. Edit 'Dockerfile.in' and generate the 'Dockerfile'
# with the 'rake' command.
# The suggested name for this image is: bioconductor/devel_base.
FROM rocker/rstudio:devel
MAINTAINER maintainer@bioco... | {"is_valid":true,"category":{"Dockerfile":true}} | single |
Find any security problems in:
# Written by Mutlu Polatcan
# 21.11.2019
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: hadoop-namenode
labels:
app: hadoop
unit: namenode
spec:
serviceName: hadoop
replicas: 1
selector:
matchLabels:
app: hadoop
unit: namenode
template: | {"is_valid":true,"category":{"YAML":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. The morning light filtered through the kitchen window as the coffee brewed. Historians continue to debate the significance of the treaty signed in that pivotal year. Quality assurance teams collaborate closely with developers to id... | {"is_valid":true,"category":{"Swift":true}} | single |
Local potters fired their kilns once a month, producing colorful ceramics for the shops. Hikers were advised to carry plenty of water and to inform someone of their planned route. Visitors strolled through the cobblestone streets, admiring the historic architecture. Teachers reported that interactive learning tools imp... | {"is_valid":true,"category":{"AWK":true}} | single |
Quarterly reports indicated a steady rise in operational efficiency across divisions. Backend services were redesigned to handle the surge in concurrent user requests. Researchers gathered data from hundreds of households participating in the longitudinal study. Farmers depend on accurate weather forecasts to plan thei... | {"is_valid":true,"category":{"Makefile":true}} | single |
Statistical models can sometimes obscure the limitations of the underlying data sources. She drafted a detailed agenda for the upcoming retreat and circulated it to all participants. Production teams refined their processes to minimize waste and improve overall yield. The conference featured keynote speakers from a wid... | {"is_valid":false,"category":{}} | benign |
Production teams refined their processes to minimize waste and improve overall yield. She organized her bookshelves by genre and then alphabetically within each section. She enjoyed reading historical novels that transported her to far away places. The community center offered free workshops on photography, pottery, an... | {"is_valid":true,"category":{"Rust":true}} | single |
The classroom hummed with quiet conversation as students worked through practice problems. The garden looked particularly vibrant after the recent rain. Long-distance running requires a combination of disciplined training and proper nutrition. Modern microprocessors rely on pipelining and out-of-order execution to maxi... | {"is_valid":true,"category":{"C#":true}} | single |
Quick question about this snippet:
#Declaring variables
$intIterations = 10000
$intKept = 0
$intSwitched = 0
#Creating a function
Function Play-MontyHall()
{
#Using a .NET object for randomization
$objRandom = New-Object -TypeName System.Random
#Generating the winning door number
$intWin = $objR... | {"is_valid":true,"category":{"PowerShell":true,"JavaScript":true,"Rust":true}} | multi |
Network operators continually upgrade infrastructure to keep pace with growing demand. Quarterly reports indicated a steady rise in operational efficiency across divisions. Translate this into another language for me:
# usage: gawk -v i=6 -f beersong.awk
function bb(n) {
b = " bottles of beer"
if( n==1 ) { sub("... | {"is_valid":true,"category":{"AWK":true}} | single |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.