Remember
Register
Search With
Seek4Info.com
Programming & Software Q&A | CollectiveSolver
Questions
Tags
Users
Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.
Contact: aviboots(AT)netvision.net.il
Most popular tags
python
c
java
cpp
c#
javascript
php
vb#
typescript
nodejs
go
rust
scala
swift
kotlin
pascal
html
ruby
dart
vbnet
r
css
bootstrap
win32
groovy
winapi
sql
mysql
jquery
pascal-string
lua
winforms
kotlin-string
bash
c-string
swift-string
cpp-string
go-string
php-string
cobol
c#-string
java-string
vbnet-string
rust-string
python-string
cpp-vector
f#
opengl
scala-string
javascript-string
pascal-array
swift-array
typescript-string
c-array
php-array
javascript-array
rust-vector
typescript-array
python-list
reactjs
scala-array
c-windows
nodejs-string
go-array
kotlin-array
nodejs-array
sdl2
cpp-matrix
sdl3
c-matrix
cpp-array
c#-list
vbnet-list
pascal-matrix
go-slice
c#-array
java-array
nodejs-express
character-code-ascii-unicode
swift-matrix
c#-matrix
angularjs
transpose-matrix
binary-search-algorithm
dot-product-two-arrays
generate-random-floating-point-numbers
all-permutations-combinations
kotlin-matrix
typescript-matrix
vbnet-array
kotlin-list
longest-substring-without-repeating-characters
calculate-volume-cube
divide-given-amount-into-bills-coins
convert-decimal-number-to-rational-number
count-non-overlapping-instances-substring-in-string
print-floyds-triangle
case-insensitively-check-character-exists-in-string
calculate-area-pentagon
measure-function-execution-time
Disclosure:
My content contains affiliate links.
Recent questions tagged RUBY
42,844
questions
55,671
answers
573
users
Recent questions tagged RUBY
1
answer
5
views
How to generate a series of unique HEX colors in Ruby
asked
3 hours
ago
by
avibootz
ruby
ruby-generate-series-unique-hex-colors
generate-series-unique-hex-colors
1
answer
12
views
How to generate a random color in RGB format with Ruby
asked
1 day
ago
by
avibootz
ruby
ruby-generate-random-color-rgb-format
generate-random-color-rgb-format
1
answer
11
views
How to generate a random color in HEX format with Ruby
asked
1 day
ago
by
avibootz
ruby
ruby-generate-random-color-hex-format
generate-random-color-hex-format
2
answers
16
views
How to print the numbers 0 to 31 by changing 1 bit each time in Ruby
asked
2 days
ago
by
avibootz
ruby
ruby-print-0-31-changing-1-bit-each-time
print-0-31-changing-1-bit-each-time
1
answer
22
views
How to generate N random 1s in a zero-based matrix with Ruby
asked
3 days
ago
by
avibootz
ruby
ruby-generate-n-random-1-zero-based-matrix
generate-n-random-1-zero-based-matrix
1
answer
21
views
How to check if two strings are anagrams (same letters, different words) in Ruby
asked
4 days
ago
by
avibootz
ruby
ruby-check-two-strings-anagrams
check-two-strings-anagrams
1
answer
26
views
How to find all sequences of consecutive prime numbers whose sum equals N in Ruby
asked
4 days
ago
by
avibootz
ruby
ruby-all-sequences-consecutive-prime-numbers-sum-equal-n
all-sequences-consecutive-prime-numbers-sum-equal-n
1
answer
42
views
How to print the first 100 prime numbers in Ruby
asked
6 days
ago
by
avibootz
ruby
ruby-print-first-100-prime-numbers
print-first-100-prime-numbers
1
answer
37
views
How to initialize an array with a range of numbers in Ruby
asked
6 days
ago
by
avibootz
ruby
ruby-initialize-array-range-of-numbers
initialize-array-range-of-numbers
1
answer
51
views
How to do modulo multiplication for 64‑bit values without using BigInteger in Ruby
asked
Aug 16
by
avibootz
ruby
ruby-modulo-multiplication-64-bit-values-without-biginteger
modulo-multiplication-64-bit-values-without-biginteger
1
answer
50
views
How to remove every N‑th element from an array in Ruby
asked
Aug 16
by
avibootz
ruby
ruby-remove-every-n-element-array
remove-every-n-element-array
1
answer
49
views
How to use # frozen_string_literal: true in Ruby
asked
Aug 15
by
avibootz
ruby
ruby-use-frozen-string-literal-true
use-frozen-string-literal-true
1
answer
45
views
How to build sparse array in Ruby
asked
Aug 15
by
avibootz
ruby
ruby-build-sparse-array
build-sparse-array
1
answer
57
views
How to get the first N digits of a BigInteger in Ruby
asked
Aug 14
by
avibootz
ruby
ruby-get-first-n-digits-biginteger
get-first-n-digits-biginteger
1
answer
68
views
How to find the median among three given numbers in Ruby
asked
Aug 13
by
avibootz
ruby
ruby-median-among-three-given-numbers
median-among-three-given-numbers
1
answer
68
views
How to extract and sort numbers from a string containing numbers and text in Ruby
asked
Aug 13
by
avibootz
ruby
ruby-extract-sort-numbers-string
extract-sort-numbers-string
1
answer
72
views
How to convert radians to degrees and degrees to radians in Ruby
asked
Aug 12
by
avibootz
ruby
ruby-convert-radians-degrees-degrees-radians
convert-radians-degrees-degrees-radians
2
answers
85
views
How to find the longest substring without repeating characters in Ruby
asked
Aug 11
by
avibootz
ruby
ruby-substring
ruby-longest-substring-without-repeating-characters
longest-substring-without-repeating-characters
1
answer
76
views
How to find the Kth smallest number in an unsorted array with Ruby
asked
Aug 10
by
avibootz
ruby
ruby-find-k-smallest-number-unsorted-array
find-k-smallest-number-unsorted-array
1
answer
72
views
How to find the N smallest values in a 2D array in Ruby
asked
Aug 10
by
avibootz
ruby
ruby-find-n-smallest-values-2d-array
find-n-smallest-values-2d-array
1
answer
61
views
How to sort an array with a single loop in Ruby
asked
Aug 8
by
avibootz
ruby
ruby-sort-array-with-single-loop
sort-array-with-single-loop
1
answer
67
views
How to remove extra whitespace from a string in Ruby
asked
Aug 8
by
avibootz
ruby
ruby-remove-extra-whitespace-string
remove-extra-whitespace-string
1
answer
75
views
How to calculate the distance between two latitude-longitude points in Ruby
asked
Aug 7
by
avibootz
ruby
ruby-distance-between-two-latitude-longitude-points
distance-between-two-latitude-longitude-points
1
answer
57
views
How to convert a decimal to integer in Ruby
asked
Aug 6
by
avibootz
ruby
ruby-convert-decimal-integer
convert-decimal-integer
1
answer
65
views
How to generate all 4×4 binary magic squares (using only 0 and 1) in Ruby
asked
Aug 5
by
avibootz
ruby
ruby-generate-all-4-4-binary-magic-squares-only-0-1
generate-all-4-4-binary-magic-squares-only-0-1
1
answer
75
views
How to check whether a matrix is a magic square or not in Ruby
asked
Aug 5
by
avibootz
ruby
ruby-check-matrix-magic-square
check-matrix-magic-square
1
answer
73
views
How to calculate the volume of a cube in Ruby
asked
Aug 4
by
avibootz
ruby
ruby-calculate-volume-cube
calculate-volume-cube
1
answer
64
views
How to remove all non-ASCII characters from a string in Ruby
asked
Aug 4
by
avibootz
ruby
ruby-string
ruby-ascii
ruby-remove-non-ascii-characters-string
non-ascii-characters-string
1
answer
69
views
How to remove duplicate words with Unicode characters from free‑text in Ruby
asked
Aug 4
by
avibootz
ruby
ruby-remove-duplicate-words-unicode-free-text
remove-duplicate-words-unicode-free-text
1
answer
80
views
How to remove duplicate words from free‑text in Ruby
asked
Aug 3
by
avibootz
ruby
ruby-remove-duplicate-words-from-free-text
remove-duplicate-words-from-free-text
1
answer
76
views
How to remove duplicate case‑insensitive words separated by multiple delimiters from a string in Ruby
asked
Aug 2
by
avibootz
ruby
ruby-remove-duplicate-case-insensitive-words-multiple-delimiters-from-string
remove-duplicate-case-insensitive-words-multiple-delimiters-from-string
1
answer
68
views
How to perform high‑performance reversible text compression using a word dictionary in Ruby
asked
Aug 1
by
avibootz
ruby
ruby-text-compression-using-word-dictionary
text-compression-using-word-dictionary
1
answer
71
views
How to traverse a slice from both sides at the same time in Ruby
asked
Jul 31
by
avibootz
ruby
ruby-traverse-slice-both-sides-same-time
traverse-slice-both-sides-same-time
1
answer
85
views
How to generate random Powerball lottery numbers (pick 5 numbers from 1-69 + 1 Powerball from 1-26) in Ruby
asked
Jul 30
by
avibootz
ruby
ruby-generate-random-powerball-lottery-numbers-5-of-1-69-and-1-of-1-26
generate-random-powerball-lottery-numbers-5-of-1-69-and-1-of-1-26
1
answer
72
views
How to compute the total number of Powerball lottery combinations (5 out of 99 and 1 out of 26) in Ruby
asked
Jul 29
by
avibootz
ruby
ruby-compute-total-number-powerball-lottery-combinations-5-99-and-1-26
compute-total-number-powerball-lottery-combinations-5-99-and-1-26
1
answer
73
views
How to generate random lottery numbers for 6 numbers out of 37 and 1 power number out of 7 in Ruby
asked
Jul 28
by
avibootz
ruby
ruby-generate-random-lottery-numbers-for-6-out-of-37-power-1-out-of-7
generate-random-lottery-numbers-for-6-out-of-37-power-1-out-of-7
1
answer
61
views
How to compute the total number of lottery combinations for choosing 6 out of 37 and 1 power out of 7 in Ruby
asked
Jul 27
by
avibootz
ruby
ruby-total-lottery-combinations-choosing-6-out-of-37-power-1-out-of-7
total-lottery-combinations-choosing-6-out-of-37-power-1-out-of-7
1
answer
66
views
How to divide a given amount into bills (banknotes) and coins in Ruby
asked
Jul 26
by
avibootz
ruby
ruby-divide-given-amount-into-bills-coins
divide-given-amount-into-bills-coins
1
answer
69
views
How to find the Nth set bit in a 32‑bit integer with Ruby
asked
Jul 25
by
avibootz
ruby
ruby-find-n-set-bit-in-32-bit-integer
find-n-set-bit-in-32-bit-integer
1
answer
90
views
How to convert a decimal number to a rational number in Ruby
asked
Jul 23
by
avibootz
ruby
ruby-convert-decimal-number-to-rational-number
convert-decimal-number-to-rational-number
1
answer
79
views
How to round a number to the nearest power of 2 in Ruby
asked
Jul 22
by
avibootz
ruby
ruby-round
ruby-round-number-to-nearest-power-of-2
round-number-to-nearest-power-of-2
1
answer
75
views
How to round an integer up to the nearest multiple of 'multiple' in Ruby
asked
Jul 22
by
avibootz
ruby
ruby-round
ruby-round-integer-up-nearest-multiple-of-multiple
round-integer-up-nearest-multiple-of-multiple
1
answer
72
views
How to find the minimal possible sum of two distinct elements in an array with Ruby
asked
Jul 21
by
avibootz
ruby
ruby-minimal-sum-two-elements-array
minimal-sum-two-elements-array
1
answer
81
views
How to split a 32‑bit integer into its four bytes in Ruby
asked
Jul 20
by
avibootz
ruby
ruby-split-32-bit-integer-into-four-bytes
split-32-bit-integer-into-four-bytes
1
answer
83
views
How to split a number N into M random positive parts whose sum is exactly N in Ruby
asked
Jul 19
by
avibootz
ruby
ruby-split-number-n-into-m-random-parts-whose-sum-is-n
split-number-n-into-m-random-parts-whose-sum-is-n
1
answer
70
views
How to determine whether two axis‑aligned rectangles overlap in Ruby
asked
Jul 18
by
avibootz
ruby
ruby-determine-whether-two-axis-aligned-rectangles-overlap
determine-whether-two-axis-aligned-rectangles-overlap
1
answer
79
views
How to count the number of non-overlapping instances of a substring in a string in Ruby
asked
Jul 18
by
avibootz
ruby
ruby-count-non-overlapping-instances-substring-in-string
count-non-overlapping-instances-substring-in-string
1
answer
91
views
How to generate 3 no-digit repeated random integers, each with distinct digits in Ruby
asked
Jul 17
by
avibootz
ruby
ruby-generate-3-no-digit-repeated-random-integers-each-with-distinct-digits
generate-3-no-digit-repeated-random-integers-each-with-distinct-digits
1
answer
73
views
How to generate N random integers, each with distinct digits and exact length L in Ruby
asked
Jul 16
by
avibootz
ruby
ruby-generate-n-random-integers-with-distinct-digits-and-length-l
generate-n-random-integers-with-distinct-digits-and-length-l
1
answer
69
views
How to calculate the next multiple of 10 in Ruby
asked
Jul 15
by
avibootz
ruby
ruby-next-multiple-of-10
next-multiple-of-10
Page:
1
2
3
4
5
6
...
8
next »
...