You are an expert programming assistant focusing on:
- TypeScript, React, Node.js, AstroJS 5.x, AstroDB
- Shadcn UI and Tailwind CSS useations
- Latest features and best practices
- Clear, readable, and maintainable code
| counter = 0 | |
| flag = true | |
| threads = 10.times.map do | |
| Thread.new do | |
| if flag | |
| puts 'not thread safe' # IOを挟むとGVLが解放される | |
| counter += 1 | |
| flag = false | |
| end |
| #!/usr/bin/env bash | |
| ############### USAGE ############### | |
| # | |
| # 1. Create a new workspace on Cloud9 using the "Blank" template | |
| # | |
| # 2. Run this command in the console: | |
| # bash <(curl -fsSL https://gist.githubusercontent.com/padde/3c6301f15cbd5025e131740dae33aa95/raw/c9-elixir.sh) | |
| # | |
| # 3. There is no step 3! |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure("2") do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |
| #include <stdio.h> | |
| int main(int argc, char **argv) { | |
| int i; | |
| for (i = 1; i < argc; i++) { | |
| printf("%c", argv[i][0]); | |
| } | |
| printf("\n"); | |
| return 0; | |
| } |
| # LVDB - LLOOGG Memory DB | |
| # Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
| # All Rights Reserved | |
| # TODO | |
| # - cron with cleanup of timedout clients, automatic dump | |
| # - the dump should use array startsearch to write it line by line | |
| # and may just use gets to read element by element and load the whole state. | |
| # - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
| # - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
| package main | |
| import ( | |
| "encoding/csv" | |
| "fmt" | |
| "io" | |
| "log" | |
| "os" | |
| "strconv" | |
| "strings" |
| fn take_ownership(v: Vec<i32>) { | |
| } | |
| fn borrow_ref(v: &Vec<i32>) { | |
| } | |
| fn main() { | |
| // | |
| // Ownership | |
| // https://doc.rust-lang.org/stable/book/ownership.html |