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 merge_posts(list_of_posts: List[List[Post]]) -> List[Post] | |
function merge_posts(list_of_posts) { | |
let posts = []; | |
list_of_posts.map(val => { | |
posts.concat(val); | |
}); | |
//only uniques | |
posts = posts.filter((val, index) => posts.indexOf(val) === index); |
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
// user_id -> int ; post_ids -> [] | |
function get_posts(user_id, post_ids) { | |
//usually we will just use an ORM here | |
let post_ids_str = "("; | |
//serialize the post_ids for the query | |
post_ids.map(val => { | |
post_ids_str += `${val.toString()}, `; | |
}) | |
post_ids_str += ")"; | |
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
# Set the name and the supported language of the project | |
PROJECT(hello-world C) | |
# Set the minimum version of cmake required to build this project | |
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) | |
# Use the package PkgConfig to detect GTK+ headers/library files | |
FIND_PACKAGE(PkgConfig REQUIRED) | |
PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0) | |
# Setup CMake to use GTK+, tell the compiler where to look for headers |
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
# Begin build properties | |
# EOL UNIX | |
# 0.0 644 /system/build.prop | |
# | |
# Note: Some changes are Device and OS/ROM independent! | |
# Note2: Some settings are between | |
# performance and security <- I prefer last one | |
# | |
ro.build.id= ----- | |
ro.build.display.id= ----- |