What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-16 01:21:12
unsupported operand type(s) for -: 'str' and 'str'
# Error: TypeError: unsupported operand type(s) for /: 'str' and 'str' # Solution: # You're probably mixing strings and integers. Make sure to either # convert integers to strings with str(int) or strings to integers/floats # with int(string) or flo... Add solution -
TypeScript 2021-11-15 06:15:19
typescript convert an unknown to string
// To convert an unknown type into any other type we can use assertions let demo: unknown = 'Rice Krispies'; // The above line would throw an error as an unknown variable can // only take values of unknown and any type let demo: unknown = 'The EXTRA c... Add solution -
Java 2021-11-13 20:23:17
time complexity of split java
8 The complexity will depend on the regex that you use to do the splitting. (Yes, the argument you supply to String.split(...) is a regex!) For your example, it will be O(N) where N is the number of characters in the input String. The algorithm of spli... Add solution -
C++ 2021-11-13 08:25:07
heap memory vs string pool
String uses a special memory location to reuse of String objects called String Constant Pool. String objects created without the use of new keyword are stored in the String Constant Pool part of the heap. It doesn't create the same string object if there ... Add solution -
C++ 2021-11-10 03:13:14
appending string in c++
#include<iostream> #include <string> int main() { //"Ever thing inside these double quotes becomes const char array" // std::string namee = "Caleb" +"Hello";//This will give error because adding const char array ... Add solution -
Java 2021-11-09 22:17:07
TreeMap containsKey() method in java
map Integer values to String Keys import java.util.TreeMap; public class TreeMapContainsKeyMethodExample { public static void main(String[] args) { TreeMap<String, Integer> tm = new TreeMap<String, Integer>(); // Mapping Inte... Add solution