messages
listlengths
2
2
source
stringclasses
5 values
[ { "role": "user", "content": "Switch to the previous tab in the browser\n\nSwitching to the previous tab in the browser..." }, { "role": "assistant", "content": "```python\nimport pyautogui\npyautogui.hotkey('ctrl', 'shift', 'tab')\n```" } ]
python25k
[ { "role": "user", "content": "Use full paths & print our current command fully\n\n(Language: Python)\n\n#!/usr/bin/env python\n\nimport subprocess\nimport argparse\n\nparser = argparse.ArgumentParser(description=\"Tweet some Train Statuses!\")\nparser.add_argument(\"-s\", \"--station\", dest=\"station\", ty...
commitpackft
[ { "role": "user", "content": "Can you provide a list of traditional Korean holiday meals along with the year they were first documented, and also a function in JavaScript that randomly selects one of them to display on the webpage? However, to make things more interesting, you must only select a meal that w...
wizardlm
[ { "role": "user", "content": "A 61-year-old female patient comes to her doctor with a persistent cough, shortness of breath, and unusual weight loss in the past 4 months. She has noticed streaks of blood in her sputum after coughing regularly for the past 2 weeks. Additionally, she has experienced night swe...
wizardlm
[ { "role": "user", "content": "What are some ways to securely pass user credentials with an HTTP request in Javascript?" }, { "role": "assistant", "content": "1. Use HTTPS: Always use HTTPS to encrypt the data that is being transmitted, especially user credentials. Never use HTTP as it is not sec...
wizardlm
[ { "role": "user", "content": "I am writing a worker service in .NET Core 7 which retrieves OUs, Groups & Users from Active Directory. Is there any good package to use for retrieving the information from Active Directory?" }, { "role": "assistant", "content": "As of the time of this writing, ther...
magicoder
[ { "role": "user", "content": "While strolling in a park, two friends come across a fenced area with a \"Beware of the Dog\" sign. One friend curiously asks about the breed, while the other expresses their apprehension by stating, \"I hope it's not a [BLANK].\" What word would make this conversation more int...
wizardlm
[ { "role": "user", "content": "Design a password generator program that creates a secure, unpredictable password with specific requirements. \n\nThe password must have the following format: \n\n* Contains a total of 16 characters: including alphanumeric characters, punctuation divisors, and special character...
magicoder
[ { "role": "user", "content": "Add base class for testing mixins and attributes\n\n(Language: Python)" }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE fil...
commitpackft
[ { "role": "user", "content": "Amidst the rushing rapids of a raging river, a resilient salmon came into being, embracing its life's calling to traverse through the ever-changing, unpredictable tides of existence. From evading looming predators to surmounting daunting obstacles, this brave salmon's life was ...
wizardlm
[ { "role": "user", "content": "How can I use Ruby code to generate confusing sentences by manipulating the given sentence \"The cat is black\"? \nHere is a sample code: \nsentence = \"The cat is black\"\nwords = sentence.split(\" \")\n# Reverse the words\nreverse = words.reverse.join(\" \")\nputs \"Reverse: ...
wizardlm
[ { "role": "user", "content": "What's the C++ version of this code?\ndef will_it_fly(q, w, n):\n is_palindrome = q == q[::-1] # True if 'q' is a palindrome.\n sum_condition = sum(q) <= w # True if sum of 'q' is <= 'w'.\n n_unique_vals = len(set(q)) == n # True if 'q' contains exactly 'n' unique v...
magicoder
[ { "role": "user", "content": "Add new example based on set and word counts.\n\n(Language: C)" }, { "role": "assistant", "content": "#include <stdio.h>\n#include \"m-string.h\"\n#include \"m-dict.h\"\n\n/* program that reads text from standard-input, \n and prints the total number of distinct w...
commitpackft
[ { "role": "user", "content": "After carefully inspecting the provided code, kindly elaborate on the following: What other proactive measures can be enforced to minimize any potential risks associated with downloading a file, other than merely authenticating its origin through antivirus software or digital s...
wizardlm
[ { "role": "user", "content": "Write a Python program to generate a random color in RGB format" }, { "role": "assistant", "content": "```python\nimport random \ndef random_rgb():\n r = random.randint(0,255)\n g = random.randint(0,255)\n b = random.randint(0,255)\n return (r, g, b)\n``...
python25k
[ { "role": "user", "content": "Are there any extreme sports that involve navigating through underwater ice caves in Antarctica and require advanced thermal protection gear? Can you develop a MATLAB code to analyze the data and identify any common factors or patterns among these ice cave sports? Here is a sam...
wizardlm
[ { "role": "user", "content": "Convert import try/except to use test_support.import_module().\n\n(Language: Python)\n\n\"\"\"This test checks for correct fork() behavior.\n\"\"\"\n\nimport os\nimport time\nimport unittest\nfrom test.fork_wait import ForkWait\nfrom test.test_support import run_unittest, reap_...
commitpackft
[ { "role": "user", "content": "Compose a program to sort an array of integers using bubble sort." }, { "role": "assistant", "content": "def bubbleSort(arr): \n n = len(arr) \n for i in range(n): \n for j in range(0, n-i-1): \n if arr[j] > arr[j+1] : \n arr[j...
codealpaca
[ { "role": "user", "content": "Expand upon the given prompt by providing not only the mathematical formula for converting Celsius to Fahrenheit, but also a detailed explanation of the historical context behind the creation of the Celsius temperature scale and the significance of Fahrenheit's scale in scienti...
wizardlm
[ { "role": "user", "content": "Looking to get your take on an automated testing tool (voting should bring good ones to the top)\n\nIdeal tool would:\n\n- - \n\nFor example, if a method checks that an integer argument is 123, at least 2 unit tests are generated: one where that argument is 123 and one where it...
magicoder
[ { "role": "user", "content": "How do you configure a Raspberry Pi for rtl\\_433, ensuring compatibility with the present firmware, having all the required dependencies, and optimizing for peak performance, especially when the rtl\\_433 version is 20.09 or higher? Additionally, the configuration must also in...
wizardlm
[ { "role": "user", "content": "Categorize the following words according to their parts of speech:\n\nstrenuous, allocate, eclipse" }, { "role": "assistant", "content": "Strenuous - adjective\nAllocate - verb\nEclipse - noun/verb" } ]
wizardlm
[ { "role": "user", "content": "Remove unused includes and move rc pin definition\n\n(Language: C)\n\n#include <avr/io.h>\n#include <util/delay.h>\n#include <avr/interrupt.h>\n\n#include \"deps/util.h\"\n#include \"deps/rcswitch/rcswitch.h\"\n\n#define PIN_RC PB2\n\n#include \"deps/softuart/softuart.h\"\n#inc...
commitpackft
[ { "role": "user", "content": "Develop a recursive function using Python programming language, which calculates and returns the mathematical factorial of a specified integer value.\nThe integer value in question here is 5." }, { "role": "assistant", "content": "Here is a recursive function in Pyt...
magicoder
[ { "role": "user", "content": "Imagine this SVG floating in the vastness of space. Can you give it a cosmic glow and surround it with tiny stars?\n<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M9.65847 12L12.9578 18.4678C13.1134 18.6051 1...
magicoder
[ { "role": "user", "content": "Using Ruby, create a program that outputs a message when given a three-letter word that starts and ends with the same letter, contains at least one vowel, and has a prime number of unique letters. The output message must contain the number of unique letters in the input word an...
wizardlm
[ { "role": "user", "content": "In the world of digital advertising and creative media, how can a business implement advanced AI and machine learning techniques to create personalized and engaging content, while also ensuring transparency and accountability in their data practices and protecting user privacy,...
wizardlm
[ { "role": "user", "content": "Write a Python program that uses recursion to implement the Fibonacci sequence, but do it in such a way that doesn't utilize any form of loop or inbuilt Python recursion mechanisms. Furthermore, optimize your code to ensure the program can efficiently calculate and return the 5...
magicoder
[ { "role": "user", "content": "Create a program to calculate the standard deviation of an array of numbers.\narr = [10, 8, 12, 5, 9]" }, { "role": "assistant", "content": "def stdev(arr):\n n = len(arr)\n mean = sum(arr) / n\n variance = sum((x - mean) ** 2 for x in arr) / n\n return ...
codealpaca
[ { "role": "user", "content": "What changes would you suggest to improve the effectiveness of the communication plan presented in the JSON data? Can you propose radical modifications that could potentially increase engagement with the target audience and enhance the overall impact of the communication plan?\...
wizardlm
[ { "role": "user", "content": "What are the advantages/disadvantages of keeping SQL in your C# source code or in Stored Procs? I've been discussing this with a friend on an open source project that we're working on (C# ASP.NET Forum). At the moment, most of the database access is done by building the SQL inl...
magicoder
[ { "role": "user", "content": "Good afternoon. I am intending to use a program that generates LaTex text to visualize search trees. Although there are instructions in Swi-Prolog’s website, they tell me to write “:-sldnf” in the terminal to initialize the library and start using the program, but the terminal ...
magicoder
[ { "role": "user", "content": "Please examine the sustainability challenges faced by the local context of Edmonton, Canada, with the additional requirement of identifying how the challenges impact both rural and urban areas. Analyze the social and economic implications of these challenges, and provide feasib...
wizardlm
[ { "role": "user", "content": "Fix bug in commented example\n\n(Language: JavaScript)\n\n/*\n Automatically instantiates modules based on data-attributes\n specifying module file-names.\n*/\n\nconst moduleElements = document.querySelectorAll('[data-module]')\n\nfor (var i = 0; i < moduleElements.length; i+...
commitpackft
[ { "role": "user", "content": "Can you discuss the multi-step process by which Seeqle utilizes AI technology in its cloud-based recruitment platform? More specifically, can you explain how Seeqle's features and capabilities, such as its resume screening and candidate data analysis, work in unison with natura...
wizardlm
[ { "role": "user", "content": "Insert a valid test task\n\n(Language: Python)\n\nimport json\nimport sys\nimport shutil\nimport os\n\n#Copy /ro/task (which is read-only) in /task. Everything will be executed there\nshutil.copytree(\"/ro/task\",\"/task\")\n\n#Change directory to /task\nos.chdir(\"/task\")\n\n...
commitpackft
[ { "role": "user", "content": "Proceed under the assumption that the task at hand involves replacing the variables p and q in the mathematical equation, distinctly identified as f(p, q) = 4p^3 + 5q^2, with the specific integral value of 7 and the uniquely defined number 3 respectively. Can you determine the ...
magicoder
[ { "role": "user", "content": "Increase mocha timeout to 60000s\n\nFix #13090\n\n(Language: JavaScript)\n\nmodule.exports = {\n recursive: true,\n reporter: 'spec',\n slow: 0,\n timeout: 50000,\n ui: 'bdd',\n extension: 'js',\n};" }, { "role": "assistant", "content": "module.exp...
commitpackft
[ { "role": "user", "content": "let siameseCat = Cat(breed: \"Siamese\", eyeColor: \"Blue\", furColor: \"Golden\")\n\nclass Cat {\n var breed: String\n var eyeColor: String\n var furColor: String\n \n init(breed: String, eyeColor: String, furColor: String) {\n self.breed = breed\n ...
wizardlm
[ { "role": "user", "content": "We are currently delving into an extensive basketball data set covering the 1995 to 2015 period, containing crucial factors such as total regular season wins, average points scored, and the average relative skill between teams. As we aim to achieve a deeper comprehension of thi...
wizardlm
[ { "role": "user", "content": "I want to get the date in this format -\nMM-dd-yy.\nFor example: 10-12-23\nI'm writing this code but don't getting the desired solution -\n\n<a href=\"{!<entity_name>;}\">{<entity_name>:<attribute>/@date;} Check-In Link</a>\n\n\nWhat should I write in the `date` part?" }, {...
magicoder
[ { "role": "user", "content": "In an HTML page, I have a form that takes user input and processes it using JavaScript. However, I noticed that sometimes the form fails to submit or process the input correctly. I suspect there might be errors in my code.\nAs a developer, I understand the importance of softwar...
wizardlm
[ { "role": "user", "content": "With a numeric sequence presented in array format, partition the series elements into two unique classifications signified by their numerical properties: elements with even value (divisible by 2 without a remainder) and those classified as odd (yielding a remainder upon divisio...
magicoder
[ { "role": "user", "content": "Create a detailed guide on utilizing machine learning algorithms for predicting the impact of climate change on crop production. This tutorial should provide a step-by-step approach to using Python libraries such as Pandas, NumPy, and Scikit-learn for data analysis and modeling...
wizardlm
[ { "role": "user", "content": "Fix updateEnvironment mutation not setting \"updated\" date\n\n(Language: TypeScript)\n\nconst { knex } = require('../../util/db');\n\nexport const Sql = {\n updateEnvironment: ({ id, patch }: { id: number, patch: { [key: string]: any } }) =>\n knex('environment')\n .w...
commitpackft
[ { "role": "user", "content": "How can I use Python to solve for the values of the five lesser-known spices in alphabetical order based on their unique health benefits with the following equations?\n1. Spice A multiplied by 2, plus Spice B equals 10.\n2. Spice B minus Spice C equals 1.\n3. Spice C multiplied...
wizardlm
[ { "role": "user", "content": "How can a temporal convolutional network be implemented for video data learning and multiple temporal segments be extracted from each video sample using [C# code]? Can the approach be validated on various action recognition datasets and how does it compare to existing state-of-...
wizardlm
[ { "role": "user", "content": "Use hash based location type for now to support IE9 / ember bug\n\n(Language: JavaScript)\n\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto...
commitpackft
[ { "role": "user", "content": "Can you create a code that generates a password that not only meets the criteria below but also follows a specific pattern? \n- The password length must be a multiple of 3\n- The password must start with a lowercase letter and end with an uppercase letter\n- The number of upper...
wizardlm
[ { "role": "user", "content": "What is the missing code snippet that will correct the grammar in the following sentence and produce a solution that requires logical reasoning? \n\"Likes he to draw\" \nThe corrected sentence should read as \"He likes to draw\". Your code must not use any pre-built libraries o...
wizardlm
[ { "role": "user", "content": "Develop an algorithm in Python to create a Fibonacci sequence up to the nth number n=10" }, { "role": "assistant", "content": "```python\ndef fibonacci(n):\n if n<0:\n print(\"Incorrect input\")\n elif n==1:\n return 0\n elif n==2:\n return 1\n else:\n ...
python25k
[ { "role": "user", "content": "Update the Microsoft Edge app ID\n\n(Language: JavaScript)\n\n// Karme Edge Launcher\n// =================\n\n// Dependencies\n// ------------\n\nvar urlparse = require('url').parse\nvar urlformat = require('url').format\n\n// Constants\n// ---------\n\nvar EDGE_COMMAND = [\n ...
commitpackft
[ { "role": "user", "content": "Create an array in JavaScript of objects, each with a name key and a value of a unique random number between 1 and 100, inclusive. Ensure that the array has no duplicate name keys." }, { "role": "assistant", "content": "```js\nfunction getRandomNumber(min, max) {\n ...
magicoder
[ { "role": "user", "content": "Implement a system using HTML web storage (local and session) to exchange sensitive data between a client-side web page and the server securely. \n\nEnsure that your solution incorporates the following:\n\n1. Secure methods for passing information to the server using HTTP POST ...
magicoder
[ { "role": "user", "content": "Add a new util class to filter duplicated projects in lists\n\n(Language: Java)" }, { "role": "assistant", "content": "package fr.inria.spirals.librepair.travisfilter;\n\nimport java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.i...
commitpackft
[ { "role": "user", "content": "Add azure id creation tests\n\n(Language: Python)" }, { "role": "assistant", "content": "from urllib.parse import urlparse\n\nimport pytest\n\nfrom django.urls import reverse\n\nfrom tests.utils import BaseViewTest\n\n\n@pytest.mark.sso_mark\nclass AzureIdentityTest...
commitpackft
[ { "role": "user", "content": "How can I leverage machine learning algorithms, visualizations, and metrics to predict the likelihood of a customer returning to a website based on their browsing behavior and interactions with the site? Additionally, what other factors beyond demographics or previous purchase ...
wizardlm
[ { "role": "user", "content": "How can I write a complex function in clojure that allows me to replace multiple keywords with other keywords within an EDN data structure, considering that there might be nested data structures and the replacement must be done recursively and selectively based on specific cond...
wizardlm
[ { "role": "user", "content": "Test commit from codeenvy IDE... PREPARE FOR CODING FROM SCHOOL!\n\n(Language: Java)\n\npackage com.slickjava.rook;\n\nimport com.slickjava.rook.map.Map;\nimport com.slickjava.rook.map.tile.TileManager;\nimport com.slickjava.rook.net.MainServer;\nimport com.slickjava.rook.playe...
commitpackft
[ { "role": "user", "content": "List all available AWS services in a tree structure, considering dependencies between them, and then randomly choose one for a sample code showcase." }, { "role": "assistant", "content": "Creating a comprehensive code snippet for this task would be complex and exten...
magicoder
[ { "role": "user", "content": "Sort a list of integers in ascending order using selection sort.\n[ 9, 5, 2, 0, 7, 4, 1, 8, 6, 3]" }, { "role": "assistant", "content": "def selection_sort(list): \n\n for i in range(len(list)): \n \n min_idx = i \n for j in range(i+1, len(list)): ...
codealpaca
[ { "role": "user", "content": "| | District | Incumbent | Party | First elected | Results | Candidates |\n|---:|:-----------------|:---------------|:-----------|----------------:|:------------------------|:--------------------------...
magicoder
[ { "role": "user", "content": "Suppose I have a list of words and I want to find their anagrams. Here is a list of words:\n[\"penguin\", \"cat\", \"dog\", \"car\", \"laptop\", \"listen\"]\nWhat is the anagram for the word \"penguin\" and how can I generate anagrams for all the words in the list using Python?...
wizardlm
[ { "role": "user", "content": "Can you solve this riddle: I am a biological molecule that stores genetic information and is present in all living organisms. My name is represented by the acronym \"DNA\". Can you tell me what those three letters stand for? Remember, the answer consists of three words. Additio...
wizardlm
[ { "role": "user", "content": "I have a sequence in the database, and I wanted to call the sequence through a function.\nI have tried below, need an assistance to create the function in a standard process, as this is not working.\n\nselect nextval('code_seq')\n\n\n\nCREATE FUNCTION code_sequence(integer) RET...
magicoder
[ { "role": "user", "content": "Condense the following passage by removing unnecessary words:\nIn order to succeed in this class, it is important to become familiar with both the relevant syllabus and the course materials before beginning the coursework." }, { "role": "assistant", "content": "To s...
wizardlm
[ { "role": "user", "content": "Fix the typos, fix the build.\n\n(Language: Python)\n\nclass Fsharp31Package(GitHubTarballPackage):\n\tdef __init__(self):\n\t\tGitHubTarballPackage.__init__(self,\n\t\t\t'fsharp', 'fsharp',\n\t\t\t'3.1.1.31',\n\t\t\t'1f79c0455fb8b5ec816985f922413894ce19359a',\n\t\t\tconfigure ...
commitpackft
[ { "role": "user", "content": "Create a function in Python to remove punctuation from a text text = ?Welcome! My name is Mike, and I?m here to help you.?" }, { "role": "assistant", "content": "```python\nimport string\n\ndef remove_punctuation(text):\n punct_chars = string.punctuation\n no_...
python25k
[ { "role": "user", "content": "Can you outline the necessary steps for setting up a secure and efficient Docker Compose server, incorporating Nginx, Letsencrypt certbot, PHP 8.1 and MariaDB, while also ensuring proper file and configuration management? Please provide a detailed, multi-step approach to achiev...
wizardlm
[ { "role": "user", "content": "Devise an intricate blueprint for the methodical orchestration of serverless computing utilizing AWS Lambda and API Gateway, explicitly tailored for the administration of a blockchain technology system on the globally recognized cloud computing infrastructure, Amazon Web Servic...
magicoder
[ { "role": "user", "content": "What is the formula for generating a prime number sequence up to a given limit in Java? How can we optimize the program to handle large limit values efficiently?\n[Formula] \nTo generate a prime number sequence up to a given limit in Java, we can use the Sieve of Eratosthenes a...
wizardlm
[ { "role": "user", "content": "Fix an invalid javadoc reference\n\n(Language: Java)\n\n/*\n * Copyright 2016 Philip Cohn-Cort\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License...
commitpackft
[ { "role": "user", "content": "As a digital marketing consultant, you have been tasked to create a marketing strategy for a small business group that connects and supports disabled entrepreneurs. The group is called \"Ability Network.\" The group aims to provide a safe space where disabled entrepreneurs can ...
wizardlm
[ { "role": "user", "content": "Design and implement an algorithm that uses efficient data structures to minimize the storage footprint of a large array composed of unique string segments. Additionally, optimize your solution to cater large data structures and efficiently manage memory allocation when dealing...
magicoder
[ { "role": "user", "content": "| | Stage | Winner | General classification | Points classification | Mountains classification | Combination classification | Team classification |\n|---:|--------:|:-------------------|:-------------------------|:------------------------|:-----------...
magicoder
[ { "role": "user", "content": "Can you design a game that tests players' decision-making skills under high-pressure scenarios, which involves four players - A, B, C, and D? The game requires that players choose non-repeating numbers from a set of digits. Player A has the power to choose one digit from the se...
wizardlm
[ { "role": "user", "content": "Add source maps when optimizing\n\n(Language: JavaScript)\n\nimport _ from 'lodash';\n\nexport default (config, options) => {\n if (options.optimize) {\n config = _.extend({}, config, {\n output: _.extend({}, config.output, {\n filename: '[name].min.js'\n }...
commitpackft
[ { "role": "user", "content": "Review the provided erroneous code that attempts to compute the roots of a quadratic equation ax^2 + bx + c = 0. Identify and correct the errors observed in the code so that it can accurately determine the roots of the equation.\n\nGiven:\n a = 1, b = -3, c = 2\n\nProvided Cod...
magicoder
[ { "role": "user", "content": "Make the following programming test question more challenging:\n\nComplete the given Java code. The program should accept a list of numbers, round each element to the nearest whole number up (ceiling), square them, and return the sum. Additionally, the program should be able to...
magicoder
[ { "role": "user", "content": "What are the requirements for a student to graduate from high school in Finland, and what is the significance of the ylioppilaslakin?\n\n#include <iostream>\nusing namespace std;\n\nint main() {\n int numMandatoryCourses = 5; // Number of mandatory courses required for gradua...
wizardlm
[ { "role": "user", "content": "I'd like this translated to Java:\nfrom typing import List\n\ndef parse_music(music_string: str) -> List[int]:\n notes = music_string.split(' ')\n beat_duration = []\n for note in notes:\n if note == 'o':\n beat_duration.append(4)\n elif note =...
magicoder
[ { "role": "user", "content": "Create a script to list the content of a given directory in Linux Path: /usr" }, { "role": "assistant", "content": "```python\n#!/usr/bin/env python\n\nimport os\n\npath = \"/usr\"\n\nfor root, dirs, files in os.walk(path):\n for file in files:\n print(os.path.join(...
python25k
[ { "role": "user", "content": "Can you solve this puzzle? I need your help to create a witty one-liner about a mean boss. I have a table of possible punchlines, but I want to select the punchline randomly using a mathematical formula. Can you help me create an Excel formula that will select a random punchlin...
wizardlm
[ { "role": "user", "content": "Enhance a function that sorts a list of positive integers by the length of their binary representation, in increasing order. When two or more integers have the same binary length, sort them by their decimal values. Then further organize the list by grouping the elements with si...
magicoder
[ { "role": "user", "content": "In what ways can Helios provide personalized and proactive employee development plans to companies in order to address skill gaps and promote individual growth? How can Helios utilize machine learning algorithms to analyze employee performance data and identify patterns that ca...
wizardlm
[ { "role": "user", "content": "Rearrange the sentences into proper logical order.\nJohn's father died. John was sad. But, he kept living." }, { "role": "assistant", "content": "John's father died. John was sad. But, he kept living." } ]
wizardlm
[ { "role": "user", "content": "Compare the computational performance and physical size of a computing device." }, { "role": "assistant", "content": "Computational performance and physical size of a computing device are often inversely proportional to each other. In general, smaller devices tend t...
wizardlm
[ { "role": "user", "content": "Write a function that multiplies the elements of two arrays arr_1 = [2,3,4] and arr_2 = [1,2,3] element by element. Also, find the product of their respective reversed arrays. The reversed of arr_1 is [4, 3, 2] and the reversed of arr_2 is [3, 2, 1]. Calculate these products wi...
magicoder
[ { "role": "user", "content": "Return 0 from main as it should.\n\n(Language: C)\n\n#include \"config.h\"\n#include <stdio.h>\n#include <string.h>\n\n#include \"lexicon.h\"\n#include \"hash.h\"\n#include \"array.h\"\n#include \"util.h\"\n#include \"mem.h\"\n\nint main(int argc, char **argv)\n{\n lexicon_pt ...
commitpackft
[ { "role": "user", "content": "Can you provide me with an extensive analysis of the potential hidden issues that may arise when it comes to Homeowner's Guide in NSW, Australia? Your insights and expertise are valued in order to determine the exact difficulties and propose viable solutions. If possible, kindl...
wizardlm
[ { "role": "user", "content": "Implement a thread pool in Java." }, { "role": "assistant", "content": "import java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\n\npublic class ThreadPool {\n private ExecutorService executor;\n\n public ThreadPool(int size) {\n thi...
codealpaca
[ { "role": "user", "content": "Write a SQL query to find customers who have made multiple delayed payments in the last year." }, { "role": "assistant", "content": "Assuming you have a \"Payments\" table with \"CustomerId\", \"PaymentDate\", \"DueDate\", and other data, the SQL query would look so...
magicoder
[ { "role": "user", "content": "Can you solve this puzzle about contemporary art? \nBelow is a table with three art types and their descriptions. One of the descriptions is incorrect. Using logic and deduction, can you determine which description is incorrect?\nArt Type | Description\n------------ | ---------...
wizardlm
[ { "role": "user", "content": "Embark on a comprehensive journey to unravel the enigma of quantum superposition, emphasizing its crucial role in the rapidly progressing field of quantum computing. Could you meticulously construct a narrative that explores the origin, development, and practical application of...
magicoder
[ { "role": "user", "content": "In an Excel table, how can I calculate the sum of a specific column only for rows that meet certain criteria?\nGiven prompt:\nWriting a resume is an important step in the job search process because it is essential for getting you noticed by employers.\nRewrite prompt:\nIn a LaT...
wizardlm
[ { "role": "user", "content": "How can businesses use customer segmentation to improve their marketing and sales strategies? Can you provide a Ruby code example of how customer segmentation can be implemented in a marketing campaign?\nFor example, a business can create custom lists or groups based on custome...
wizardlm
[ { "role": "user", "content": "Is there a way when executing a stored procedure in Management Studio to get the data types of the result sets coming back? I'm looking for something like functionality of when you pass a table name to sp_help" }, { "role": "assistant", "content": "SQL Server Manage...
magicoder
[ { "role": "user", "content": "Remove whitespace before package declaration.\n\ngit-svn-id: 6ecf90c357d929aee58b51a998def805f2e9c62f@370915 13f79535-47bb-0310-9956-ffa450edef68\n\n(Language: Java)\n\n/*\n * Copyright 2001-2005 The Apache Software Foundation.\n * \n * Licensed under the Apache License, Versio...
commitpackft
[ { "role": "user", "content": "Add solution for problem 003\n\n3. Longest Substring Without Repeating Characters\n\n(Language: Java)" }, { "role": "assistant", "content": "import java.util.HashMap;\n//3. Longest Substring Without Repeating Characters\n/**\n * Given a string, find the length of th...
commitpackft
[ { "role": "user", "content": "Fix crash when you try to ascend above the root directory\n\n(Language: Java)\n\npackage com.nbsp.materialfilepicker.utils;\n\nimport java.io.File;\nimport java.io.FileFilter;\nimport java.text.DecimalFormat;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.u...
commitpackft