What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-14 06:40:17
regular expression to find numbers in a string python
import re # Example with integers and floats both positive and negative and scientific notation. target_str = 'I live at 9-162 Malibeu. My phone number is +351911199911. I have 5.50 dollars with me, but I have a net income of -1.01 per day which is about... Add solution -
C++ 2021-09-06 07:28:03
bit masking tricks
Setting a bit Use the bitwise OR operator (|) to set a bit. number |= 1UL << n; That will set the nth bit of number. n should be zero, if you want to set the 1st bit and so on upto n-1, if you want to set the nth bit. Use 1ULL if number is wider t... Add solution