string
Getting substring of a token in for loop?
Of course that set x=%%g and a substring extraction of x should work, but be aware that if the substring is taken inside a FOR loop, it must be done with ! instead of % (Delayed Expansion): setlocal EnableDelayedExpansion for /d %%g in (%windir%\Assembly\gac_msil\*policy*A.D*) do ( set x=%%g echo !x:~29! )
How to read a file from classpath without external dependencies?
val text = io.Source.fromInputStream(getClass.getResourceAsStream(“file.xml”)).mkString If you want to ensure that the file is closed: val source = io.Source.fromInputStream(getClass.getResourceAsStream(“file.xml”)) val text = try source.mkString finally source.close()
Access String value in enum without using rawValue
While I didn’t find a way to do this using the desired syntax with enums, this is possible using structs. struct DatabaseKeys { struct User { static let identifier = “User” static let Username = “username” } } To use: myUser[DatabaseKeys.User.Username] = “Johnny” Apple uses structs like this for storyboard and row type identifiers in … Read more
Shell Script : How to check if variable is null or no
Try following, you should change from -z to -n as follows and add $ to your variable too. if [[ -n “$list_Data” ]] then echo “not Empty” else echo “empty” fi Explanation: From man test page as follows(It checks if a variable is having any value or not. If it has any value then condition … Read more
UTF8 vs. UTF16 vs. char* vs. what? Someone explain this mess to me!
Check out Joel Spolsky’s The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) EDIT 20140523: Also, watch Characters, Symbols and the Unicode Miracle by Tom Scott on YouTube – it’s just under ten minutes, and a wonderful explanation of the brilliant ‘hack’ that is UTF-8
What are Pascal Strings?
Pascal strings were made popular by one specific, but huge influential Pascal implementation, named UCSD. So UCSD Strings is a better term. This is the same implementation that made bytecode interpreters popular. In general it is not one specific type, but the basic principle of having the size prefixed to the character data. This makes … Read more
How to set multiple values with helm?
According to https://github.com/kubernetes/helm/issues/1987#issuecomment-280497496, you set multiple values using curly braces, for example: –set foo={a,b,c} So, in your case it would be like this –set aws.subnets={subnet-123456,subnet-654321}