Appearance
question:Create a regex pattern to match all URLs in a text.
answer:# Create a regex pattern to match all URLs in a text pattern = r"((http|ftp|https)://)?[w-_]+(.[w-_]+)+([w-.,@?^=%&:/~+#]*[w-@?^=%&/~+#])?"
question:Write an expression in PHP to get the length of an array called 'data'.
answer:// Write an expression in PHP to get the length of an array called 'data' length = count(data);
question:Create a JavaScript function to retrieve a value from an object with a given key.
answer:// Create a JavaScript function to retrieve a value from an object with a given key function getValue(obj, key) { return obj[key]; }
question:Create a query in MongoDB to update the age of a document with the name 'John'.
answer:# Create a query in MongoDB to update the age of a document with the name 'John' db.users.updateOne( { name: 'John' }, { set: { age: 18 } } )