Dataset Viewer
Auto-converted to Parquet Duplicate
conversations
listlengths
2
2
[ { "from": "human", "value": "You are tasked with implementing a client-persistent field strategy in Java using the Apache Tapestry 5 framework. The strategy should implement the PersistentFieldStrategy interface and the LinkCreationListener interface. It should also delegate most of the logic to an instance...
[ { "from": "human", "value": "You are tasked with creating a subroutine that converts cormix output to delft3d sources. The subroutine should take in several input parameters including thick, kmax, dps, s1, disch_nf, sour_nf, lstsci, lsal, ltem, xz, yz, nmmax, kcs, and gdp. These parameters are used to point...
[ { "from": "human", "value": "I'm currently working on a Rails 3 app deployed on Heroku. I want to customize the error pages, specifically the error page for a generic error and the 404 page. Are there any up-to-date tutorials or tips available for achieving this in Rails 3? I've come across several outdated...
[ { "from": "human", "value": "You are tasked with creating a Makefile for a Go project called \"cke\". The Makefile should have the following targets:\n\n1. \"setup\": This target should download the etcd binary from the specified version and extract the etcd and etcdctl binaries to /usr/local/bin.\n2. \"tes...
[ { "from": "human", "value": "How can I create an iOS app that fetches product data from an API and displays it in an organized way?" }, { "from": "gpt", "value": "You can achieve this by implementing the following code in your iOS app. First, import the UIKit framework and create a class called ...
[ { "from": "human", "value": "You are tasked with creating a Lua script that manages a list of players in a game environment. The script should allow for the customization of various settings for each player, such as resolver, autowall, friend status, safe points, maximum misses, and hitscan overrides. The s...
[ { "from": "human", "value": "I need to generate a unique signature for a piece of data in my application. The signature should be a fixed length and should be generated using a secure hashing algorithm. I also need to include a timestamp indicating when the signature was created. Can someone provide a solut...
[ { "from": "human", "value": "You are tasked with creating a system for a Chocobo Trainer NPC in a virtual game. The NPC, named Hantileon, will interact with players and manage the state of a \"ChocoboOnTheLoose\" variable. The player's interactions with the NPC will trigger different events based on the val...
[ { "from": "human", "value": "You are tasked with implementing a CUDA kernel for performing a windowed sum operation on an array of floating-point numbers. The windowed sum operation involves computing the sum of elements within a specified radius around each element in the array.\n\nYou are provided with th...
[ { "from": "human", "value": "I am working on a website and I want to create a navigation bar with a dropdown menu. The navigation bar should have a logo on the left and some menu items on the right. When a user hovers over the dropdown menu, it should display the menu items. I also want to display some imag...
[ { "from": "human", "value": "You are tasked with creating an Android application that displays details of a book. The BookDetailActivity needs to receive data from an Intent and display the details accordingly. The data received can be either a Book object or a BookEntity object, and the activity must be ab...
[ { "from": "human", "value": "You are required to implement a CUDA kernel function for the assignment operation in C++. The assignment operation involves copying elements from one array to another based on the specified dimensions, strides, and starting positions. The CUDA kernel function should be able to h...
[ { "from": "human", "value": "Can an AI help me write a Python program that can process a list of numbers and print out the maximum and minimum values?" }, { "from": "gpt", "value": "Yes, an AI can definitely assist you with that! Here's a Python solution to your problem:\n\n```python\nnumbers = ...
[ { "from": "human", "value": "I need a solution to send data to/from SAS Stored Processes. I want to add a macro to the start of each Stored Process, immediately followed by a call to the macro. The macro should be capable of reading all the input data and creating same-named SAS datasets in the WORK library...
[ { "from": "human", "value": "Can you provide an optimized algorithm for merging two linked lists?" }, { "from": "gpt", "value": "Sure! Here's an example of an optimized algorithm in JavaScript for merging two linked lists:\n\n```javascript\n// Merge linked list function\nconst mergeLinkedLists =...
[ { "from": "human", "value": "You are tasked with creating a service that accepts image data and converts it into imageio array, a subclass of numpy.ndarray, to be used in user-defined API functions. The service should only accept certain image formats and should be able to handle raw files or PIL.Image obje...
[ { "from": "human", "value": "You are tasked with implementing an IDictionary extension method that converts the input dictionary to a hashtable.\n\nWrite a function or method that takes in a dictionary as input and returns a hashtable containing the same elements as the input dictionary.\n\nFor example, if ...
[ { "from": "human", "value": "You are tasked with implementing the parallel ICT factorization algorithm using CUDA for a given sparse matrix. The parallel ICT factorization is a method for efficiently factorizing a matrix into lower and upper triangular matrices. Your task is to implement the `add_candidates...
[ { "from": "human", "value": "I need to create a module in a programming language that can extract a domain from an expression. The module should have three main functions:\n1. Extract a domain bound from an expression: This function should pop off the integration constructors recursively and keep track of t...
[ { "from": "human", "value": "How can I write a SQL query to calculate the total number of orders placed and the total sales revenue for a specific date range?" }, { "from": "gpt", "value": "You can achieve this by using the following SQL query:\n\nSELECT COUNT(*) AS order_count, SUM(amount) AS r...
[ { "from": "human", "value": "I am new to R programming language and more comfortable with Python. I am in search of a Python interface to R that lets me utilize R packages in a Pythonic way. I have found a few packages like Rpy2, PypeR, and pyRserve, but I am not sure which one is the best in terms of contr...
[ { "from": "human", "value": "You are tasked with creating a SAS program to load an ASCII outpatient core file into SAS. The file contains various patient data, such as age, admission source, diagnoses, procedures, and more. Your task is to write a SAS program that includes the creation of SAS informats for ...
[ { "from": "human", "value": "You are tasked with creating a file management system that allows users to add and remove artifacts at specified paths. The system should have a method called \"removeAt\" which takes a path as a parameter and removes the artifact accessible at that path. The artifact could be a...
[ { "from": "human", "value": "You are tasked with creating a protocol in Swift for sending a \"finish\" signal over a socket connection. The protocol should define a method for sending the \"finish\" signal, and any classes or structs conforming to this protocol should be able to implement this method to sen...
[ { "from": "human", "value": "You are tasked with implementing an Off-Heap Memory Monitor in a distributed system using Apache Geode. The Off-Heap Memory Monitor will need to generate events based on memory usage thresholds and handle various scenarios related to memory usage.\n\nYour task is to implement th...
[ { "from": "human", "value": "You are tasked with implementing a wrapper function for performing Remote Procedure Call (RPC) request and receiving its response synchronously. The function should take the request to transmit as an input argument and output the address of the buffer containing the received RPC...
[ { "from": "human", "value": "You are tasked with implementing a CUDA-accelerated convolutional neural network (CNN) using the cuDNN library. Your goal is to create a high-performance CNN with fused convolution layers. You are required to benchmark the performance of the CNN with different settings and optim...
[ { "from": "human", "value": "You are tasked with creating a program in Elm that simulates a card game. The game should have the following functionalities:\n- Increment the running count by 1 and decrement the cards remaining by 1 when the \"Low\" action is triggered\n- Decrement the cards remaining by 1 whe...
[ { "from": "human", "value": "I have a program that is running slow when processing a large dataset. How can I improve the speed of my program by optimizing the code?" }, { "from": "gpt", "value": "One way to improve the speed of your program is by using the pandas library and optimizing the data...
[ { "from": "human", "value": "I have the following code:\n\n```\npackage main\n\nimport (\n \"fmt\"\n)\n\nfunc main() {\n var arr [4]string = [4]string{\"foo\", \"bar\", \"baz\", \"qux\"}\n\n for a, b := range arr {\n fmt.Println(a, b)\n }\n\n // How can I fix this code?\n /*\n fo...
[ { "from": "human", "value": "I am trying to create a custom console properties class for a Cypress test runner in my IntelliJ plugin. The class should extend JsTestConsoleProperties and override certain methods to customize the behavior of the test console. The goal is to add additional actions to the test ...
[ { "from": "human", "value": "You are tasked with creating a CMake macro that, given the full path to a shared library file, returns the SO name of that library, which will be used with dlopen(). The SO name is the name of the library file with the version number appended to it. For example, the SO name of \...
[ { "from": "human", "value": "I need to create a SAS program that uses hash table operations to handle ordered argument tags as expressions. The program should involve creating a hash object and looping through a set of values to store in the hash table." }, { "from": "gpt", "value": "```sas\n/* ...
[ { "from": "human", "value": "I have trained a Support Vector Machine (SVM) using sklearn and dumped the model file using joblib. However, when I dump the model file, I am getting multiple files as follows: ['clf.pkl', 'clf.pkl_01.npy', 'clf.pkl_02.npy', 'clf.pkl_03.npy', 'clf.pkl_04.npy', 'clf.pkl_05.npy', ...
[ { "from": "human", "value": "I recently completed a compilers course in university and now I want to create a toy language to experiment with different language design principles. However, I'm unsure about what language or format I should choose for my compiler's output. I would like to output bytecode for ...
[ { "from": "human", "value": "Can you help me generate a list of 100 random numbers between the ranges of 10 and 50 in a programming language?" }, { "from": "gpt", "value": "Certainly! Here's an example solution in Python:\n\n```python\nimport random\n\nrandom_list = [random.randint(10, 50) for i...
[ { "from": "human", "value": "You are tasked with implementing a pairwise histogram computation for a given set of features in CUDA. The input consists of TCFeature structures, featureCount, fiveBitsFeatureCount, compressedIndex, pairs, weight, partition, partCount, histLineSize, fullPass, parallelStreams, a...
[ { "from": "human", "value": "You are tasked with creating a Java class that acts as a transformation strategy to convert an EntityState object into a former Entity or Pojo object. Your class should have the following requirements:\n- It should be parameterized by the EntityState type.\n- It should have a co...
[ { "from": "human", "value": "I am trying to implement a cache interface in a hardware description language (HDL) called Bluespec SystemVerilog (BSV). I have a module called IBank that represents a cache bank, and it includes several sub-modules like ICRqMshr, IPRqMshr, and L1Pipe. The IBank module has inter...
[ { "from": "human", "value": "What can I do to optimize this given program that calculates the factorial of a given number?" }, { "from": "gpt", "value": "You can optimize the given program by implementing a recursive algorithm instead of using a loop to calculate the factorial. This approach can...
[ { "from": "human", "value": "You are tasked with creating a database management system using B4A (Basic for Android) that involves creating tables, inserting data, updating records, and executing various SQL queries. Your goal is to implement the following functionalities:\n- Copy a database file from the a...
[ { "from": "human", "value": "You are required to create a Python program that reads an image, processes it, and visualizes a bounding box around the detected object. The program should also project 3D points onto a 2D image and visualize the results." }, { "from": "gpt", "value": "```python\nimp...
[ { "from": "human", "value": "You are tasked with creating a test suite for a component called TAbCabKit in the TurboPower Abbrevia library. The test suite should include two test cases: TestComponentLinks and TestDefaultStreaming. The TestComponentLinks should test whether the component links to the Archive...
[ { "from": "human", "value": "You are tasked with creating a CMake file to generate a Makefile for a new project. The project has the following requirements:\n- The top level Makefile should be generated from various files, including \"CMakeCache.txt\", \"../CMakeLists.txt\", and files within specific direct...
[ { "from": "human", "value": "You are tasked with creating a Zig build script to handle the building and testing of a static library. The build script should allow for the selection of build mode between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Additionally, the script should include a test step to...
[ { "from": "human", "value": "I am trying to create a counter component using Elmish, and I want to include the ability to increment the count with a delay. However, I am struggling to implement the functionality for delayed incrementation. Can someone help me create a counter component with the ability to i...
[ { "from": "human", "value": "I am trying to create a Dockerfile for setting up a Rails application using RVM, Ruby 2.2.0, and Rails 4.2.0. I need to install RVM, Ruby, Rails, Unicorn web server, and create a blank Rails app within the Dockerfile. I also need to add unicorn and rubyracer gems to the Gemfile ...
[ { "from": "human", "value": "You are tasked with implementing a function in a programming language that calculates a specific mathematical function. The function should take a single parameter and return a calculated value based on a set of predefined parameters. The parameters are defined as follows:\npara...
[ { "from": "human", "value": "You are tasked with creating a program that generates a series of shapes using a specific set of commands. The program should include functions for creating a \"chunk\", \"a1\", and \"line\", with each function utilizing a specific set of commands to generate the desired shapes....
[ { "from": "human", "value": "You are tasked with implementing a program that checks if a given endomorphism is injective in a finite-dimensional space. An endomorphism is a linear transformation from a vector space to itself. Your program should take as input the matrix representation of the endomorphism an...
README.md exists but content is empty.
Downloads last month
5