This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def unique_names(names1, names2): | |
# rubah ke set, dan jadi unique values | |
first_set = set(names1) | |
second_set = set(names2) | |
second_only = second_set - first_set # yang cuma ada di list kedua | |
combined = names1 + list(second_only) # gabung lagi sama yg pertama | |
unique_list = list(set(combined)) # pastiin unique buat edge cases di tiap list ada duplikat | |
return unique_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name FROM employees | |
WHERE id NOT IN(SELECT managerId FROM employees WHERE managerId IS NOT NULL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Modify the parts you need to get it working. | |
*/ | |
var should = require('should'); | |
var request = require('../node_modules/request'); | |
var io = require('socket.io-client'); | |
var serverUrl = 'http://localhost'; |
OlderNewer