我正在使用psycopg2來執行psql查詢。 cur.execute("SELECT DISTINCT name FROM product")
result = cur.fetchall()
print(result)
[('product1',), ('product2',), ('product3',), ('product4',)]
我需要重新格式化這個數組來創建一個API端點
我想編譯gcc-code-assist具有代碼完成功能,以便與emacs一起使用它。但是同時compilinng checking for exception model to use... configure: error: unable to detect exception model
make[1]: *** [configure-target-libstdc++-v3] Error 1
考慮下面的代碼: $ cat o.c
#include <stdio.h>
#include <limits.h>
int absolute(int i) {
int j = i < 0 ? -i : i;
if (j<0) /* This is line 6 */
return 0;
return j;
}
int main() {