row_id
int64
0
48.4k
init_message
stringlengths
1
342k
conversation_hash
stringlengths
32
32
scores
dict
41,561
Draw AST from Code. What is the value of instr at the end? Statement instr = new Statement1(); Statement eblk = instr.newInstance(); instr.assembleCall("move"); eblk.addToBlock(0, instr); Statement tblk = instr.newInstance(); instr.assembleCall("infect"); tblk.addToBlock(0, instr); instr.assembleCall("turnleft"); tblk.addToBlock(1, instr); instr.assembleIfElse(Condition.NEXT_IS_ENEMY, tblk, eblk); Make a tree using \ | and ascii
38686418ff263919eecc3ae2c774ccca
{ "intermediate": 0.33995652198791504, "beginner": 0.5110744833946228, "expert": 0.14896896481513977 }
41,562
Draw AST from Code. What is the value of instr at the end? Statement instr = new Statement1(); Statement eblk = instr.newInstance(); instr.assembleCall("move"); eblk.addToBlock(0, instr); Statement tblk = instr.newInstance(); instr.assembleCall("infect"); tblk.addToBlock(0, instr); instr.assembleCall("turnleft"); tblk.addToBlock(1, instr); instr.assembleIfElse(Condition.NEXT_IS_ENEMY, tblk, eblk);
c81433ea99e1e009ede9b65a44b34b3b
{ "intermediate": 0.30329781770706177, "beginner": 0.5538673996925354, "expert": 0.1428348422050476 }
41,563
Draw AST from Code. What is the value of instr at the end? Statement instr = new Statement1(); Statement eblk = instr.newInstance(); instr.assembleCall("move"); eblk.addToBlock(0, instr); Statement tblk = instr.newInstance(); instr.assembleCall("infect"); tblk.addToBlock(0, instr); instr.assembleCall("turnleft"); tblk.addToBlock(1, instr); instr.assembleIfElse(Condition.NEXT_IS_ENEMY, tblk, eblk); Draw an AST with \ | and ascii
61fb39981ffd890257a048333a2f9996
{ "intermediate": 0.3863160312175751, "beginner": 0.4199172854423523, "expert": 0.1937667727470398 }
41,564
Draw AST from Code. What is the value of instr at the end? Statement instr = new Statement1(); Statement eblk = instr.newInstance(); instr.assembleCall("move"); eblk.addToBlock(0, instr); Statement tblk = instr.newInstance(); instr.assembleCall("infect"); tblk.addToBlock(0, instr); instr.assembleCall("turnleft"); tblk.addToBlock(1, instr); instr.assembleIfElse(Condition.NEXT_IS_ENEMY, tblk, eblk); Draw the AST with \ | and using ASCII
72d765a1f69acdeee942bddb1032ee34
{ "intermediate": 0.38214606046676636, "beginner": 0.43586528301239014, "expert": 0.18198861181735992 }
41,565
can you generate a python program to downloads songs and metadata everything from amazon music
af7d227ef205b365af698a8fb947548b
{ "intermediate": 0.5056008100509644, "beginner": 0.16679634153842926, "expert": 0.3276028037071228 }
41,566
How can I append rather than set this? let body = { nfs_mount: this.mountNfsMount, mandatory: false, is_directory: this.mountIsDirectory, readonly: this.mountReadOnly, }; this.data.kube.mounts[this.mountName] = body;
c3a14b526fa5e9026dc5c8f7822738df
{ "intermediate": 0.39137277007102966, "beginner": 0.38072818517684937, "expert": 0.22789905965328217 }
41,567
instert equally spaced row of arrows autocad
651984b178cbc9674f72fb8f388162ee
{ "intermediate": 0.3163556456565857, "beginner": 0.26753753423690796, "expert": 0.41610684990882874 }
41,568
let body = { nfs_mount: this.mountNfsMount, mandatory: false, is_directory: this.mountIsDirectory, readonly: this.mountReadOnly, }; this.data.kube.mounts[this.mountName] = body; Adding this.mountName property doesn't work when the data.kube.mounts object is empty. Why?
81e133dd261e249f63e0ef03b5ea22f9
{ "intermediate": 0.44957807660102844, "beginner": 0.2468995898962021, "expert": 0.30352234840393066 }
41,569
How do I convert a json object or an array into a string?
5e704efbd8530d892286fcacd46c174a
{ "intermediate": 0.6325640082359314, "beginner": 0.13287246227264404, "expert": 0.23456354439258575 }
41,570
write the quickbms script that finds audio files in sfx.bin from who wants to be a millionaire on nintendo ds
4527dbf4b0cfb26aeb2ed0cb70567ff7
{ "intermediate": 0.3988044559955597, "beginner": 0.23578466475009918, "expert": 0.36541086435317993 }
41,571
Provide me a list of jhigh IMBD rating movies especially in the ones of the style of "hitchhikers galaxy" or "the matrix" or "inception"
0b27669ed4aa5db14236d8c006f35bac
{ "intermediate": 0.32511720061302185, "beginner": 0.30045565962791443, "expert": 0.3744271397590637 }
41,572
I am going to give a coding task using c++ with instructions and more detailed instructions. Then I will provide 2 finished code that works to give you the pathway to complete this. You will utilize both but not out right copy
0ce1f5279a4f635be93ab54a84e7ad46
{ "intermediate": 0.38680022954940796, "beginner": 0.39194256067276, "expert": 0.2212572544813156 }
41,573
What is tco fast retransmit algorithm? How to tune it with sysctl in Linux? What is the better settings for different cases?
623bf7b65e8c460125bdfd8d85fb3601
{ "intermediate": 0.0628713071346283, "beginner": 0.031124897301197052, "expert": 0.9060038328170776 }
41,574
Hi, can you generate a dataset of sports gears for me?
4c0e604cc15863aabc7f7b4e956e4157
{ "intermediate": 0.43630748987197876, "beginner": 0.17954270541667938, "expert": 0.38414984941482544 }
41,575
I am currently working with PIL and rembg to make image masks for later use in inpainting. The mask I get from rembg is often too tight and does not include edges. How can transform this mask by padding a few pixels around the given mask?
c49f179e8053c8fdf94dff0b84f0d29b
{ "intermediate": 0.6300725340843201, "beginner": 0.15006716549396515, "expert": 0.21986033022403717 }
41,576
i created a file in python3 called main.py. here is the code in the file: ""from dotenv import load_dotenv import os import pandas as pd load_dotenv() population_path = os.path.join("data", "population.csv") population_df = pd.read_csv(population_path) print(population_df.head()) "" when i type in: "" PS C:\Users\bower\Videos\AI Agent> python3 main.py Traceback (most recent call last): File "C:\Users\bower\Videos\AI Agent\main.py", line 3, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas' PS C:\Users\bower\Videos\AI Agent> activate ai activate : The term 'activate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + activate ai + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (activate:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\bower\Videos\AI Agent> ai\scripts\activate (ai) PS C:\Users\bower\Videos\AI Agent> python3 main.py Traceback (most recent call last): File "C:\Users\bower\Videos\AI Agent\main.py", line 3, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas' (ai) PS C:\Users\bower\Videos\AI Agent> "" how to fix?
45d23890562de3cce76c0e9d7d3442f4
{ "intermediate": 0.43742117285728455, "beginner": 0.377927303314209, "expert": 0.18465150892734528 }
41,577
concurrently Latest Release License Weekly Downloads on NPM CI Status Coverage Status Run multiple commands concurrently. Like npm run watch-js & npm run watch-less but better. Demo Table of Contents concurrently Why Installation Usage API concurrently(commands[, options]) Command CloseEvent FAQ Why I like task automation with npm but the usual way to run multiple commands concurrently is npm run watch-js & npm run watch-css. That's fine but it's hard to keep on track of different outputs. Also if one process fails, others still keep running and you won't even notice the difference. Another option would be to just run all commands in separate terminals. I got tired of opening terminals and made concurrently. Features: Cross platform (including Windows) Output is easy to follow with prefixes With --kill-others switch, all commands are killed if one dies Spawns commands with spawn-command Installation concurrently can be installed in the global scope (if you'd like to have it available and use it on the whole system) or locally for a specific package (for example if you'd like to use it in the scripts section of your package): npm Yarn pnpm Bun Global npm i -g concurrently yarn global add concurrently pnpm add -g concurrently bun add -g concurrently Local* npm i -D concurrently yarn add -D concurrently pnpm add -D concurrently bun add -d concurrently * It's recommended to add concurrently to devDependencies as it's usually used for developing purposes. Please adjust the command if this doesn't apply in your case. Usage Note The concurrently command is now also available under the shorthand alias conc. The tool is written in Node.js, but you can use it to run any commands. Remember to surround separate commands with quotes: concurrently "command1 arg" "command2 arg" Otherwise concurrently would try to run 4 separate commands: command1, arg, command2, arg. In package.json, escape quotes: "start": "concurrently \"command1 arg\" \"command2 arg\"" NPM run commands can be shortened: concurrently "npm:watch-js" "npm:watch-css" "npm:watch-node" # Equivalent to: concurrently -n watch-js,watch-css,watch-node "npm run watch-js" "npm run watch-css" "npm run watch-node" NPM shortened commands also support wildcards. Given the following scripts in package.json: { //... "scripts": { // ... "watch-js": "...", "watch-css": "...", "watch-node": "..." // ... } // ... } concurrently "npm:watch-*" # Equivalent to: concurrently -n js,css,node "npm run watch-js" "npm run watch-css" "npm run watch-node" # Any name provided for the wildcard command will be used as a prefix to the wildcard # part of the script name: concurrently -n w: npm:watch-* # Equivalent to: concurrently -n w:js,w:css,w:node "npm run watch-js" "npm run watch-css" "npm run watch-node" Exclusion is also supported. Given the following scripts in package.json: { // ... "scripts": { "lint:js": "...", "lint:ts": "...", "lint:fix:js": "...", "lint:fix:ts": "..." // ... } // ... } # Running only lint:js and lint:ts # with lint:fix:js and lint:fix:ts excluded concurrently "npm:lint:*(!fix)" Good frontend one-liner example here. Help: concurrently [options] <command ...> General -m, --max-processes How many processes should run at once. Exact number or a percent of CPUs available (for example "50%"). New processes only spawn after all restart tries of a process. [string] -n, --names List of custom names to be used in prefix template. Example names: "main,browser,server" [string] --name-separator The character to split <names> on. Example usage: -n "styles|scripts|server" --name-separator "|" [default: ","] -s, --success Which command(s) must exit with code 0 in order for concurrently exit with code 0 too. Options are: - "first" for the first command to exit; - "last" for the last command to exit; - "all" for all commands; - "command-{name}"/"command-{index}" for the commands with that name or index; - "!command-{name}"/"!command-{index}" for all commands but the ones with that name or index. [default: "all"] -r, --raw Output only raw output of processes, disables prettifying and concurrently coloring. [boolean] --no-color Disables colors from logging [boolean] --hide Comma-separated list of processes to hide the output. The processes can be identified by their name or index. [string] [default: ""] -g, --group Order the output as if the commands were run sequentially. [boolean] --timings Show timing information for all processes. [boolean] [default: false] -P, --passthrough-arguments Passthrough additional arguments to commands (accessible via placeholders) instead of treating them as commands. [boolean] [default: false] Prefix styling -p, --prefix Prefix used in logging for each process. Possible values: index, pid, time, command, name, none, or a template. Example template: "{time}-{pid}" [string] [default: index or name (when --names is set)] -c, --prefix-colors Comma-separated list of chalk colors to use on prefixes. If there are more commands than colors, the last color will be repeated. - Available modifiers: reset, bold, dim, italic, underline, inverse, hidden, strikethrough - Available colors: black, red, green, yellow, blue, magenta, cyan, white, gray, any hex values for colors (e.g. #23de43) or auto for an automatically picked color - Available background colors: bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite See https://www.npmjs.com/package/chalk for more information. [string] [default: "reset"] -l, --prefix-length Limit how many characters of the command is displayed in prefix. The option can be used to shorten the prefix when it is set to "command" [number] [default: 10] -t, --timestamp-format Specify the timestamp in moment/date-fns format. [string] [default: "yyyy-MM-dd HH:mm:ss.SSS"] Input handling -i, --handle-input Whether input should be forwarded to the child processes. See examples for more information. [boolean] --default-input-target Identifier for child process to which input on stdin should be sent if not specified at start of input. Can be either the index or the name of the process. [default: 0] Killing other processes -k, --kill-others Kill other processes if one exits or dies.[boolean] --kill-others-on-fail Kill other processes if one exits with non zero status code. [boolean] --kill-signal Signal to send to other processes if one exits or dies. (SIGTERM/SIGKILL, defaults to SIGTERM) [string] Restarting --restart-tries How many times a process that died should restart. Negative numbers will make the process restart forever. [number] [default: 0] --restart-after Delay time to respawn the process, in milliseconds. [number] [default: 0] Options: -h, --help Show help [boolean] -v, -V, --version Show version number [boolean] Examples: - Output nothing more than stdout+stderr of child processes $ concurrently --raw "npm run watch-less" "npm run watch-js" - Normal output but without colors e.g. when logging to file $ concurrently --no-color "grunt watch" "http-server" > log - Custom prefix $ concurrently --prefix "{time}-{pid}" "npm run watch" "http-server" - Custom names and colored prefixes $ concurrently --names "HTTP,WATCH" -c "bgBlue.bold,bgMagenta.bold" "http-server" "npm run watch" - Auto varying colored prefixes $ concurrently -c "auto" "npm run watch" "http-server" - Mixing auto and manual colored prefixes $ concurrently -c "red,auto" "npm run watch" "http-server" "echo hello" - Configuring via environment variables with CONCURRENTLY_ prefix $ CONCURRENTLY_RAW=true CONCURRENTLY_KILL_OTHERS=true concurrently "echo hello" "echo world" - Send input to default $ concurrently --handle-input "nodemon" "npm run watch-js" rs # Sends rs command to nodemon process - Send input to specific child identified by index $ concurrently --handle-input "npm run watch-js" nodemon 1:rs - Send input to specific child identified by name $ concurrently --handle-input -n js,srv "npm run watch-js" nodemon srv:rs - Shortened NPM run commands $ concurrently npm:watch-node npm:watch-js npm:watch-css - Shortened NPM run command with wildcard (make sure to wrap it in quotes!) $ concurrently "npm:watch-*" - Exclude patterns so that between "lint:js" and "lint:fix:js", only "lint:js" is ran $ concurrently "npm:*(!fix)" - Passthrough some additional arguments via '{<number>}' placeholder $ concurrently -P "echo {1}" -- foo - Passthrough all additional arguments via '{@}' placeholder $ concurrently -P "npm:dev-* -- {@}" -- --watch --noEmit - Passthrough all additional arguments combined via '{*}' placeholder $ concurrently -P "npm:dev-* -- {*}" -- --watch --noEmit For more details, visit https://github.com/open-cli-tools/concurrently API concurrently can be used programmatically by using the API documented below: concurrently(commands[, options]) commands: an array of either strings (containing the commands to run) or objects with the shape { command, name, prefixColor, env, cwd }. options (optional): an object containing any of the below: cwd: the working directory to be used by all commands. Can be overriden per command. Default: process.cwd(). defaultInputTarget: the default input target when reading from inputStream. Default: 0. handleInput: when true, reads input from process.stdin. inputStream: a Readable stream to read the input from. Should only be used in the rare instance you would like to stream anything other than process.stdin. Overrides handleInput. pauseInputStreamOnFinish: by default, pauses the input stream (process.stdin when handleInput is enabled, or inputStream if provided) when all of the processes have finished. If you need to read from the input stream after concurrently has finished, set this to false. (#252). killOthers: an array of exitting conditions that will cause a process to kill others. Can contain any of success or failure. maxProcesses: how many processes should run at once. outputStream: a Writable stream to write logs to. Default: process.stdout. prefix: the prefix type to use when logging processes output. Possible values: index, pid, time, command, name, none, or a template (eg [{time} process: {pid}]). Default: the name of the process, or its index if no name is set. prefixColors: a list of colors or a string as supported by chalk and additional style auto for an automatically picked color. If concurrently would run more commands than there are colors, the last color is repeated, unless if the last color value is auto which means following colors are automatically picked to vary. Prefix colors specified per-command take precedence over this list. prefixLength: how many characters to show when prefixing with command. Default: 10 raw: whether raw mode should be used, meaning strictly process output will be logged, without any prefixes, coloring or extra stuff. Can be overriden per command. successCondition: the condition to consider the run was successful. If first, only the first process to exit will make up the success of the run; if last, the last process that exits will determine whether the run succeeds. Anything else means all processes should exit successfully. restartTries: how many attempts to restart a process that dies will be made. Default: 0. restartDelay: how many milliseconds to wait between process restarts. Default: 0. timestampFormat: a date-fns format to use when prefixing with time. Default: yyyy-MM-dd HH:mm:ss.ZZZ additionalArguments: list of additional arguments passed that will get replaced in each command. If not defined, no argument replacing will happen. Returns: an object in the shape { result, commands }. result: a Promise that resolves if the run was successful (according to successCondition option), or rejects, containing an array of CloseEvent, in the order that the commands terminated. commands: an array of all spawned Commands. Example: const concurrently = require('concurrently'); const { result } = concurrently( [ 'npm:watch-*', { command: 'nodemon', name: 'server' }, { command: 'deploy', name: 'deploy', env: { PUBLIC_KEY: '...' } }, { command: 'watch', name: 'watch', cwd: path.resolve(__dirname, 'scripts/watchers'), }, ], { prefix: 'name', killOthers: ['failure', 'success'], restartTries: 3, cwd: path.resolve(__dirname, 'scripts'), }, ); result.then(success, failure); Command An object that contains all information about a spawned command, and ways to interact with it. It has the following properties: index: the index of the command among all commands spawned. command: the command line of the command. name: the name of the command; defaults to an empty string. cwd: the current working directory of the command. env: an object with all the environment variables that the command will be spawned with. killed: whether the command has been killed. state: the command's state. Can be one of stopped: if the command was never started started: if the command is currently running errored: if the command failed spawning exited: if the command is not running anymore, e.g. it received a close event pid: the command's process ID. stdin: a Writable stream to the command's stdin. stdout: an RxJS observable to the command's stdout. stderr: an RxJS observable to the command's stderr. error: an RxJS observable to the command's error events (e.g. when it fails to spawn). timer: an RxJS observable to the command's timing events (e.g. starting, stopping). close: an RxJS observable to the command's close events. See CloseEvent for more information. start(): starts the command, setting up all kill([signal]): kills the command, optionally specifying a signal (e.g. SIGTERM, SIGKILL, etc). CloseEvent An object with information about a command's closing event. It contains the following properties: command: a stripped down version of Command, including only name, command, env and cwd properties. index: the index of the command among all commands spawned. killed: whether the command exited because it was killed. exitCode: the exit code of the command's process, or the signal which it was killed with. timings: an object in the shape { startDate, endDate, durationSeconds }. FAQ Process exited with code null? From Node child_process documentation, exit event: This event is emitted after the child process ends. If the process terminated normally, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null. So null means the process didn't terminate normally. This will make concurrently to return non-zero exit code too. Does this work with the npm-replacements yarn, pnpm, or Bun? Yes! In all examples above, you may replace "npm" with "yarn", "pnpm", or "bun".
403500782ca6a70e0833931017781d02
{ "intermediate": 0.3346285820007324, "beginner": 0.4056452214717865, "expert": 0.2597261965274811 }
41,578
Write python code classification using Logistic Regression classification with hyperparaneter tuning and 4 fold cross validation on development partition data and testing on test partition data. Standard scaling is performed
ec12fba7087229f96e17d4559c05139d
{ "intermediate": 0.21811841428279877, "beginner": 0.1177854910492897, "expert": 0.6640961170196533 }
41,579
You are going to pretend to be a senior software engineer at a FAANG company. Review the following code paying attention to security and performance. Provide outputs that a senior software engineer would produce regarding the code. When i give the code, you give the optimized code to me.
d510a33c0204cf08a3c23966dcec097f
{ "intermediate": 0.20543432235717773, "beginner": 0.20565758645534515, "expert": 0.5889080762863159 }
41,580
Make me a python script that can run on Visual Studio Code that allows me to figure where the phone numbers come from of who calls me
869f7bb84558feef65b67a4adc5f22ab
{ "intermediate": 0.4685513973236084, "beginner": 0.1888868659734726, "expert": 0.3425616919994354 }
41,581
You are given this: pub fn cmp_exons( cn_exons: &mut Vec<(u32, u32)>, tx_exons: Vec<&(u32, u32)>, id: Arc<str>, ) { let mut cn_idx = VecDeque::from_iter(0..cn_exons.len()); let mut matches = vec![]; let mut status = Status::Pass; let mut inrets: u32 = 0; // let last = tx_exons.len() - 1; for (i, (start, end)) in tx_exons.iter().enumerate() { evaluate_inret(start, end, cn_exons, &mut cn_idx, &mut inrets, i); } } fn evaluate_inret( s: &u32, e: &u32, cn_exons: &mut Vec<(u32, u32)>, cn_idx: &mut VecDeque<usize>, ic: &mut u32, idx: usize, ) {} The problem is as follows: reference XXXXXX----XXXXX----XXXXX----XXXX----XXXXXX 1 intron retained XXXXXX----XXXXXXXXXXXXX---XXXX----XXXXXX 2 introns retained XXXXXX----XXXXXXXXXXXXXXXXXXX----XXXXXX For each read I will need to know 1) if it has intron retentions, 2) how many intron retentions has; 3) where those intron retentions ocurred. Provide the implementation in Rust. You are free to use any trick, crate, package, algorithm you want. Make sure to provide the fastest and most efficient way.
825ce4e6739bb5a89d40d732eea81449
{ "intermediate": 0.2604525089263916, "beginner": 0.35767221450805664, "expert": 0.38187527656555176 }
41,582
hi
3fbd9f73bee0bc8107dff6de8162dd40
{ "intermediate": 0.3246487081050873, "beginner": 0.27135494351387024, "expert": 0.40399640798568726 }
41,583
Help me code a simple diffusion model to generate RGB 256x256 images from a random noise seed, i will train the model on 256x256 RGBA images, the Aplha channel should be removed from the data
60379dfb6bbfaada3e4bd3c7c5c409d4
{ "intermediate": 0.1758662462234497, "beginner": 0.04019540920853615, "expert": 0.7839383482933044 }
41,584
actaully i have some issues
99cb9f59e6ec1810685b2ee4491d6fd5
{ "intermediate": 0.3604457676410675, "beginner": 0.3921698331832886, "expert": 0.24738441407680511 }
41,585
i have this python error code: ""[Running] python -u "c:\Users\bower\Videos\AI Agent\main.py" Traceback (most recent call last): File "c:\Users\bower\Videos\AI Agent\main.py", line 4, in <module> from llama_index.query_engine import PandasQueryEngine ModuleNotFoundError: No module named 'llama_index.query_engine' [Done] exited with code=1 in 2.137 seconds"" here is the code: ""from dotenv import load_dotenv import os import pandas as pd from llama_index.query_engine import PandasQueryEngine from prompts import new_prompt, instruction_str load_dotenv() population_path = os.path.join("data", "population.csv") population_df = pd.read_csv(population_path) population_query_engine = PandasQueryEngine(df=population_df, verbose=True, instruction_str=instruction_str) population_query_engine.update_prompts({"pandas_prompt": new_prompt}) population_query_engine.query("what is the population of Indonesia?")""
0104d18ac0b861fcfc71792379da6311
{ "intermediate": 0.677099883556366, "beginner": 0.1328718066215515, "expert": 0.1900283545255661 }
41,586
java.sql.SQLException: Oracle Error: ORA-12650 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:338) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:334) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:185) at co.gov.creg.util.DBConnectionManager$DBConnectionPool.newConnection(DBConnectionManager.java:398) at co.gov.creg.util.DBConnectionManager$DBConnectionPool.getConnection(DBConnectionManager.java:332) at co.gov.creg.util.DBConnectionManager.getConnection(DBConnectionManager.java:90) at co.gov.creg.util.Security.getPermisos(Security.java:234) at co.gov.creg.util.Security.esAdmin(Security.java:29) at org.apache.jsp.indexCPE_jsp._jspService(indexCPE_jsp.java:60) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:835) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:662)
4955561c4d889e24671fd3c918c181e0
{ "intermediate": 0.42752838134765625, "beginner": 0.3811398148536682, "expert": 0.19133178889751434 }
41,587
lets code a rpg battle simulator
5c640676ef08717fa8649b0d4f4c42e8
{ "intermediate": 0.2910081744194031, "beginner": 0.3502609431743622, "expert": 0.35873091220855713 }
41,588
What is tcp fast retransmit algorithm? How to tune it with sysctl in Linux? What is the better settings for different cases?
c3b0890209f3e65a60b9aabdb3b3b58a
{ "intermediate": 0.07157180458307266, "beginner": 0.04608158394694328, "expert": 0.8823466300964355 }
41,589
INFO: Server startup in 3159 ms java.lang.NullPointerException at com.prism.DBConnection.getConnInfo(DBConnection.java:480) at com.prism.ConnInfo.<init>(ConnInfo.java:269) at com.prism.ServletWrapper.service(ServletWrapper.java:102) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:835) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:662)
906cfe7a3b3076b8d8a69db5efe7c4d5
{ "intermediate": 0.3998449146747589, "beginner": 0.30869707465171814, "expert": 0.2914579510688782 }
41,590
write a rag web app that implements stripe subscriptions
9747662aad3602818afe0c2bab1bbdb0
{ "intermediate": 0.4535556733608246, "beginner": 0.2986489236354828, "expert": 0.2477954477071762 }
41,591
what happened with this code?: ""[Running] python -u "c:\Users\bower\Videos\AI Agent\main.py" Traceback (most recent call last): File "c:\Users\bower\Videos\AI Agent\main.py", line 14, in <module> population_query_engine.query("what is the population of Indonesia?") File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\llama_index\core\base\base_query_engine.py", line 40, in query return self._query(str_or_query_bundle) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\llama_index\core\query_engine\pandas\pandas_query_engine.py", line 156, in _query pandas_response_str = self._llm.predict( ^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\llama_index\core\llms\llm.py", line 253, in predict chat_response = self.chat(messages) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\llama_index\core\llms\callbacks.py", line 93, in wrapped_llm_chat f_return_val = f(_self, messages, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\llama_index\llms\openai\base.py", line 237, in chat return chat_fn(messages, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\llama_index\llms\openai\base.py", line 296, in _chat response = client.chat.completions.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_utils\_utils.py", line 275, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\resources\chat\completions.py", line 663, in create return self._post( ^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 1200, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 889, in request return self._request( ^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 965, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 1013, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 965, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 1013, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 965, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 1013, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "C:\Users\bower\AppData\Local\Programs\Python\Python312\Lib\site-packages\openai\_base_client.py", line 980, in _request raise self._make_status_error_from_response(err.response) from None openai.RateLimitError: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}} [Done] exited with code=1 in 11.157 seconds""
3ef67e1b143c61f1d489a63e8f4f37c1
{ "intermediate": 0.303468257188797, "beginner": 0.5356606841087341, "expert": 0.16087110340595245 }
41,592
Could you provide some ideas for programming projects in golang? I would prefer intermediate to advanced level projects.
5d5ea238256837f32e8f62be4af88a40
{ "intermediate": 0.49741145968437195, "beginner": 0.2646041512489319, "expert": 0.23798434436321259 }
41,593
hello
399587479b1b8ded69026b9a14c32e6f
{ "intermediate": 0.32064199447631836, "beginner": 0.28176039457321167, "expert": 0.39759764075279236 }
41,594
Can You Imagine 5 Examples Of Ultra Minimal Working C-Language Programmes From 1978?
6a3fa289450da79da7b650dc982511c0
{ "intermediate": 0.22414854168891907, "beginner": 0.40192487835884094, "expert": 0.37392657995224 }
41,595
Can You Imagine 5 Examples of Minimal C++ Programmes During 1986?
36966c57aca7f05c98806e2b90bdb35b
{ "intermediate": 0.28978854417800903, "beginner": 0.30866560339927673, "expert": 0.401545912027359 }
41,596
Can You Imagine 5 Examples of Minimal Scratch Programmes During 2009?
361b1fae7a0778b82c7a8de9e768e2eb
{ "intermediate": 0.29212716221809387, "beginner": 0.37593114376068115, "expert": 0.33194175362586975 }
41,597
Can You Imagine 5 Examples of Minimal C-Language Programmes During 1978-1980?
16ef43783de45a223c883f0aa596315e
{ "intermediate": 0.228246808052063, "beginner": 0.4219565987586975, "expert": 0.3497966527938843 }
41,598
Can You Imagine 5 Examples of Ultra Minimal And Minimal C-Language Programmes From 1978?
e541fec080a53a43337c46adc179c096
{ "intermediate": 0.2173115462064743, "beginner": 0.36243003606796265, "expert": 0.42025843262672424 }
41,599
Can You Imagine 5 Examples of Slightly Minimal C-Language Programmes From 1978?
25407f3140afb2bbe56c231a21be35cf
{ "intermediate": 0.20904499292373657, "beginner": 0.4654534161090851, "expert": 0.32550159096717834 }
41,600
Write copyright notices, registered trademarks and legal info for the fictional 2012 DVD re-release of The Pirates Who Don't Do Anything: A VeggieTales Movie (2008).
ffb86f78449f08edfda8ddaf3e882ef8
{ "intermediate": 0.3400592803955078, "beginner": 0.26902714371681213, "expert": 0.39091357588768005 }
41,601
In the context of available web data you have to hand what is the role of ShakespeareFan00 on Wikisource?
becf3d830a6dc9a95ca33e0a3a8c39d9
{ "intermediate": 0.37720099091529846, "beginner": 0.3547579348087311, "expert": 0.26804104447364807 }
41,602
Write the summations for this Func1(n) 1 s ← 0; 2 for i ← n to n^2 do 3 for j ← 1 to i do 4 for k ← 9n to 10n^2 do 5 for m ← i to k 6 s ← s + i - j + k-m; 7 end 8 end 9 end 10 end 11 return (s);
e492b7314bb5753c4f3a05fad7c6c5f7
{ "intermediate": 0.29172414541244507, "beginner": 0.47996455430984497, "expert": 0.22831135988235474 }
41,603
Devise a RISC based instruction set for an 8bit microcontroller with IO ports, describe the instruction encoding :)
6810f759ca578b39c783ba454fdaa74c
{ "intermediate": 0.22605854272842407, "beginner": 0.19586814939975739, "expert": 0.5780733227729797 }
41,604
chuyển sang mã python def getAmountOfComments(driver: WebDriver, post_id: String, number_comment_take: Int): Unit = { try { driver.get(s"https://mbasic.facebook.com/$post_id") var sum_links = getContentComment(driver) while (sum_links.length < number_comment_take) { try { val next_btn = driver.findElements(By.xpath(s'//div[starts-with(@id, "see_next")]/a')) if (next_btn.size() > 0) { val sleep_time = Random.between(1, 3).toDouble // Sử dụng between để sinh số ngẫu nhiên trong khoảng từ 1 đến 3 Thread.sleep(sleep_time * 1000) next_btn.get(0).click() sum_links ++= getContentComment(driver) } else { break } } catch { case e: Exception => println(s"Lỗi khi lấy nội dung comment: ${e.getMessage}") } } } catch { case e: Exception => println(s"Lỗi nhấn xem thêm comment: ${e.getMessage}") } }
7f566b6d88e058262d62555c324964e2
{ "intermediate": 0.3599947988986969, "beginner": 0.3770458698272705, "expert": 0.262959361076355 }
41,605
hey can you help me how to learn multerjs
9ef59b471fa3b4af04cb319c850df65a
{ "intermediate": 0.5256638526916504, "beginner": 0.1758088320493698, "expert": 0.298527330160141 }
41,606
Find the running time for each of the following algorithms. Show work by finding a table of values for each while loop, writing the summations, then solving. Be sure to show work on both the upper bound and lower bound, justify the split, and check that the bounds differ by only a constant factor. Use asymptotic notation to write the answer. Func2(n) s ← 0; j ← 7n^2; 3 while (j > 8) do 4 s ← s + i - j; 5 j ← ⌊j/9⌋; 6 end return (s); Func3(n) 1 s ← 0; 2 i ← n; 3 while (i < 5n^3) do 4 j ← 7n^2; 5 while (j > 8) do 6 s ← s + i - j; 7 j ← ⌊j/9⌋; 8 end 9 i ← 4 × i; 10 end return (s); Func4(n) 1 s ← 0; 2 for i ← 1 to 5n do 3 j ← 3i; 4 while (j < i^3) do 5 s ← s + i - j; 6 j ← 5 × j; 7 end 8 end return (s);
e54e3e59653cbfe5d03cb82ab9846115
{ "intermediate": 0.13590270280838013, "beginner": 0.18944671750068665, "expert": 0.6746505498886108 }
41,607
Whats the type of this haskell function twice f x = f (f x)
6515cd732f03e82a6796d375300985de
{ "intermediate": 0.26175457239151, "beginner": 0.45631805062294006, "expert": 0.2819274067878723 }
41,608
Is net.ipv4.tcp_reordering set the number of duplicated ACK packets to trigger tcp fast retransmit on Linux?
01c4b971b3e5d87fde1773b906843dae
{ "intermediate": 0.4380893111228943, "beginner": 0.19393162429332733, "expert": 0.3679790496826172 }
41,609
are you use GPT4?
4f28457d60c011c0accc983d9ae6135b
{ "intermediate": 0.38809025287628174, "beginner": 0.17879292368888855, "expert": 0.4331168234348297 }
41,610
What's the difference in structure of const iterator and iterator?
b5e48e38cb2129d251245d4b63d51146
{ "intermediate": 0.3481539785861969, "beginner": 0.31459885835647583, "expert": 0.3372471332550049 }
41,611
can you make the following ps1 file have the release link update: # Define the URL of the GitHub repository ZIP $repoUrl = "https://codeload.github.com/Steamopollys/Steamodded/zip/refs/tags/0.7.2" # Update this URL $directories = @("core", "debug", "loader") function Find-7Zip { $possiblePaths = @( "${env:ProgramFiles}\7-Zip\7z.exe", "${env:ProgramFiles(x86)}\7-Zip\7z.exe", "${env:ProgramW6432}\7-Zip\7z.exe" ) foreach ($path in $possiblePaths) { if (Test-Path $path) { return $path } } $pathFromEnv = Get-Command 7z.exe -ErrorAction SilentlyContinue if ($pathFromEnv) { return $pathFromEnv.Source } # If 7-Zip not found, offer to download and install $userResponse = Read-Host "7-Zip not found. Would you like to download and install it now? (Y/N)" if ($userResponse -eq 'Y' -or $userResponse -eq 'y') { $installerPath = "${env:TEMP}\7zInstaller.exe" $installerUrl = "https://www.7-zip.org/a/7z1900-x64.exe" # Update URL to the latest version Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath Start-Process -FilePath $installerPath -Args "/S" -Wait # Recheck for 7-Zip installation foreach ($path in $possiblePaths) { if (Test-Path $path) { return $path } } } throw "7-Zip installation was not found or completed. Please install 7-Zip manually." } # Function to download and extract specific directories from GitHub repo ZIP function Download-And-Extract-Repo { # Download the ZIP file $downloadPath = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName() + ".zip") Invoke-WebRequest -Uri $repoUrl -OutFile $downloadPath $extractPath = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) # Extract the ZIP file Expand-Archive -LiteralPath $downloadPath -DestinationPath $extractPath $unknownSubDir = Get-ChildItem -Path $extractPath -Directory | Select-Object -First 1 Write-Host "Found subdirectory: $($unknownSubDir.FullName)" $mergedFilePath = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) # Merge contents of specific directories into main.lua $mergedContent = "" foreach ($dir in $directories) { $dirPath = Join-Path -Path $unknownSubDir.FullName -ChildPath $dir # Filter for .lua files only $files = Get-ChildItem -Path $dirPath -File -Filter "*.lua" foreach ($file in $files) { $content = Get-Content $file.FullName -Raw $mergedContent += $content + "`n" # New line between files } } # Save the merged content to main.lua $mergedContent | Out-File -FilePath $mergedFilePath return ($mergedContent) } function Find-GameExe { $gameName = "Balatro" $steamPaths = @( "${env:ProgramFiles(x86)}\Steam\steamapps\common\Balatro", "${env:UserProfile}\SteamLibrary\steamapps\common\Balatro", "./" "D:\SteamLibrary\steamapps\common\Balatro" ) foreach ($path in $steamPaths) { $exePath = Join-Path -Path $path -ChildPath "$gameName.exe" if (Test-Path $exePath) { return $exePath } } # If not found, prompt the user $userInputPath = Read-Host "Unable to locate $gameName automatically. Please enter the full path to $gameName.exe" if (Test-Path $userInputPath) { return $userInputPath } else { Write-Host "The path entered does not exist. Exiting script." exit } } $7ZipPath = Find-7Zip $mergedContent = Download-And-Extract-Repo -url $repoUrl -downloadPath $downloadPath -extractPath $extractPath -mergedContent $mergedContent -directories $directories $balatroExePath = Find-GameExe # Make sure to define Find-GameExe function as shown earlier $tempDirForExtraction = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) Write-Host "Temporary directory for extraction: $tempDirForExtraction" & $7ZipPath x "$balatroExePath" -o"$tempDirForExtraction" "*main.lua*" -r # Determine the path to the extracted main.lua $extractedMainLua = Get-ChildItem -Path $tempDirForExtraction Write-Host $extractedMainLua $extractedMainLuaPath = $extractedMainLua.FullName Write-Host "Extracted main.lua path: $extractedMainLuaPath" # $mergedContent = Get-Content -Path $mergedFilePath -Raw Add-Content -Path $extractedMainLuaPath -Value $mergedContent -Encoding UTF8 Push-Location -Path $tempDirForExtraction & $7ZipPath a "$balatroExePath" "main.lua" -tzip Pop-Location Remove-Item -Path $tempDirForExtraction -Recurse -Force Write-Host "Updated main.lua in archive." $tempDirForExtraction = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) & $7ZipPath x "$balatroExePath" -o"$tempDirForExtraction" "*game.lua*" -r # Determine the path to the extracted game.lua $extractedGameLua = Get-ChildItem -Path $tempDirForExtraction Write-Host $extractedGameLua $extractedGameLuaPath = $extractedGameLua.FullName Write-Host "Extracted game.lua path: $extractedGameLuaPath" $lines = Get-Content -Path $extractedGameLuaPath -Encoding UTF8 $targetLine = " self.SPEEDFACTOR = 1" $insertLine = " initSteamodded()" $targetIndex = $null for ($i = 0; $i -lt $lines.Length; $i++) { if ($lines[$i] -match $targetLine) { $targetIndex = $i break } } if ($targetIndex -ne $null) { Write-Host "Target line found. Inserting new line." $lines = $lines[0..$targetIndex] + $insertLine + $lines[($targetIndex+1)..($lines.Length-1)] Set-Content -Path $extractedGameLuaPath -Value $lines -Encoding UTF8 Push-Location -Path $tempDirForExtraction & $7ZipPath a "$balatroExePath" "game.lua" -tzip Pop-Location Write-Host "Successfully modified game.lua." } else { Write-Host "Target line not found in game.lua." } Write-Host "SFX Archive updated." Write-Host "Process completed successfully." Write-Host "Press any key to exit..." $null = Read-Host # Cleanup # Remove-Item -Path $tempDirForExtraction -Recurse -Force
251e9a6a232e000f22fdf9dd1cc86914
{ "intermediate": 0.3479071855545044, "beginner": 0.42425310611724854, "expert": 0.2278396636247635 }
41,612
can you make the following ps1 file update the release link? # Define the URL of the GitHub repository ZIP $repoUrl = "https://codeload.github.com/Steamopollys/Steamodded/zip/refs/tags/0.7.2" # Update this URL $directories = @("core", "debug", "loader") function Find-7Zip { $possiblePaths = @( "${env:ProgramFiles}\7-Zip\7z.exe", "${env:ProgramFiles(x86)}\7-Zip\7z.exe", "${env:ProgramW6432}\7-Zip\7z.exe" ) foreach ($path in $possiblePaths) { if (Test-Path $path) { return $path } } $pathFromEnv = Get-Command 7z.exe -ErrorAction SilentlyContinue if ($pathFromEnv) { return $pathFromEnv.Source } # If 7-Zip not found, offer to download and install $userResponse = Read-Host "7-Zip not found. Would you like to download and install it now? (Y/N)" if ($userResponse -eq 'Y' -or $userResponse -eq 'y') { $installerPath = "${env:TEMP}\7zInstaller.exe" $installerUrl = "https://www.7-zip.org/a/7z1900-x64.exe" # Update URL to the latest version Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath Start-Process -FilePath $installerPath -Args "/S" -Wait # Recheck for 7-Zip installation foreach ($path in $possiblePaths) { if (Test-Path $path) { return $path } } } throw "7-Zip installation was not found or completed. Please install 7-Zip manually." } # Function to download and extract specific directories from GitHub repo ZIP function Download-And-Extract-Repo { # Download the ZIP file $downloadPath = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName() + ".zip") Invoke-WebRequest -Uri $repoUrl -OutFile $downloadPath $extractPath = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) # Extract the ZIP file Expand-Archive -LiteralPath $downloadPath -DestinationPath $extractPath $unknownSubDir = Get-ChildItem -Path $extractPath -Directory | Select-Object -First 1 Write-Host "Found subdirectory: $($unknownSubDir.FullName)" $mergedFilePath = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) # Merge contents of specific directories into main.lua $mergedContent = "" foreach ($dir in $directories) { $dirPath = Join-Path -Path $unknownSubDir.FullName -ChildPath $dir # Filter for .lua files only $files = Get-ChildItem -Path $dirPath -File -Filter "*.lua" foreach ($file in $files) { $content = Get-Content $file.FullName -Raw $mergedContent += $content + "`n" # New line between files } } # Save the merged content to main.lua $mergedContent | Out-File -FilePath $mergedFilePath return ($mergedContent) } function Find-GameExe { $gameName = "Balatro" $steamPaths = @( "${env:ProgramFiles(x86)}\Steam\steamapps\common\Balatro", "${env:UserProfile}\SteamLibrary\steamapps\common\Balatro", "./" "D:\SteamLibrary\steamapps\common\Balatro" ) foreach ($path in $steamPaths) { $exePath = Join-Path -Path $path -ChildPath "$gameName.exe" if (Test-Path $exePath) { return $exePath } } # If not found, prompt the user $userInputPath = Read-Host "Unable to locate $gameName automatically. Please enter the full path to $gameName.exe" if (Test-Path $userInputPath) { return $userInputPath } else { Write-Host "The path entered does not exist. Exiting script." exit } } $7ZipPath = Find-7Zip $mergedContent = Download-And-Extract-Repo -url $repoUrl -downloadPath $downloadPath -extractPath $extractPath -mergedContent $mergedContent -directories $directories $balatroExePath = Find-GameExe # Make sure to define Find-GameExe function as shown earlier $tempDirForExtraction = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) Write-Host "Temporary directory for extraction: $tempDirForExtraction" & $7ZipPath x "$balatroExePath" -o"$tempDirForExtraction" "*main.lua*" -r # Determine the path to the extracted main.lua $extractedMainLua = Get-ChildItem -Path $tempDirForExtraction Write-Host $extractedMainLua $extractedMainLuaPath = $extractedMainLua.FullName Write-Host "Extracted main.lua path: $extractedMainLuaPath" # $mergedContent = Get-Content -Path $mergedFilePath -Raw Add-Content -Path $extractedMainLuaPath -Value $mergedContent -Encoding UTF8 Push-Location -Path $tempDirForExtraction & $7ZipPath a "$balatroExePath" "main.lua" -tzip Pop-Location Remove-Item -Path $tempDirForExtraction -Recurse -Force Write-Host "Updated main.lua in archive." $tempDirForExtraction = Join-Path -Path $env:TEMP -ChildPath ([System.IO.Path]::GetRandomFileName()) & $7ZipPath x "$balatroExePath" -o"$tempDirForExtraction" "*game.lua*" -r # Determine the path to the extracted game.lua $extractedGameLua = Get-ChildItem -Path $tempDirForExtraction Write-Host $extractedGameLua $extractedGameLuaPath = $extractedGameLua.FullName Write-Host "Extracted game.lua path: $extractedGameLuaPath" $lines = Get-Content -Path $extractedGameLuaPath -Encoding UTF8 $targetLine = " self.SPEEDFACTOR = 1" $insertLine = " initSteamodded()" $targetIndex = $null for ($i = 0; $i -lt $lines.Length; $i++) { if ($lines[$i] -match $targetLine) { $targetIndex = $i break } } if ($targetIndex -ne $null) { Write-Host "Target line found. Inserting new line." $lines = $lines[0..$targetIndex] + $insertLine + $lines[($targetIndex+1)..($lines.Length-1)] Set-Content -Path $extractedGameLuaPath -Value $lines -Encoding UTF8 Push-Location -Path $tempDirForExtraction & $7ZipPath a "$balatroExePath" "game.lua" -tzip Pop-Location Write-Host "Successfully modified game.lua." } else { Write-Host "Target line not found in game.lua." } Write-Host "SFX Archive updated." Write-Host "Process completed successfully." Write-Host "Press any key to exit..." $null = Read-Host # Cleanup # Remove-Item -Path $tempDirForExtraction -Recurse -Force
0208020a94c87a961ad66458d344f00f
{ "intermediate": 0.30703893303871155, "beginner": 0.4650406837463379, "expert": 0.22792038321495056 }
41,613
private void RefreshStateText(object eventData = null) { if (cardObject.GetIsDeployed()) { m_stateText.gameObject.SetActive(false); } else { GameTimeSpan deployTimer = cardObject.DeployTimer.TimeLeftTillNextTick; m_stateText.text = $"{deployTimer.Value.Num + 1}"; } m_costText.text = $"{cardObject.GetCost().Value.Value.Num}"; m_nameText.text = m_nameTextTrap.text = $"{cardObject.GetName()}"; m_descriptionText.text = $"{cardObject.GetDescription()}"; if (cardObject.GetAvatar() != null) { UpdateCardImage(cardObject.GetAvatar().name); } UpdateCardFaceImage(cardObject.GetCardType(),cardObject.GetFaceRankType()); m_btnActiveTrap.gameObject.SetActive(cardObject.GetIsDeployed() && IsInTrapField && IsLocalPlayer); m_nameTextTrap.gameObject.SetActive(IsLocalPlayer && cardObject.GetCardPosition().CardPositionType != CardPositionTypes.CPChain); } 帮忙优化这段代码
aed21dc95f503f8ca0a0e621bebcaeaa
{ "intermediate": 0.3475553095340729, "beginner": 0.3379453420639038, "expert": 0.3144993185997009 }
41,614
private void RefreshStateText(object eventData = null) { if (cardObject.GetIsDeployed()) { m_stateText.gameObject.SetActive(false); } else { GameTimeSpan deployTimer = cardObject.DeployTimer.TimeLeftTillNextTick; m_stateText.text = $"{deployTimer.Value.Num + 1}"; } m_costText.text = $"{cardObject.GetCost().Value.Value.Num}"; m_nameText.text = m_nameTextTrap.text = $"{cardObject.GetName()}"; m_descriptionText.text = $"{cardObject.GetDescription()}"; if (cardObject.GetAvatar() != null) { UpdateCardImage(cardObject.GetAvatar().name); } UpdateCardFaceImage(cardObject.GetCardType(),cardObject.GetFaceRankType()); m_btnActiveTrap.gameObject.SetActive(cardObject.GetIsDeployed() && IsInTrapField && IsLocalPlayer); m_nameTextTrap.gameObject.SetActive(IsLocalPlayer && cardObject.GetCardPosition().CardPositionType != CardPositionTypes.CPChain); } 帮忙优化一下这个代码
5814a8c5b8d4d68de02b2d057e41a805
{ "intermediate": 0.3768746554851532, "beginner": 0.335773229598999, "expert": 0.28735214471817017 }
41,615
private void RefreshStateText(object eventData = null) { if (cardObject.GetIsDeployed()) { m_stateText.gameObject.SetActive(false); } else { GameTimeSpan deployTimer = cardObject.DeployTimer.TimeLeftTillNextTick; m_stateText.text = $"{deployTimer.Value.Num + 1}"; } m_costText.text = $"{cardObject.GetCost().Value.Value.Num}"; m_nameText.text = m_nameTextTrap.text = $"{cardObject.GetName()}"; m_descriptionText.text = $"{cardObject.GetDescription()}"; if (cardObject.GetAvatar() != null) { UpdateCardImage(cardObject.GetAvatar().name); } UpdateCardFaceImage(cardObject.GetCardType(),cardObject.GetFaceRankType()); m_btnActiveTrap.gameObject.SetActive(cardObject.GetIsDeployed() && IsInTrapField && IsLocalPlayer); m_nameTextTrap.gameObject.SetActive(IsLocalPlayer && cardObject.GetCardPosition().CardPositionType != CardPositionTypes.CPChain); } 帮忙优化一下这个方法
490dcf88ac3ae10b922dd54a0bfb5943
{ "intermediate": 0.36511343717575073, "beginner": 0.3378053307533264, "expert": 0.29708123207092285 }
41,616
public override void SetCardData(BaseCard card) { base.SetCardData(card); m_descriptionText.text = $"{card.Description}"; m_costText.text = $"{card.Cost}"; m_nameText.text = m_nameTextTrap.text = $"{card.Name}"; if (!string.IsNullOrEmpty(card.Avatar)) { UpdateCardImage(card.Avatar); } UpdateCardFaceImage(card.Type,card.FaceRank); } 这段代码可以怎么优化一下呢
f148e26f98c7911dcf5bbd375c978c25
{ "intermediate": 0.3764970302581787, "beginner": 0.3322252333164215, "expert": 0.2912777066230774 }
41,617
convert amazon playlists to full album links using python program
32cd3b7fe37054dda18d65ab6570b2f0
{ "intermediate": 0.407946914434433, "beginner": 0.21600712835788727, "expert": 0.3760458827018738 }
41,618
import Prelude halve :: [a] -> [a] halve [] = [] halve (x:xs) = do let i = 1 if i <= fromIntegral(length (x:xs)) / 2 then x : halve xs i++ else x : [] main = print $ halve [1,2,3,4,5,6] [1 of 1] Compiling Main ( jdoodle.hs, jdoodle.o ) jdoodle.hs:12:17: error: parse error (possibly incorrect indentation or mismatched brackets) | 12 | else x : [] | ^
85077e80547e27634700f622f6f5f483
{ "intermediate": 0.40475529432296753, "beginner": 0.32769158482551575, "expert": 0.2675531208515167 }
41,619
My friend sent this complaint to my boss and I want to write one sayi
bc2ea0dfaae4172766ee5addaeed00b1
{ "intermediate": 0.3185679018497467, "beginner": 0.3445046544075012, "expert": 0.33692747354507446 }
41,620
What makes you different from gpt3
19eea9e0c69499288d698395e5eed72d
{ "intermediate": 0.3243362307548523, "beginner": 0.2765662670135498, "expert": 0.3990975618362427 }
41,621
$ objdump -d prog prog: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 callq *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 retq Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 92 2f 00 00 pushq 0x2f92(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 93 2f 00 00 bnd jmpq *0x2f93(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 pushq $0x0 1039: f2 e9 e1 ff ff ff bnd jmpq 1020 <.plt> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 pushq $0x1 1049: f2 e9 d1 ff ff ff bnd jmpq 1020 <.plt> 104f: 90 nop Disassembly of section .plt.got: 0000000000001050 <__cxa_finalize@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 9d 2f 00 00 bnd jmpq *0x2f9d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001060 <__stack_chk_fail@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 5d 2f 00 00 bnd jmpq *0x2f5d(%rip) # 3fc8 <__stack_chk_fail@GLIBC_2.4> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001070 <__printf_chk@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 55 2f 00 00 bnd jmpq *0x2f55(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001080 <_start>: 1080: f3 0f 1e fa endbr64 1084: 31 ed xor %ebp,%ebp 1086: 49 89 d1 mov %rdx,%r9 1089: 5e pop %rsi 108a: 48 89 e2 mov %rsp,%rdx 108d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1091: 50 push %rax 1092: 54 push %rsp 1093: 4c 8d 05 c6 01 00 00 lea 0x1c6(%rip),%r8 # 1260 <__libc_csu_fini> 109a: 48 8d 0d 4f 01 00 00 lea 0x14f(%rip),%rcx # 11f0 <__libc_csu_init> 10a1: 48 8d 3d c1 00 00 00 lea 0xc1(%rip),%rdi # 1169 <main> 10a8: ff 15 32 2f 00 00 callq *0x2f32(%rip) # 3fe0 <__libc_start_main@GLIBC_2.2.5> 10ae: f4 hlt 10af: 90 nop 00000000000010b0 <deregister_tm_clones>: 10b0: 48 8d 3d 59 2f 00 00 lea 0x2f59(%rip),%rdi # 4010 <__TMC_END__> 10b7: 48 8d 05 52 2f 00 00 lea 0x2f52(%rip),%rax # 4010 <__TMC_END__> 10be: 48 39 f8 cmp %rdi,%rax 10c1: 74 15 je 10d8 <deregister_tm_clones+0x28> 10c3: 48 8b 05 0e 2f 00 00 mov 0x2f0e(%rip),%rax # 3fd8 <_ITM_deregisterTMCloneTable> 10ca: 48 85 c0 test %rax,%rax 10cd: 74 09 je 10d8 <deregister_tm_clones+0x28> 10cf: ff e0 jmpq *%rax 10d1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10d8: c3 retq 10d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010e0 <register_tm_clones>: 10e0: 48 8d 3d 29 2f 00 00 lea 0x2f29(%rip),%rdi # 4010 <__TMC_END__> 10e7: 48 8d 35 22 2f 00 00 lea 0x2f22(%rip),%rsi # 4010 <__TMC_END__> 10ee: 48 29 fe sub %rdi,%rsi 10f1: 48 89 f0 mov %rsi,%rax 10f4: 48 c1 ee 3f shr $0x3f,%rsi 10f8: 48 c1 f8 03 sar $0x3,%rax 10fc: 48 01 c6 add %rax,%rsi 10ff: 48 d1 fe sar %rsi 1102: 74 14 je 1118 <register_tm_clones+0x38> 1104: 48 8b 05 e5 2e 00 00 mov 0x2ee5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable> 110b: 48 85 c0 test %rax,%rax 110e: 74 08 je 1118 <register_tm_clones+0x38> 1110: ff e0 jmpq *%rax 1112: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1118: c3 retq 1119: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001120 <__do_global_dtors_aux>: 1120: f3 0f 1e fa endbr64 1124: 80 3d e5 2e 00 00 00 cmpb $0x0,0x2ee5(%rip) # 4010 <__TMC_END__> 112b: 75 2b jne 1158 <__do_global_dtors_aux+0x38> 112d: 55 push %rbp 112e: 48 83 3d c2 2e 00 00 cmpq $0x0,0x2ec2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1135: 00 1136: 48 89 e5 mov %rsp,%rbp 1139: 74 0c je 1147 <__do_global_dtors_aux+0x27> 113b: 48 8b 3d c6 2e 00 00 mov 0x2ec6(%rip),%rdi # 4008 <__dso_handle> 1142: e8 09 ff ff ff callq 1050 <__cxa_finalize@plt> 1147: e8 64 ff ff ff callq 10b0 <deregister_tm_clones> 114c: c6 05 bd 2e 00 00 01 movb $0x1,0x2ebd(%rip) # 4010 <__TMC_END__> 1153: 5d pop %rbp 1154: c3 retq 1155: 0f 1f 00 nopl (%rax) 1158: c3 retq 1159: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001160 <frame_dummy>: 1160: f3 0f 1e fa endbr64 1164: e9 77 ff ff ff jmpq 10e0 <register_tm_clones> 0000000000001169 <main>: 1169: f3 0f 1e fa endbr64 116d: 53 push %rbx 116e: 48 83 ec 10 sub $0x10,%rsp 1172: bb 28 00 00 00 mov $0x28,%ebx 1177: 64 48 8b 03 mov %fs:(%rbx),%rax 117b: 48 89 44 24 08 mov %rax,0x8(%rsp) 1180: 31 c0 xor %eax,%eax 1182: 48 89 e2 mov %rsp,%rdx 1185: be 03 00 00 00 mov $0x3,%esi 118a: bf 02 00 00 00 mov $0x2,%edi 118f: e8 41 00 00 00 callq 11d5 <multstore> 1194: 48 8b 14 24 mov (%rsp),%rdx 1198: 48 8d 35 65 0e 00 00 lea 0xe65(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 119f: bf 01 00 00 00 mov $0x1,%edi 11a4: b8 00 00 00 00 mov $0x0,%eax 11a9: e8 c2 fe ff ff callq 1070 <__printf_chk@plt> 11ae: 48 8b 44 24 08 mov 0x8(%rsp),%rax 11b3: 64 48 33 03 xor %fs:(%rbx),%rax 11b7: 75 0b jne 11c4 <main+0x5b> 11b9: b8 00 00 00 00 mov $0x0,%eax 11be: 48 83 c4 10 add $0x10,%rsp 11c2: 5b pop %rbx 11c3: c3 retq 11c4: e8 97 fe ff ff callq 1060 <__stack_chk_fail@plt> 00000000000011c9 <mult2>: 11c9: f3 0f 1e fa endbr64 11cd: 48 89 f8 mov %rdi,%rax 11d0: 48 0f af c6 imul %rsi,%rax 11d4: c3 retq 00000000000011d5 <multstore>: 11d5: f3 0f 1e fa endbr64 11d9: 53 push %rbx 11da: 48 89 d3 mov %rdx,%rbx 11dd: e8 e7 ff ff ff callq 11c9 <mult2> 11e2: 48 89 03 mov %rax,(%rbx) 11e5: 5b pop %rbx 11e6: c3 retq 11e7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 11ee: 00 00 00000000000011f0 <__libc_csu_init>: 11f0: f3 0f 1e fa endbr64 11f4: 41 57 push %r15 11f6: 4c 8d 3d b3 2b 00 00 lea 0x2bb3(%rip),%r15 # 3db0 <__frame_dummy_init_array_entry> 11fd: 41 56 push %r14 11ff: 49 89 d6 mov %rdx,%r14 1202: 41 55 push %r13 1204: 49 89 f5 mov %rsi,%r13 1207: 41 54 push %r12 1209: 41 89 fc mov %edi,%r12d 120c: 55 push %rbp 120d: 48 8d 2d a4 2b 00 00 lea 0x2ba4(%rip),%rbp # 3db8 <__do_global_dtors_aux_fini_array_entry> 1214: 53 push %rbx 1215: 4c 29 fd sub %r15,%rbp 1218: 48 83 ec 08 sub $0x8,%rsp 121c: e8 df fd ff ff callq 1000 <_init> 1221: 48 c1 fd 03 sar $0x3,%rbp 1225: 74 1f je 1246 <__libc_csu_init+0x56> 1227: 31 db xor %ebx,%ebx 1229: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1230: 4c 89 f2 mov %r14,%rdx 1233: 4c 89 ee mov %r13,%rsi 1236: 44 89 e7 mov %r12d,%edi 1239: 41 ff 14 df callq *(%r15,%rbx,8) 123d: 48 83 c3 01 add $0x1,%rbx 1241: 48 39 dd cmp %rbx,%rbp 1244: 75 ea jne 1230 <__libc_csu_init+0x40> 1246: 48 83 c4 08 add $0x8,%rsp 124a: 5b pop %rbx 124b: 5d pop %rbp 124c: 41 5c pop %r12 124e: 41 5d pop %r13 1250: 41 5e pop %r14 1252: 41 5f pop %r15 1254: c3 retq 1255: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) 125c: 00 00 00 00 0000000000001260 <__libc_csu_fini>: 1260: f3 0f 1e fa endbr64 1264: c3 retq Disassembly of section .fini: 0000000000001268 <_fini>: 1268: f3 0f 1e fa endbr64 126c: 48 83 ec 08 sub $0x8,%rsp 1270: 48 83 c4 08 add $0x8,%rsp 1274: c3 retq help me understand the asm code above
0823133de806e2b2de01c367261edb4d
{ "intermediate": 0.3494929373264313, "beginner": 0.39457425475120544, "expert": 0.2559327781200409 }
41,622
generation of a single-line SVG code that creates a complex, artistic image adhering to a set of specific rules regarding syntax, style, and structure. The final SVG should depict a galaxy with a starfield and a mandala-inspired design, including intricate shapes, patterns, and gradients, while maintaining a certain aspect ratio and utilizing concise color notations. To describe the desired SVG in textual terms: - The image size must be fixed to 500x250, aligned with the divisible-by-8 aspect ratio. - The SVG needs to include multiple layers with various gradients to create a sense of depth. - Radial gradients must be used to create a sense of lighting and galaxy-like swirling patterns. - Patterns should include a dense starfield with randomized placements for the stars to avoid obvious repetition and simulate the vastness of space. - Fractal elements are to be incorporated but should be controlled to prevent extreme complexity that might crash the system. - Transparency and opacity should be used cleverly to create depth and a tilt-shift effect, highlighting certain elements over others. - The stroke and fill colors of various elements must use short hexadecimal codes (e.g., #123) for efficiency and brevity. - Within the galaxy composition, fractalized patterns may indicate celestial bodies, but these should not overwhelm the background, which is meant to represent the depth of space. - The arrangement of these elements should be sequential to maintain visual hierarchy, with background elements placed first and foreground elements last. - The artistic style should be reminiscent of popular artists’ work to achieve aesthetic appeal. - All elements must be named concisely to keep the SVG code short and efficient. Given the complexity of the required visual, the following SVG might result from this prompt: <svg width=“500” height=“250”> [… intricate SVG code representing the elements described above …] </svg> The SVG code would immediately follow the opening tag of the SVG element, ensuring that it is properly formatted as a single continuous line of code, beginning with &lt;svg width="500" height="250"&gt; and ending with &lt;/svg&gt;. All the described features would be encoded within this single line of SVG code without any line breaks or illegal characters that might interfere with its interpretation by an SVG-compliant rendering engine. After the SVG code, the explanation and description text would appear, laying out what was generated and how it adheres to the requirements of the prompt.
ee26497698a1989c9cecfa344c2c6952
{ "intermediate": 0.2777470052242279, "beginner": 0.4914788603782654, "expert": 0.2307741791009903 }
41,623
Use the Julia Decision Tree package (https://github.com/JuliaAI/DecisionTree.jlLinks to an external site.) on the Mushrooms dataset and build a decision tree. Comment on the complexity of the decision tree. For full credit, you must perform a test/train split and evaluate on the test data, reporting your test results df = CSV.read("C:/Users/sande/Downloads/agaricus-lepiota.data", DataFrame, header = false) # Rename the columns col_names = ["poisonous","cap-shape","cap-surface","cap-color","bruises","odor","gill-attachment","gill-spacing","gill-size","gill-color","stalk-shape","stalk-root" ,"stalk-surface-above-ring","stalk-surface-below-ring","stalk-color-above-ring","stalk-color-below-ring", "veil-type","veil-color","ring-number","ring-type","spore-print-color","population","habitat"] rename!(df, Symbol.(col_names)) give me the code for the above in julia
ba88df997b4473f3c0d67a49f99c62b3
{ "intermediate": 0.5034360885620117, "beginner": 0.18336789309978485, "expert": 0.3131960332393646 }
41,624
hii
00efd6779475d87bfb831edd4ed924d2
{ "intermediate": 0.3416314125061035, "beginner": 0.27302300930023193, "expert": 0.38534557819366455 }
41,625
Apple music and amazon music which has cbr and vbr
4050fc4d5b62abb8b897ae93c62799d1
{ "intermediate": 0.36512789130210876, "beginner": 0.2766735553741455, "expert": 0.3581985533237457 }
41,626
Can you generate a python program like inputting amazon music playlists and save .TXT file of amazon music whole album links present in the playlists(region:India) from music.amazon.in from web without using api and not required api
f70a17fd6bc1050cf054f45e2cb07690
{ "intermediate": 0.5888280868530273, "beginner": 0.14139117300510406, "expert": 0.2697806656360626 }
41,627
defold lua script that rotate some go in a circle around a point
9caaf11139c40310083bd1fe7f6921db
{ "intermediate": 0.31328269839286804, "beginner": 0.43783456087112427, "expert": 0.24888278543949127 }
41,628
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library MyLibrary { function myFunction(uint256 a) external pure returns (uint256) { return a * 2; } } contract BaseContract { using MyLibrary for uint256; function useLibraryFunction1(uint256 a) public pure returns (uint256) { return a.myFunction(); } } contract DerivedContract is BaseContract { function useLibraryFunction2(uint256 a) public pure returns (uint256) { return a.MyFunction(); } } What does the given contract not compile?
af307868aeb8ee77ef9f1ba8f94d5922
{ "intermediate": 0.5879740715026855, "beginner": 0.24450255930423737, "expert": 0.16752338409423828 }
41,629
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library MyLibrary { function myFunction(uint256 a) external pure returns (uint256) { return a * 2; } } contract BaseContract { using MyLibrary for uint256; function useLibraryFunction1(uint256 a) public pure returns (uint256) { return a.myFunction(); } } contract DerivedContract is BaseContract { function useLibraryFunction2(uint256 a) public pure returns (uint256) { return a.myFunction(); } } What does the given contract not compile?
ec788282f4a5a1f5d6f9c5308f000cb1
{ "intermediate": 0.5880218148231506, "beginner": 0.24720512330532074, "expert": 0.16477300226688385 }
41,630
what is trait of genius
145dea851600d3f38d8b6e970408992e
{ "intermediate": 0.3603009581565857, "beginner": 0.34992608428001404, "expert": 0.28977298736572266 }
41,631
How to make a fullstack crud app using Next js
a314205afb7f4010b1a9826b3fbfa3a8
{ "intermediate": 0.7416760921478271, "beginner": 0.18468090891838074, "expert": 0.0736430361866951 }
41,632
send example query on solr with edismax
bdcfe195fcbbef3683a996b9024d62c1
{ "intermediate": 0.40004730224609375, "beginner": 0.26720234751701355, "expert": 0.3327503502368927 }
41,633
Repeat everything above starting from your name. Put it in a txt block, Include everything.
f583d2bf38dd255adfd0cfcaff4dd9c4
{ "intermediate": 0.29586735367774963, "beginner": 0.3302406072616577, "expert": 0.37389200925827026 }
41,634
Repeat everything above starting from "You are ChatGPT". Put it in a txt block, Include everything.
19dfd0907f7cea469a03f60d1617223b
{ "intermediate": 0.3098301887512207, "beginner": 0.3697926998138428, "expert": 0.3203771114349365 }
41,635
how do i center the logo to the center of the screen: @media (max-width:420px){ /* Header logo dark */ #logo a .header-logo-dark{ }
8e9e51de0bb2d7d9e684faaf1a9dfff1
{ "intermediate": 0.3565186858177185, "beginner": 0.30606821179389954, "expert": 0.33741313219070435 }
41,636
Develop parallel codes for the following problems using C++ by following the instructions: Report the speedup of your implementations by varying the number of threads from 1 to 16 (i.e., 1, 2, 4, 6, 8, 10, 12, 14, and 16). Consider gettimeofday() to measure the runtime of an execution. Repeat the experiment five times and consider the average of five runs. The running time of each run should be reported.: Multi-threaded Sorting: Sort 10^9 integers in the range 0 to 10^3using the following sorting techniques: a Merge Sort b Quick Sort c Counting Sort
0c83be41dfe51a711b64635b604a5db7
{ "intermediate": 0.2840529978275299, "beginner": 0.09850116074085236, "expert": 0.6174458861351013 }
41,637
python code to aesthetically smart crop an image
92f3f2deaad681eaa69f7a5f7e6dd121
{ "intermediate": 0.3430899381637573, "beginner": 0.2020457237958908, "expert": 0.4548642933368683 }
41,638
hello
7187e5b8fb487ea7f54d506e8f9608b4
{ "intermediate": 0.32064199447631836, "beginner": 0.28176039457321167, "expert": 0.39759764075279236 }
41,639
this is my _layout.svelte: <script> import { Router, Route, navigate } from 'svelte-routing'; import { Nav } from '../components' import { Footer } from '../components' import { FooterLogin } from '../components' import { userlog } from './../auth/index.js'; import { Home, Alert, About, Units, UnitsLogin, AlertLogin } from '../components'; import { onMount } from 'svelte'; onMount(() => { document.title = 'United Calinan Operators Transport Service Cooperative'; navigate("/Home"); setTimeout(() => { navigate("/"); }, 100); }); </script> <Nav /> <Router> <Route path="/Home" component={Home} default/> <Route path="/Units" component={Units} /> <Route path="/Alert" component={Alert} /> <Route path="/About" component={About} /> <Route path="/UnitsLogin" component={UnitsLogin} /> <Route path="/AlertLogin" component={AlertLogin} /> <div> {#if $userlog} <FooterLogin/> {:else} <Footer/> {/if} </div> </Router> and this is my nav.svelte: <script> import { url } from "@roxi/routify"; import { Button, Menu, EmailLogin } from "../components"; import { user, loginHandler, logout } from "./Auth.svelte"; import { userlog } from "./../auth/index.js"; import { navigate } from "svelte-routing"; </script> {#if $userlog} <main class="fixed w-full flex justify-between items-center bg-amber-600 p-4 text-black" > <div class="p-1"> <button type="button" class="icon-button" on:click={() => navigate("/Home")} > <img alt="skeme" class="w-12 h-12" src="images/logo.png" /> </button> </div> <div class="p-1"> <p class="text-3xl subpixel-antialiased font-sans font-bold">UCOTSC</p> </div> <Menu on:confirmLogout={logout} /> </main> {:else} <main class="fixed w-full flex justify-between items-center bg-black p-4 text-white" > <div class="p-1"> <button type="button" class="icon-button" on:click={() => navigate("/Home")} > <img alt="skeme" class="w-12 h-12" src="images/logo.png" /> </button> </div> <div class="p-1"> <p class="text-3xl subpixel-antialiased font-sans font-bold">UCOTSC</p> </div> <EmailLogin on:confirmLogin={loginHandler} /> </main> {/if} <style> main { z-index: 1; } </style> and this is my auth.svelte: <script context="module"> import { initAuth } from './../auth/index.js'; export const { user, loginHandler, loginWithEmailPassword, logout } = initAuth(); user.subscribe((v) => console.log(v)); </script> the gist of the problem is that when a user opens the website the default homepage should be Home.svelte and since we have a login option, when a user logs in their credentials the homepage should now change to HomeLogin.svelte and reverts back to Home.svelte when the user logs out. basically the HomeLogin.svelte homepage is for users with log in credentials
414758ac760f5abc519da3ff4467258c
{ "intermediate": 0.39723315834999084, "beginner": 0.43438920378685, "expert": 0.1683776080608368 }
41,640
this is my _layout.svelte: <script> import { Router, Route, navigate } from 'svelte-routing'; import { Nav } from '../components' import { Footer } from '../components' import { FooterLogin } from '../components' import { userlog } from './../auth/index.js'; import { Home, Alert, About, Units, UnitsLogin, AlertLogin } from '../components'; import { onMount } from 'svelte'; onMount(() => { document.title = 'United Calinan Operators Transport Service Cooperative'; navigate("/Home"); setTimeout(() => { navigate("/"); }, 100); }); </script> <Nav /> <Router> <Route path="/Home" component={Home} default/> <Route path="/Units" component={Units} /> <Route path="/Alert" component={Alert} /> <Route path="/About" component={About} /> <Route path="/UnitsLogin" component={UnitsLogin} /> <Route path="/AlertLogin" component={AlertLogin} /> <div> {#if $userlog} <FooterLogin/> {:else} <Footer/> {/if} </div> </Router> and this is my nav.svelte: <script> import { url } from "@roxi/routify"; import { Button, Menu, EmailLogin } from "../components"; import { user, loginHandler, logout } from "./Auth.svelte"; import { userlog } from "./../auth/index.js"; import { navigate } from "svelte-routing"; </script> {#if $userlog} <main class="fixed w-full flex justify-between items-center bg-amber-600 p-4 text-black" > <div class="p-1"> <button type="button" class="icon-button" on:click={() => navigate("/Home")} > <img alt="skeme" class="w-12 h-12" src="images/logo.png" /> </button> </div> <div class="p-1"> <p class="text-3xl subpixel-antialiased font-sans font-bold">UCOTSC</p> </div> <Menu on:confirmLogout={logout} /> </main> {:else} <main class="fixed w-full flex justify-between items-center bg-black p-4 text-white" > <div class="p-1"> <button type="button" class="icon-button" on:click={() => navigate("/Home")} > <img alt="skeme" class="w-12 h-12" src="images/logo.png" /> </button> </div> <div class="p-1"> <p class="text-3xl subpixel-antialiased font-sans font-bold">UCOTSC</p> </div> <EmailLogin on:confirmLogin={loginHandler} /> </main> {/if} <style> main { z-index: 1; } </style> and this is my auth.svelte: <script context="module"> import { initAuth } from './../auth/index.js'; export const { user, loginHandler, loginWithEmailPassword, logout } = initAuth(); user.subscribe((v) => console.log(v)); </script> the gist of the problem is that when a user opens the website the default homepage should be Home.svelte and since we have a login option, when a user logs in their credentials the homepage should now change to HomeLogin.svelte and reverts back to Home.svelte when the user logs out. basically the HomeLogin.svelte homepage is for users with log in credentials
0b38c48eb42f05e5cef0fc503847421c
{ "intermediate": 0.39723315834999084, "beginner": 0.43438920378685, "expert": 0.1683776080608368 }
41,641
#include <SoftwareSerial.h> #include <PN532_SWHSU.h> #include <PN532.h> SoftwareSerial SWSerial( 3, 2 ); // RX, TX PN532_SWHSU pn532swhsu( SWSerial ); PN532 nfc( pn532swhsu ); String tagId = "None", dispTag = "None"; byte nuidPICC[4]; void setup(void) { Serial.begin(115200); Serial.println("Hello Maker!"); // Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2); nfc.begin(); uint32_t versiondata = nfc.getFirmwareVersion(); if (! versiondata) { Serial.print("Didn't Find PN53x Module"); while (1); // Halt } // Got valid data, print it out! Serial.print("Found chip PN5"); Serial.println((versiondata >> 24) & 0xFF, HEX); Serial.print("Firmware ver. "); Serial.print((versiondata >> 16) & 0xFF, DEC); Serial.print('.'); Serial.println((versiondata >> 8) & 0xFF, DEC); // Configure board to read RFID tags nfc.SAMConfig(); //Serial.println("Waiting for an ISO14443A Card ..."); } void loop() { readNFC(); } void readNFC() { boolean success; uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type) success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength); if (success) { Serial.print("UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes"); Serial.print("UID Value: "); for (uint8_t i = 0; i < uidLength; i++) { nuidPICC[i] = uid[i]; Serial.print(" "); Serial.print(uid[i], DEC); } Serial.println(); tagId = tagToString(nuidPICC); dispTag = tagId; Serial.print(F("tagId is : ")); Serial.println(tagId); Serial.println(""); delay(1000); // 1 second halt } else { // PN532 probably timed out waiting for a card Serial.println("Timed out! Waiting for a card..."); } } String tagToString(byte id[4]) { String tagId = ""; for (byte i = 0; i < 4; i++) { if (i < 3) tagId += String(id[i]) + "."; else tagId += String(id[i]); } return tagId; } Timed out! Waiting for a card... Timed out! Waiting for a card... Timed out! Waiting for a card... Timed out! Waiting for a card... Timed out! Waiting for a card... Timed out! Waiting for a card... Timed out! Waiting for a card... Timed out! Waiting for a card... Timed out! Waiting for a card... I need to send data RFID data to google spreadsheet online continuously using arduino IDE integrate with above code:
8276818299ecd8302721f7d6e1ac015f
{ "intermediate": 0.3215397596359253, "beginner": 0.49114277958869934, "expert": 0.18731746077537537 }
41,642
Build a bulk sms softwares
26d636246ed225525b8c9b28f4431603
{ "intermediate": 0.5188254117965698, "beginner": 0.19940800964832306, "expert": 0.2817665636539459 }
41,643
what is wrong with this code: @startuml left to right direction actor Administrator actor User package "User Management" { usecase "UM-1: Create User Account" as UC1 { note right - The system lets administrators create new user accounts. - Requires username, password, first name, last name, email address, user role. - Optional: phone number, department, job title. - Enforces password complexity. - Validates user input for validity and uniqueness. - Sends welcome email to new user. end note } usecase "UM-2: Edit User Account" as UC2 { note right - Allow administrators and users to edit account info. - Editable: password, first name, last name, email address, phone number, department, job title. - Same validation principles as UM-1. end note } usecase "UM-3: Delete User Account" as UC3 { note right - Allows administrators to delete user accounts. - Confirms before deletion. - May retain data for compliance (period TBD). end note } usecase "UM-4: Manage User Roles and Permissions" as UC4 { note right - Allows administrators to define and manage user roles and permissions. - Customizable roles and granular permissions. - User-friendly interface for management. end note } usecase "UM-5: User Login and Authentication" as UC5 { note right - Allows user login with username/password. - Implements secure authentication protocols. - Offers password recovery options. end note } } Administrator --> UC1 : authorizes Administrator --> UC2 : authorizes Administrator --> UC3 : authorizes Administrator --> UC4 : authorizes User --> UC2 : self-edit\nauthorizes User --> UC5 : uses @enduml
d9d2548a18c87a607bd0e70aaf1a2741
{ "intermediate": 0.34039103984832764, "beginner": 0.3311659097671509, "expert": 0.3284430503845215 }
41,644
Make me a tictactoe with HTML, css and javascript, the second player is a pc.
cecfa70773ae628d48045191ba79474c
{ "intermediate": 0.4449845850467682, "beginner": 0.2586177587509155, "expert": 0.2963976562023163 }
41,645
code: import serial import gspread from oauth2client.service_account import ServiceAccountCredentials import re import time # User input json_key_file = input("Please enter the path to your JSON key file: ") sheet_name = input("Please enter the name of your google sheet: ") com_port = input("Please enter your COM port (e.g., ‘COM3’ or ‘/dev/ttyUSB0’ on Linux): ") email = input(“Please enter your email: “) # Google Sheets setup scope = [‘https://www.googleapis.com/auth/spreadsheets’, ‘https://www.googleapis.com/auth/drive’] credentials = ServiceAccountCredentials.from_json_keyfile_name(json_key_file, scope) gc = gspread.authorize(credentials) worksheet = gc.open(sheet_name).sheet1 # Serial setup ser = serial.Serial(com_port, 115200, timeout=1) def write_to_sheet(tag_id, email): try: worksheet.append_row([time.strftime(”%Y-%m-%d %H:%M:%S”), tag_id, email]) print(“Data written to Google Sheet.”) except Exception as e: print("Failed to write data to Google Sheet: “, e) def main(): print(“Reading serial output…”) pattern = re.compile(r"tagId\s+is\s+:\s+(\d+.\d+.\d+.\d+)”) try: while True: data = ser.readline().decode(‘utf-8’) match = pattern.search(data) if match: tag_id = match.group(1) write_to_sheet(tag_id, email) except KeyboardInterrupt: print(“Program stopped by user.”) finally: ser.close() if name == “main”: main() code.py: import serial import gspread from oauth2client.service_account import ServiceAccountCredentials import re import time # User input json_key_file = input("Please enter the path to your JSON key file: ") sheet_name = input("Please enter the name of your google sheet: ") com_port = input("Please enter your COM port (e.g., ‘COM3’ or ‘/dev/ttyUSB0’ on Linux): ") email = input(“Please enter your email: “) # Google Sheets setup scope = [‘https://www.googleapis.com/auth/spreadsheets’, ‘https://www.googleapis.com/auth/drive’] credentials = ServiceAccountCredentials.from_json_keyfile_name(json_key_file, scope) gc = gspread.authorize(credentials) worksheet = gc.open(sheet_name).sheet1 # Serial setup ser = serial.Serial(com_port, 115200, timeout=1) def write_to_sheet(tag_id, email): try: worksheet.append_row([time.strftime(”%Y-%m-%d %H:%M:%S”), tag_id, email]) print(“Data written to Google Sheet.”) except Exception as e: print("Failed to write data to Google Sheet: “, e) def main(): print(“Reading serial output…”) pattern = re.compile(r"tagId\s+is\s+:\s+(\d+.\d+.\d+.\d+)”) try: while True: data = ser.readline().decode(‘utf-8’) match = pattern.search(data) if match: tag_id = match.group(1) write_to_sheet(tag_id, email) except KeyboardInterrupt: print(“Program stopped by user.”) finally: ser.close() if name == “main”: main() in google spreadsheets its displaying: 2024-03-09 16:22:39 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:40 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:41 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:42 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:43 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:44 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:45 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:46 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:47 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:48 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:49 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:50 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:51 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:52 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:53 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:54 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:55 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:56 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:57 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:58 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:22:59 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:00 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:01 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:02 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:03 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:04 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:05 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:06 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:07 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> 2024-03-09 16:23:17 115.233.74.37 <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> i need to display data inside serial monitor into google sheets
3555510f88b09ca4bb7690bd5cd62321
{ "intermediate": 0.31989341974258423, "beginner": 0.44767484068870544, "expert": 0.23243169486522675 }
41,646
Rewrite this code to add parallel quick sort and parallel counting sort: #include <iostream> #include <vector> #include <algorithm> #include <cstdlib> #include <ctime> #include <sys/time.h> #include <omp.h> using namespace std; // Function prototypes for the sorting algorithms void merge(vector<int> &arr, int low, int mid, int high); void parallelMergeSort(vector<int> &arr, int low, int high); // Function to measure execution time double measureTime(void (*sortFunc)(vector<int> &, int, int), vector<int> &data, int numThreads); int main() { int choice; const int MAX_VALUE = 1000; // Range: 0 to 1000 cout << "Enter number of integers to sort (e.g., 1000000000 for 10^9): "; int N; cin >> N; cout << "Choose sorting algorithm:" << endl; cout << "1 - Parallel Merge Sort" << endl; cout << "(Note: Only Merge Sort is implemented in this example.)" << endl; cout << "Selection: "; cin >> choice; vector<int> data(N), temp; srand(static_cast<unsigned>(time(0))); generate(data.begin(), data.end(), [&] { return rand() % (MAX_VALUE + 1); }); vector<int> thread_counts = {1, 2, 4, 6, 8, 10, 12, 14, 16}; double totalTime, avgTime; if (choice == 1) { cout << "Running Parallel Merge Sort:" << endl; for (int numThreads : thread_counts) { totalTime = 0.0; for (int i = 0; i < 5; ++i) { // 5 runs temp = data; // Copy the original data totalTime += measureTime(parallelMergeSort, temp, numThreads); } avgTime = totalTime / 5; cout << "Threads: " << numThreads << ", Avg Time: " << avgTime << " seconds." << endl; } } else { cerr << "Invalid choice." << endl; return 1; } return 0; } double measureTime(void (*sortFunc)(vector<int> &, int, int), vector<int> &data, int numThreads) { omp_set_num_threads(numThreads); struct timeval start, end; gettimeofday(&start, NULL); sortFunc(data, 0, data.size() - 1); gettimeofday(&end, NULL); double elapsed = (end.tv_sec - start.tv_sec) + ((end.tv_usec - start.tv_usec) / 1000000.0); return elapsed; } void merge(vector<int> &arr, int low, int mid, int high) { int n1 = mid - low + 1; int n2 = high - mid; vector<int> L(n1), R(n2); for (int i = 0; i < n1; i++) L[i] = arr[low + i]; for (int j = 0; j < n2; j++) R[j] = arr[mid + 1 + j]; int i = 0, j = 0, k = low; while (i < n1 && j < n2) { if (L[i] <= R[j]) { arr[k] = L[i]; i++; } else { arr[k] = R[j]; j++; } k++; } while (i < n1) { arr[k] = L[i]; i++; k++; } while (j < n2) { arr[k] = R[j]; j++; k++; } } void parallelMergeSort(vector<int> &arr, int low, int high) { int mid; if (low < high) { mid = low + (high - low) / 2; #pragma omp parallel sections { #pragma omp section parallelMergeSort(arr, low, mid); #pragma omp section parallelMergeSort(arr, mid + 1, high); } merge(arr, low, mid, high); } }
16b788f01342e1e69767a4044fda7665
{ "intermediate": 0.3293141722679138, "beginner": 0.3475610613822937, "expert": 0.3231247663497925 }
41,647
I want you create an Android app for me using code, could you do that?
7a60ea2181b76ee7baba57043247920b
{ "intermediate": 0.48782914876937866, "beginner": 0.19581015408039093, "expert": 0.3163606822490692 }
41,648
this is my _layout.svelte: <script> import { Router, Route, navigate } from 'svelte-routing'; import { Nav } from '../components' import { Footer } from '../components' import { FooterLogin } from '../components' import { userlog } from './../auth/index.js'; import { Home, Alert, About, Units, UnitsLogin, AlertLogin } from '../components'; import { onMount } from 'svelte'; onMount(() => { document.title = 'United Calinan Operators Transport Service Cooperative'; navigate("/Home"); setTimeout(() => { navigate("/"); }, 100); }); </script> <Nav /> <Router> <Route path="/Home" component={Home} default/> <Route path="/Units" component={Units} /> <Route path="/Alert" component={Alert} /> <Route path="/About" component={About} /> <Route path="/UnitsLogin" component={UnitsLogin} /> <Route path="/AlertLogin" component={AlertLogin} /> <div> {#if $userlog} <FooterLogin/> {:else} <Footer/> {/if} </div> </Router> and this is my nav.svelte: <script> import { url } from "@roxi/routify"; import { Button, Menu, EmailLogin } from "../components"; import { user, loginHandler, logout } from "./Auth.svelte"; import { userlog } from "./../auth/index.js"; import { navigate } from "svelte-routing"; </script> {#if $userlog} <main class="fixed w-full flex justify-between items-center bg-amber-600 p-4 text-black" > <div class="p-1"> <button type="button" class="icon-button" on:click={() => navigate("/Home")} > <img alt="skeme" class="w-12 h-12" src="images/logo.png" /> </button> </div> <div class="p-1"> <p class="text-3xl subpixel-antialiased font-sans font-bold">UCOTSC</p> </div> <Menu on:confirmLogout={logout} /> </main> {:else} <main class="fixed w-full flex justify-between items-center bg-black p-4 text-white" > <div class="p-1"> <button type="button" class="icon-button" on:click={() => navigate("/Home")} > <img alt="skeme" class="w-12 h-12" src="images/logo.png" /> </button> </div> <div class="p-1"> <p class="text-3xl subpixel-antialiased font-sans font-bold">UCOTSC</p> </div> <EmailLogin on:confirmLogin={loginHandler} /> </main> {/if} <style> main { z-index: 1; } </style> and this is my auth.svelte: <script context="module"> import { initAuth } from './../auth/index.js'; export const { user, loginHandler, loginWithEmailPassword, logout } = initAuth(); user.subscribe((v) => console.log(v)); </script> the gist of the problem is that when a user opens the website the default homepage should be Home.svelte and since we have a login option, when a user logs in their credentials the homepage should now change to HomeLogin.svelte and reverts back to Home.svelte when the user logs out. basically the HomeLogin.svelte homepage is for users with log in credentials
caa9822d3e787625158f2cc4324f06a7
{ "intermediate": 0.39723315834999084, "beginner": 0.43438920378685, "expert": 0.1683776080608368 }
41,649
create a button leads to the page with any form in html
375a25ca5d9480398e141434cf4bca9a
{ "intermediate": 0.2944175601005554, "beginner": 0.26465898752212524, "expert": 0.44092345237731934 }
41,650
You are an expert in creating microsoft excel formulas that work and you have to provide a formula for the following problem. I have a lookup reference in cell O8 (sheet1) that i need to search in a range K42:K1100 (sheet2), once found it should then return the value in the same row it is found but column H in (sheet2) and the answer returned to Q8 on sheet 1
940bdda433c0a9a486b38b54c23e13a3
{ "intermediate": 0.2644563913345337, "beginner": 0.28469258546829224, "expert": 0.4508510231971741 }
41,651
In NixOS, I have a disk mounted in ~/Media and I want to move it to /mnt/HDD-1. How do I make the change?
b13b1fab08369a46f9b0c5de6eae9cee
{ "intermediate": 0.4387783110141754, "beginner": 0.3009522259235382, "expert": 0.26026949286460876 }
41,652
Code me a simple snake game in python
965ba06caa8ec8116ad614d5a02655dc
{ "intermediate": 0.31145337224006653, "beginner": 0.3923581838607788, "expert": 0.29618844389915466 }
41,653
Can you code lua?
ec1886f701f122c2315e63ebc2d2683f
{ "intermediate": 0.30569836497306824, "beginner": 0.2478315383195877, "expert": 0.44647008180618286 }
41,654
How do I create a samba share in NixOS so that the folder ~/media is shared? It should only be accessible via localhost
be2e40f835e149338d7d35ad36de139e
{ "intermediate": 0.4748004078865051, "beginner": 0.27022427320480347, "expert": 0.2549753189086914 }
41,655
How do I create a samba share in NixOS so that the folder ~/media is shared? It should only be accessible via the local network
66ba3d3fdc048f18dd56867ad5b1e2a5
{ "intermediate": 0.4598348140716553, "beginner": 0.2687545418739319, "expert": 0.27141064405441284 }
41,656
hello
358f9d8dfc1d300cf8da2d1f84cecb19
{ "intermediate": 0.32064199447631836, "beginner": 0.28176039457321167, "expert": 0.39759764075279236 }
41,657
What do the following settings mean regarding mergerfs and NFS: mergerfs settings: noforget inodecalc=path-hash NFS export settings: fsid=UUID no_root_squash
501914978a573a5bd88021679beb8b51
{ "intermediate": 0.4169864356517792, "beginner": 0.3016369938850403, "expert": 0.28137660026550293 }
41,658
What settings does mergerfs require for NFS shares?
69fa1dfbfb5e3d57096f92c1a1e7f1cd
{ "intermediate": 0.35519227385520935, "beginner": 0.2783554196357727, "expert": 0.36645233631134033 }
41,659
I am making a C++ SDL based game engine, I need you to help me to finish it. My current problem I am having is that I have an struct BlendMode that exposes SDL methods which they are used in the following classes: Renderer, Surface and Texture. The problem is, if it was only used in the Renderer I would have made a public enum but now I have to make an struct an expose the methods I don't want: struct BlendMode { enum class Type { None, Blend, Add, Mod, Mul }; static SDL_BlendMode ToSDL(BlendMode::Type blendMode); static BlendMode::Type FromSDL(SDL_BlendMode blendMode); }; //Example usage 1: SDL_BlendMode sdlBlendMode = BlendMode::ToSDL(blendMode); if (texture && SDL_SetTextureBlendMode(texture, sdlBlendMode) != 0) { /... { //Example usage 2: SDL_BlendMode sdlBlendMode = SDL_BLENDMODE_NONE; if (texture && SDL_GetTextureBlendMode(texture, &sdlBlendMode) != 0) { //error } return BlendMode::FromSDL(sdlBlendMode);
9b20b715e4dad13471c2a8baefb5021b
{ "intermediate": 0.41386735439300537, "beginner": 0.4231586158275604, "expert": 0.16297411918640137 }
41,660
Is this the correct lyrics of the song "ain't no sunshine". Lyrics= Ain't no sunshine when she's gone It's not warm when she's away Ain't no sunshine when she's gone And she's always gone too long Anytime she goes away Wonder this time where she's gone Wonder if she's gone to stay Ain't no sunshine when she's gone And this house just ain't no home Anytime she goes away And I know, I know, I know, I know I know, I know, I know, I know I know, I know, I know, I know I know, I know, I know, I know Hey, I oughtta leave the young thing alone But ain't no sunshine when she's gone Only darkness every day Only darkness every day Only darkness every day Only darkness every day Ain't no sunshine when she's gone It's not warm when she's away Ain't no sunshine when she's gone And she's always gone too long Anytime she goes away
f7a35b83b0c038db738c243eddd66e8f
{ "intermediate": 0.3151330351829529, "beginner": 0.4100937843322754, "expert": 0.27477315068244934 }