source stringclasses 6
values | conversations listlengths 2 2 |
|---|---|
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a program that generates a symmetric security key based on a given key string. The key string is encoded using ASCII encoding, and the resulting byte array is used to create a symmetric security key. Your task is to implement a method that takes a ke... |
dolphin | [
{
"from": "human",
"value": "convert this code to PHP:\n```swift\nfunc sumOfSubarraySums(_ nums: [Int], _ n: Int, _ left: Int, _ right: Int) -> Int {\n let MOD = 1000000007\n var subarraySums = [Int]()\n for i in 0..<n {\n var sum = 0\n for j in i..<n {\n sum += nums[j]\n ... |
glaive | [
{
"from": "human",
"value": "I am working on a shader program in OpenGL with version 3.30, and I am trying to manipulate the color of fragments in my fragment shader. However, I am facing issues with the color calculation part of the shader. I need to write a fragment shader that takes in a texture sample a... |
sharegpt | [
{
"from": "human",
"value": "What is the Python code to remove the characters of odd index in a given string?"
},
{
"from": "gpt",
"value": "<think>\nOkay, so I need to write a Python function that removes characters at odd indices from a given string. Let me think about how to approach this.\n\... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a custom exception handling mechanism in a Java application. Your goal is to create a custom exception class that encapsulates error information and allows for method chaining using the Lombok library.\n\nCreate a Java class named `CustomExceptio... |
glaive | [
{
"from": "human",
"value": "How can I generate a decision tree using scikit-learn and the provided dataset?"
},
{
"from": "gpt",
"value": "<think>\nOkay, the user wants to generate a decision tree using scikit-learn with their dataset. Let me think through the steps.\n\nFirst, I need to make su... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a simple neural network model for classifying handwritten digits using the MNIST dataset. The MNIST dataset consists of 28x28 pixel grayscale images of handwritten digits (0-9). Your goal is to create a Python class, `MNISTModel`, that can train ... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a class that adheres to a given interface and fulfills specific requirements. The interface `IBrokerStoreWriter` is provided as follows:\n\n```java\npublic interface IBrokerStoreWriter {\n void writeData(String data);\n}\n```\n\nYour task is t... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a script that will copy root files from a scratch directory to an output directory. The script should be able to handle any errors that may occur during the copying process and retry the copying operation if necessary. The script must also be able to... |
evolcodegolf | [
{
"from": "human",
"value": "Design a foundational interpreter for a simplified version of an esoteric programming language known as 33, which I previously introduced in other contexts. This interpreter should function with two numeric registers: an accumulator that retains all computed values and a counter... |
glaive | [
{
"from": "human",
"value": "Can I retrieve data from a query directly into the `EmployeeForm` object? \n\nThe query is stored as a stored procedure named `empdata`.\n\n```java\nSELECT a.name,b.username,b.password FROM Tbemployee left join Tbuser\n```\n\nCode:\n\n```java\nList<EmployeeForm> form = new Array... |
sharegpt | [
{
"from": "human",
"value": "I am currently following Django PEP8 styling and I'm getting an error related to line length. The error message is \"models.py:10:80: E501 line too long (83 > 79 characters)\" and it refers to the following line in my models.py: \n```python\nfield = TreeForeignKey('self', null=T... |
glaive | [
{
"from": "human",
"value": "You are asked to write a bootloader program in assembly language that will load a kernel from disk and set up the VESA display mode. The bootloader should also read the available drives, retrieve information about the system's memory map using the e820 interrupt, and detect the ... |
codefeedback | [
{
"from": "human",
"value": "Write a code to generate all string combinations of a given alphabet, where each combination should contain at least one lowercase letter, one uppercase letter, one digit, and one special character. The special characters should include any of the following: !@#$%^&*()_+=-{}[]:;... |
glaive | [
{
"from": "human",
"value": "Write a Java program that simulates a dairy farm with different types of milk-producing animals. Create an enum class called MilkType that contains the following values: COW, SHEEP, GOAT, and DONKEY. Then, create a class called MilkProducer with a method that takes in a MilkType... |
codefeedback | [
{
"from": "human",
"value": "Given the following code, find the output.\ndef f(x):\n if x == 0 or x == 1:\n return 1\n return f(x-1) + f(x-2)\n\nprint(f(10))"
},
{
"from": "gpt",
"value": "<think>\nOkay, let's see. The problem is to find the output of the function f(10) ... |
evolcodegolf | [
{
"from": "human",
"value": "Background \nShakashaka is a complex puzzle played on a grid, where the objective entails placing various half-squares (right triangles) in the empty cells, ensuring that all remaining contiguous regions manifest as rectangles, either positioned upright or rotated at a 45-degre... |
evolcodegolf | [
{
"from": "human",
"value": "Your assignment involves generating a comprehensive hexadecimal multiplication table, formatted as follows: \n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \n00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F \n00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E \n00 03 06 09 0C ... |
dolphin | [
{
"from": "human",
"value": "port this code from Kotlin to Elixir:\n```kotlin\nfun chessboardMinMoves(board: Array<IntArray>): Int {\n val n = board.size\n val rowSum = IntArray(n)\n val colSum = IntArray(n)\n var rowDiffCount = 0\n var colDiffCount = 0\n for (i in 0 until n) {\n fo... |
dolphin | [
{
"from": "human",
"value": "port this code from java to Perl:\n```java\npublic int min_operations(int n) {\n int count = 1;\n int temp = 1;\n\n while (temp % n != 0) {\n temp = (temp * 2) % n;\n count++;\n }\n\n return count;\n}\n```\n"
},
{
"from": "gpt",
"value": ... |
codefeedback | [
{
"from": "human",
"value": "Design and implement a password manager application with the following requirements:\n\n1. The application should allow users to create an account by providing a username, email address, and a strong password that meets the following criteria:\n a. The password must be at leas... |
sharegpt | [
{
"from": "human",
"value": "I need to create a function in Python that takes a string and a character as input and returns the number of times that character appears in the string. How can I accomplish this?"
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to create a Python function that c... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a program to analyze and process match data for a mentoring program. The data consists of various fields such as MatchNum, AgencyName, MatchType, MatchStatus, SurveyType, YOSScheduledDate, YOSCompletionDate, Q1, Q2Neg, Q3Neg, Q4Neg, and many more. Yo... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a PaperModel class in TypeScript to represent academic papers. The class should have properties to store information about the paper, such as its title, abstract, authors, publication venue, publication date, and a unique identifier. Additionally... |
codefeedback | [
{
"from": "human",
"value": "Develop a JavaScript program that validates a HTML form that collects 7 user details: full name, national identification number (applicable to country of choice), birth date in ISO 8601 format, mobile number with international dialing code, street address that adheres to USPS ad... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Python function that calculates the factorial of a given non-negative integer. The factorial of a non-negative integer n is the product of all positive integers less than or equal to n. For example, the factorial of 5 (denoted as 5!) is calculated ... |
evolcodegolf | [
{
"from": "human",
"value": "Challenge overview \nA \"non-fixed point transformation\" of a list entails rearranging its elements such that no element remains in the index it originally occupied. For instance, the arrangement XYZAB is a non-fixed point transformation of ABCXY, while ABXCY is not: \nABCXY ... |
codefeedback | [
{
"from": "human",
"value": "You are working on a project that involves building a command-handling system for a fabric-based event-sourcing architecture. The code snippet provided is a TypeScript module that imports and exports various components related to this system. Your task is to create a TypeScript ... |
evolcodegolf | [
{
"from": "human",
"value": "Given a series of four integers, analyze whether the series forms a quadratic sequence (of the pattern [a, a+b, a+2b+c, a+3b+3c]) or a cubic sequence (of the form [a, a+d, a+2d+e, a+3d+3e+f]) by providing the fifth term that completes it (a+4b+6c for quadratic, a+4d+6e+4f for cu... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a Perl transformer that renames the `qx()` operator to `qqx()` in Perl code. The Perl6 language supports the `qqx()` operator, which is more similar to the Perl5 `qx()` operator. Your task is to implement a Perl transformer that can perform this rena... |
sharegpt | [
{
"from": "human",
"value": "How can I construct a GraphQL query to fetch a list of products from a given API?"
},
{
"from": "gpt",
"value": "<think>\nOkay, so I need to construct a GraphQL query to fetch a list of products from an API. Hmm, where do I start? Let me think. I remember that GraphQ... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with implementing a URI parser interface in a programming language of your choice. The interface, `Parser`, contains a method `parseURI` that takes a string representing a URI and returns an object with parsed URI parts. The parsed URI parts should include the sch... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a PHP function that processes data from an API and displays it on a web page. The function should retrieve data from the API using a model, format it into an array, and then load a view to display the data on a web page. Your task is to complete the ... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python class to represent a 2D board. The board will be represented as a 2D array, and the class should provide methods to set values at specific positions and to display the board as a string.\n\nYou need to implement the following methods in ... |
sharegpt | [
{
"from": "human",
"value": "Create a function that takes an array as a parameter and continuously adds each item to the total sum, but only if the current item is larger than the previous item. The array will only contain positive integers. The function should return the total sum of all the valid items in... |
glaive | [
{
"from": "human",
"value": "Why can't I access a web server on localhost port 5000 on macOS v12 (Monterey) with Flask or any other web server and how do I fix it? When I try to use the built-in HTTP server on port 5000, I get this OSError: [Errno 48] Address already in use. Here is the stack trace:\n\n```\... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a function that takes a user object as a parameter and returns a modified object based on certain conditions. The function should check if the user object has a credentials property. If it does, the function should add a hawk property to the returned... |
sharegpt | [
{
"from": "human",
"value": "How can I create a function in AI that searches a database of records and returns those that match specific conditions?"
},
{
"from": "gpt",
"value": "<think>\nOkay, the user wants to create an AI function that searches a database and returns records matching specifi... |
codefeedback | [
{
"from": "human",
"value": "Create a smart contract in Solidity for executing a will with increased complexity.\n\nThe will is to be activated when the testator is no longer alive. Additionally, the will should only be activated if a specific condition is met, such as the testator's assets being transferre... |
evolcodegolf | [
{
"from": "human",
"value": "You have received a meticulously encoded communication from your strategic collaborator that has been transformed using the intricate VIC cipher methodology. Given that the VIC cipher is characterized by its elaborate structure, your task is to design a compact program that can ... |
codefeedback | [
{
"from": "human",
"value": "Create a regex to extract all the names (first name and last name) from a string \"John Doe is a programmer and Jane Smith is a doctor\". Additionally, ensure that the regex does not extract any middle initials that might be present in the names. The names should be in the forma... |
evolcodegolf | [
{
"from": "human",
"value": "While the programming language in question appears to be quite entertaining, it seems that the official website is currently inoperative, and the information available on the EsoLangs page lacks sufficient detail and seems to be incomplete. Are there alternative resources or rep... |
sharegpt | [
{
"from": "human",
"value": "How can I interrupt running cells in an IPython Notebook in Firefox similar to using CTRL+C in the terminal? I'm using the Anaconda distribution of IPython notebook with Firefox on Mac OS X. Sometimes, I write code with high memory requirements or an infinite loop, and the \"int... |
sharegpt | [
{
"from": "human",
"value": "I am having trouble getting Capybara to work with RSpec. When I run my tests, I get the following error message:\n\n```\nundefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1:0x16529f8 @example=nil>\n```\n\nI have already checked that my specs are located in the cor... |
sharegpt | [
{
"from": "human",
"value": "Implement a sorting algorithm of your choice to sort the provided list in ascending order after filtering out all the even numbers and the numbers divisible by 5. Once you have filtered and sorted the list, calculate and print the sum of the last two numbers from the sorted list... |
evolcodegolf | [
{
"from": "human",
"value": "Devise a program that generates TeX (LaTeX) math-equation code (as specified below) to accurately typeset a Sierpinski Triangle Fractal with precisely 5 levels of depth. The objective is to achieve the solution with the minimal number of characters, thereby maximizing brevity. \... |
glaive | [
{
"from": "human",
"value": "I am new to assembly programming and I have a basic question. In the following code snippet, the value of AL is assigned as FE. However, I expected it to be 00. Can someone explain why this is the case?\n\n```assembly\nMOV BL,0ff;\nMOV AL,0ff;\nADD AL,BL\n```"
},
{
"from... |
sharegpt | [
{
"from": "human",
"value": "Suggest a completion for the following Python code to find the depth of a given binary tree and the total number of nodes in the tree. Additionally, modify the code to return the total number of leaf nodes in the binary tree.\n\n```python\nclass Node:\n def __init__(self, dat... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a shader in Unity that simulates fog volume effects for directional light. The shader should have the following properties:\n- \"_Cutoff\" property to control the alpha cutoff with a range between 0 and 1, default value of 0.5\n- \"_MainTex\" propert... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a shader program that takes in two textures (back and src), and applies various transformations and operations to generate the final output color. The shader will be responsible for computing the final color based on the input textures and specific c... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a GameMaker Studio 2 game and need to configure the Windows options for the game. The options include settings for fullscreen switching, borderless window, company information, executable name, icon, splash screen, Vsync, and more. You need to write ... |
glaive | [
{
"from": "human",
"value": "You are tasked with implementing a text widget using OpenGL and FreeType in Scheme. The text widget should be able to render text using a given font and size, and it should provide the ability to set the color, position, scale, and text to be rendered. Additionally, the widget s... |
sharegpt | [
{
"from": "human",
"value": "Write a Ruby function that reverses a string without using any built-in reverse functions. The function should also handle unicode characters effectively."
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to write a Ruby function that reverses a string without usi... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Python function that generates a Jupyter Notebook deployment configuration based on the given module and port information. The function should take the module details and port information as input and return a dictionary representing the Jupyter No... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a program that manages different types of events and their details. The program should be able to handle two types of events: daily live streams and retreats.\n\nFor daily live streams, the program should be able to exclude specific dates from the li... |
evolcodegolf | [
{
"from": "human",
"value": "Design a program that executes via ./app-name without any command-line inputs. The app-name must exclude letters from /etc/hosts, specifically the characters bghjkqxyz. The program is limited to reading only /etc/hosts, and cannot access its own source code or any other files. T... |
evolcodegolf | [
{
"from": "human",
"value": "Given the following Python 3 code snippet intended to output a friendly greeting:\n\n```python\ndef greet():\n print(\"Hello, world!\")\n\ngreet()\n```\n\nPlease enhance this script by appending multiple lines to the text file, ensuring it functions both as an executable Pyth... |
glaive | [
{
"from": "human",
"value": "I am trying to create a JavaScript function that can validate user-input. Can you help me with that?"
},
{
"from": "gpt",
"value": "<think>\nOkay, the user wants to create a JavaScript function to validate user input. Let me think about how to approach this. First, I... |
codefeedback | [
{
"from": "human",
"value": "Create a function that takes in a timezone as a parameter and returns an instance of the Date class that represents the current date and time in that timezone. The function should also include error handling for invalid timezones.\n\nIn addition, the function should also include... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a function that validates the correctness of a given list of filters for a specific path in a web application. The function should take the path and the list of filters as input and return a boolean value indicating whether the filters are valid ... |
glaive | [
{
"from": "human",
"value": "What is the JavaScript code to determine if a given number is a Fibonacci number or not?"
},
{
"from": "gpt",
"value": "<think>\nOkay, I need to figure out how to write JavaScript code to determine if a given number is a Fibonacci number. Hmm, let's start by recallin... |
evolcodegolf | [
{
"from": "human",
"value": "In the ongoing debate regarding the eternal rivalry between spaces and tabs, the consensus has been established—spaces, the indisputably superior choice, have prevailed. Nevertheless, there remain dissenters who stubbornly cling to their erroneous beliefs. You have recently come... |
evolcodegolf | [
{
"from": "human",
"value": "Implement a run-length encoding algorithm to compress (or maintain) the given strings while adhering to specified input and output formats. \nInput: \nheeeello \nwoooorld \n\nOutput: \n1h4e2l1o \n1w4o1r1l1d \n\nEnsure to read lines from standard input. \nOutput should be... |
dolphin | [
{
"from": "human",
"value": "translate this code to TypeScript:\n```julia\nusing DataStructures\n\nstruct FreqStack\n freq::Dict{Int, Int}\n group::Dict{Int, Deque{Int}}\nend\n\nfunction FreqStack()\n freq = Dict{Int, Int}()\n group = Dict{Int, Deque{Int}}()\n return FreqStack(freq, group)\ne... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with implementing a custom debugging feature for a compiler in Rust. The given code snippet is a part of a Rust program that defines a trait and its implementation for debugging purposes. The `write!` macro is used to format and write the compiler's identifier to ... |
evolcodegolf | [
{
"from": "human",
"value": "Create a function or program that takes an integer N as input and prints or returns a unique N-by-N multiplication spiral matrix. The implementation must be theoretically capable of handling N values ranging from 0 to 1000 (though producing this output can be quite challenging).... |
codefeedback | [
{
"from": "human",
"value": "Further complicate a provided programming test problem by giving a faulty code section and asking to design a custom data structure, as well as creating an extra helper function for organizing:\n\nComplete the code below, rectify the shortcomings in the `get_non_repeating_elemen... |
evolcodegolf | [
{
"from": "human",
"value": "Your objective is to, as the title subtly implies, create a remarkably subpar transition animation of a single term morphing into an alternate term on behalf of yours truly. \n\nWhat precisely constitutes this \"transition animation,\" you may inquire? \nTo engineer an impressiv... |
glaive | [
{
"from": "human",
"value": "You are working on a CMake project and need to define the set of files for implicit dependencies and preprocessor definitions for a specific target in your project. Additionally, you need to specify the include file search paths and the targets to which this target links. \n\nDe... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Python script that automates the installation of required packages for a data science project. The script should install three specific packages - `cmake`, `Cython`, and upgrade `numpy` to the latest version using `pip3`. Your task is to write a Py... |
dolphin | [
{
"from": "human",
"value": "translate this code from Mojo to Dart:\n```\nclass TreeNode(val, left, right)\n var val = val\n var left = left\n var right = right\n\nend\n\nsub constructMaximumBinaryTree(nums)\n sub helper(nums, left, right)\n if left > right\n return null\n ... |
codefeedback | [
{
"from": "human",
"value": "Write a Python Class to store a telephone directory's details. The class should be able to handle a large number of entries efficiently, with a maximum time complexity of O(log n) for searching, inserting, and deleting entries, where n is the number of entries in the directory. ... |
sharegpt | [
{
"from": "human",
"value": "Given the following erroneous JavaScript code snippet:\n\n```javascript\nfunction calculateArea(dimensions) {\n var area = dimensions.height * dimensions.width;\n return area;\n}\n\ncalculateArea({ width: 10 });\n```\n\n1. Explain why this code results in `NaN` when it's e... |
glaive | [
{
"from": "human",
"value": "I am working on a project and need to run CMake with specific options for each test case. I want to protect the tests from running inside the default install prefix by setting the test options to a non-default prefix. I need to run CMake with the following options: \n- CMP0041-O... |
magicoder | [
{
"from": "human",
"value": "You are tasked with creating a Python program that manages a queue of tasks using a custom scheduler. The scheduler is responsible for determining the order in which tasks are executed based on their priority and other factors. Your goal is to implement the scheduling logic for ... |
codefeedback | [
{
"from": "human",
"value": "Design a database schema for storing user information such as their email, name, avatar, password, and their preferred language. Additionally, implement a feature that allows users to reset their passwords by sending a verification code to their email. However, ensure that the v... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a simplified version of a drawing application that can render basic shapes on a canvas. The canvas is represented as a 2D grid, and shapes are defined by a set of points and lines connecting these points. Your goal is to implement a function that... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a function that processes a given style object and returns a modified version of it. The style object contains properties for a component's style, and the function should handle cases where the input style is null or undefined. \n\nYou need to im... |
codefeedback | [
{
"from": "human",
"value": "Write a function to find the kth to last element in a singly linked list, where k is a positive integer less than or equal to the length of the list.\n\n# Example\n```python\nclass ListNode:\n def __init__(self, val=0, next=None):\n self.val = val\n self.next = ... |
dolphin | [
{
"from": "human",
"value": "translate this code from Lisp to F#:\n```lisp\n(defun max-gold (grid)\n (let ((m (length grid))\n (n (length (first grid))))\n (let ((max-gold 0)\n (dp (make-array (list m n))))\n (dotimes (i m)\n (dotimes (j n)\n (when (> (aref grid i j)... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python class that represents a private endpoint connection resource. The class should have attributes for private endpoint and private link service connection state. Additionally, you need to implement a method to update the private link servic... |
sharegpt | [
{
"from": "human",
"value": "How can I create a Swift 4 program that validates an email address?"
},
{
"from": "gpt",
"value": "<think>\nOkay, so I need to create a Swift 4 program that validates an email address. Hmm, where do I start? Well, I know that email validation typically involves check... |
sharegpt | [
{
"from": "human",
"value": "What is the purpose of a standalone label in assembly languages? Can the label FNDLP be considered the same as FL1?\n\nDoes the label FNDNXT refer to the location containing the first INX D instruction? Is the fact that it is in its own line, unlike FL2, just a matter of coding ... |
dolphin | [
{
"from": "human",
"value": "convert this code from Perl to Scheme:\n```perl\nsub partition_labels {\n my ($s) = @_;\n my %last;\n for (my $i = 0; $i < length($s); $i++) {\n $last{substr($s, $i, 1)} = $i;\n }\n my @ans;\n my $j = 0;\n my $anchor = 0;\n for (my $i = 0; $i < len... |
sharegpt | [
{
"from": "human",
"value": "I need to design a web page that displays a professor's contact information. Can you provide a code example to achieve this?"
},
{
"from": "gpt",
"value": "<think>\nOkay, the user needs to create a webpage for a professor's contact info. Let me think about how to app... |
glaive | [
{
"from": "human",
"value": "You are required to create a graphing package to generate Encapsulated-PostScript files. The package should be designed to take a dataset from a 2-dimensional array, with corresponding coordinates in rows, and plot the coordinates from any pair of columns. The graphing procedure... |
glaive | [
{
"from": "human",
"value": "You need to create a Perl script to download GFS forecast files from the nomads.ncep.noaa.gov server. The script should take the following arguments:\n1. action: either \"inv\" to display the inventory of the first data file or \"data\" to get data\n2. YYYYMMDDHH: starting time ... |
dolphin | [
{
"from": "human",
"value": "convert this code from ANSI C to Haskell:\n```c\nvoid generateStrings(int n, char* current, char** strings, int* stringsSize, int* returnSize) {\n if (n == 0) {\n strings[*stringsSize] = (char*) malloc((strlen(current) + 1) * sizeof(char));\n strcpy(strings[*str... |
evolcodegolf | [
{
"from": "human",
"value": "In contemplating the significance of Monday, October 31st, as Halloween, a question arises regarding the intriguing pattern of other months within the same year that also conclude with a Monday. Specifically, could you identify all months in a provided year where the final day o... |
magicoder | [
{
"from": "human",
"value": "You are tasked with implementing a Python function that processes a list of database migration operations and extracts specific information from it. Each operation is represented as a dictionary containing details about a database migration. The function should extract the model... |
codefeedback | [
{
"from": "human",
"value": "Please rewrite the code snippet to calculate the area of a rectangle with the following requirements:\n\n- The function should take in two parameters: length and width.\n- The function should return the calculated area as a float, rounded to 2 decimal places.\n- The function sho... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a React component that renders a field editor for MVT (Map Vector Tile) configurations. The component should handle different field types and validate input to ensure no empty names or duplicate names are allowed. You need to implement the logic to r... |
evolcodegolf | [
{
"from": "human",
"value": "A rigid transformation of a square array is defined as a mapping from square arrays of a particular size to square arrays of the same size, whereby the elements of the array are rearranged such that the distance to each other element remains unchanged. If one were to print the m... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating an Emacs theme called \"paganini\" with the following specifications:\n- The theme should have a dark and warm color scheme.\n- The default background color should be \"#191919\" and the default foreground color should be \"#F8F8F2\".\n- The region s... |
codefeedback | [
{
"from": "human",
"value": "Given a dataset containing information about various bird species, create a program that can classify each bird based on its physical characteristics. The dataset includes 20 different features for each bird, such as beak length, wing span, and body mass. Your task is to create ... |
evolcodegolf | [
{
"from": "human",
"value": "Narrative \nWithin an unspecified organization, a division of programmers opts for Java while another faction prefers C++. This persistent discord regarding a unified programming language led to incessant debates about which singular language should be adopted across the board.... |
evolcodegolf | [
{
"from": "human",
"value": "Given an input string composed solely of alphanumeric characters, devise a program or function that systematically prints the possible printable ASCII characters (Hex 20-7E) corresponding to the string's value in bases 8, 10, and 16 (where feasible). The resulting characters mus... |
evolcodegolf | [
{
"from": "human",
"value": "Your task presents an intriguing challenge. Devise two distinct programs that, despite being mutually exclusive, successfully output each other's code without sharing any characters. \n\nConsider the following:\n\nTwo programs, designated as P and Q, are said to be mutually excl... |
glaive | [
{
"from": "human",
"value": "You are tasked with creating a Verilog module to implement a simple verification for all module. The module should include a clock and reset signal, as well as a data register for data transformation. Additionally, the module should have an initial block to initialize the clock,... |
codefeedback | [
{
"from": "human",
"value": "You are tasked with creating a program that processes a list of GitHub repositories and calculates the total number of stars for each repository within a specified range. The program should also be able to filter repositories based on the number of stars and generate a report of... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.