// What will the program output at the comments? package main import "fmt" func main() { nums := make([]int, 1, 2) fmt.Println(nums) // appendSlice(nums, 1024) fmt.Println(nums) // mutateSlice(nums, 1, 512) fmt.Println(nums) // } func appendSlice(sl []int, val int) { sl = append(sl, val) fmt.Println(sl) // } func mutateSlice(sl []int, idx, val int) { sl[idx] = val fmt.Println(sl) // }
Golang
You have two tables: orders: order_id (unique order identifier) customer_id (customer identifier) order_date (order date) total_amount (total order amount) customers: customer_id (unique customer identifier) customer_name (customer name) city (customer's city) Task: Write an SQL query that returns the following data: List of customers (name and city) who have placed orders totaling more than $1000. For each customer from point 1, display the total sum of all orders.
What Kafka client was used in the project and how did you interact with it?
Can you explain the principle of operation and main features of the CQRS model?
Tell about the tech stack you used.
What is the role and purpose of an empty interface in programming?
How does parallel task processing differ from multithreaded execution in programming?
How does the Go scheduler work? Tell the main points.
Have you configured Kubernetes?
Table `employees`: | id | name | department | salary | |----|------|------------|--------| | 1 | A | IT | 100 | | 2 | B | IT | 100 | | 3 | C | IT | 90 | | 4 | D | IT | 80 | | 5 | E | HR | 200 | | 6 | F | HR | 180 | You need to list all employees who are in the top 3 by salary within their department. If multiple employees have the same salary, they should all be included (even if this extends the top-3 to 4-5 people).
Напишите код с worker pool для обработки слайса URL-адресов с параллельными HTTP-запросами.
What does PARTITION BY do in window functions?
Can you explain what the C4 model is and how it is used for visualizing system architecture?
What red flags in a company would be deal-breakers for you?
What tools and approaches have you used in creating microservices architecture?
What types of memory exist and how do they interact with each other?
What value will be returned by the len function when called on a string?
func appendSlice(sl []int, val int) { sl = append(sl, val) } func mutateSlice(sl []int, idx, val int) { sl[idx] = val } package main import "fmt" type Person struct { Name string } func changeName(person *Person) { person = &Person{ Name: "Alice", } } func main() { person := &Person{ Name: "Bob", } fmt.Println(person.Name) // changeName(person) fmt.Println(person.Name) // }
How is a slice passed to a function in a programming language?
How to determine that degradation occurred specifically due to increased resource consumption (CPU, etc.)?