30秒学会 Golang 片段 – IsPowerOf2
Returns true if the given number is a power of 2, false otherwise. Use the bitwise binary AND operat...
Returns true if the given number is a power of 2, false otherwise. Use the bitwise binary AND operat...
Returns True if the given number is even, False otherwise. Checks whether a number is odd or even us...
Creates a function that gets the argument at index n. If n is negative, the nth argument from the en...
Moves the specified amount of elements to the end of the array. Use Array.prototype.slice() twice to...
Returns true if the given string is lower case, false otherwise. Convert the given string to lower c...
Converts Fahrenheit to Celsius. Follows the conversion formula C = (F – 32) * 5/9.
Returns the minimum of two DateTime values. Use the conditional operator (?:) to return the minimum ...
Filters out the unique values in a list. Use a collections.Counter to get the count of each value in...
Returns true if the provided predicate function returns true for all elements in a collection, false...
Returns tomorrow’s DateTime value. Use DateTime.Now to get the current date, then use DateTime...