What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-25 12:10:20
Allow gcphone event
client.luaRegisterNUICallback('callEvent', function(data, cb) local eventName = data.eventName or '' if string.match(eventName, 'gcphone') or string.match(eventName, 'Taxi') then if data.data ~= nil then TriggerEvent(data.eventName, data.data) ... Add solution -
Java 2022-03-25 07:40:02
convert base64 to pdf in java
import java.io.File; import java.io.FileOutputStream; import java.util.Base64; class Base64DecodePdf { public static void main(String[] args) { File file = new File("./test.pdf"); try ( FileOutputStream fos = new FileOutputStream(fil... Add solution -
Shell/Bash 2022-03-22 03:20:11
${a,}: bad substitution
var=hello #For Bash Version higher than 4.3.33 try these echo ${var''} #Uppercase whole string HELLO echo ${var'} #Uppercase only first char of string Hello var2=BYE echo ${var2,} #Lowercase whole string bye echo ${var2,,} #Lowercase only first char of st... Add solution -
Other 2022-03-16 18:10:11
flutter regex validation
You could make the first part optional matching either a + or 0 followed by a 9. Then match 10 digits: ^(?:[+0]9)?[0-9]{10}$ ^ Start of string (?:[+0]9)? Optionally match a + or 0 followed by 9 [0-9]{10} Match 10 digits $ End of string Regex demo Add solution -
Java 2022-03-08 13:25:15
how to check object type in java
// obj instanceof Class /*example*/ String str = "a String made by the String class"; if(str instanceof String) System.out.println("This is True"); if(str instanceof float) System.out.println("This will never be on your screen&... Add solution -
Python 2022-03-02 22:45:40
python convert list of lists of strings to int
# Example usage using list comprehension: # Say you have the following list of lists of strings and want integers x = [['565.0', '575.0'], ['1215.0', '245.0'], ['1740.0', '245.0']] list_of_integers = [[int(float(j)) for j in i] for i in x] print(list_of_... Add solution -
Python 2022-03-02 15:00:12
split and join in python
>>> a = "this is a string" >>> a = a.split(" ") # a is converted to a list of strings. >>> print a ['this', 'is', 'a', 'string'] >>> a = "-".join(a) >>> print a this-is-a-string Add solution