1,490 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
4
votes
2
answers
179
views
Regex - How do I check for digits 01 to 52 in filenames?
I have found the answer :-)
It is: ^ghf(0[0-9]|[1-4][0-9]|5[0-2])\d{3}[A-Z]{2}_v\d{2}.pdf$
I receive filenames from a client that are structured according to the following scheme:
ghf50001BE_v02.pdf
...
0
votes
2
answers
88
views
SQL separate units and decimals from price
I have price column in MySQL contains this values :
price
1020.2200
202.0000
0.5000
820.6700
I want to split at the floating point.
Here is what I'm trying to get :
price
p_units
p_decimals
1020.2200
...
-5
votes
1
answer
74
views
why do we need a y variable in keras model.fit()? [closed]
I am working with the hand written digits dataset. The data is loaded as follows:
(X_train, y_train), (X_test, y_test) = keras.datasets.mnist.load_data()
This is the code for a neural network created ...
0
votes
2
answers
59
views
R match pattern with multiple choice numbers of digits
I struggled finding this simple task, just a pattern to match multiple choices of digits. For example if I had these filenames:
file_1_text.txt ==> Yes
file_3_text.txt ==> Yes
file_10_text....
2
votes
1
answer
177
views
Count the number of integers in range [0,k] whose sum of digits equals s
Count the number of integers in range [0,k] whose sum of digits equals s. Since k can be a very large number, the solution should not be O(k). My attempt of a O(s log(k)) solution (log(k) is ...
0
votes
1
answer
56
views
Clarification on "each digit represents an increasing power of 10" in number representation
I'm trying to understand a statement I came across: "each digit represents an increasing power of 10." This seems unclear to me because, from my understanding, each digit itself does not ...
0
votes
1
answer
69
views
wildcards and regular expression in snakemake
I'm trying to create wildcards with some folders/directories names that are ouputed from rule ReferenceDatabase that created the "Campylobacter/Gene_Flow/ReferenceDatabase/{dirname}" folder (...
0
votes
2
answers
230
views
Digitwise_addition: exceed limit: if exceeded -> code time out
i am working on a kata.
Digitwise addition is a special kind of addition where instead of adding 1 normally to the number, it adds 1 to every digit of that number. If the digit is a 9, we replace it ...
-1
votes
2
answers
64
views
seperating dictionary values by digits and letters [duplicate]
I'm trying to figure out how to take a dictionary value that contains digits and letters, split the digits from the letters, convert the digits to a float, prompt the user for numerical input, add ...
2
votes
1
answer
143
views
BigDecimal - How to know the precision in small decimal numbers below 1 considering left zeroes just after comma
I am developing a calculator and I want to format the number in scientific notation only when it reaches a certain number of digits.
I wrote this piece of code which works fine for big numbers.
...
1
vote
1
answer
143
views
Counting the number of distinct digits that divide a number- Unable to pass all test cases
I was practicing from Leetcode earlier and I came across this question:
Given an integer num, return the number of distinct digits in num that divide num.
An integer val divides nums if nums % val == ...
0
votes
3
answers
136
views
Digit Frequency Program
Given a string s consisting of alphabets and digits, find the frequency of each digit in the given string.
I have tried it and my code is given below. Please explain why it's not working.
#include <...
0
votes
2
answers
196
views
9 Digit Addresses in Hexadecimal System in MacOS
I am practicing on C programming language. I had Win 10 systems and I was practicing on it and I always get addresses which are multiples of 2. Know, I am practicing on Macbook Pro M3 and I get 9 ...
0
votes
3
answers
107
views
Redshift/Postgres between function produces seemingly unrelated error when ">" or "<" both work but not together
I am trying to filter out data that is stored as strings but represents numeric values.
I filter out non-numeric strings then convert to a float. I am then trying to filter values above or below a ...
0
votes
1
answer
33
views
Remove the digit(s), the comma and the space at the left part of the line
Sample data:
(17, ' Antonio Moreno Taquería (Restaurant) - 'Page 2' <br> ('4 februari 2024'),
(1, ' Cactus Comidas para llevar (Pizza) - 'Page 45' <br> ('7 april 2023'),
(58679, ' ...