i'm trying tutorial on glib uses giochannel. i'm using ubuntu 11.04 (natty narwhal) glib-2.30.2 (gtk+-3.2.3) , c code. the code here: http://library.developer.nokia.com/index.jsp?topic=/guid-e35887bb-7e58-438c-aa27-97b2cde7e069/guid-817c43e8-9169-4750-818b-b431d138d71a.html the program runs contents of source test file not copied destination file. i'm not receiving error or warning messages. program nothing. what's wrong here? works now, changed line: g_print("usage:<cp source> <destination>\n"); to: g_print("usage: %s <source> <destination>\n", argv[0]); then compiled using: gcc -wall $(pkg-config --cflags gio-2.0) -c io.c gcc -wall $(pkg-config --libs gio-20) -o io io.o run program using: ./io io.c new_io.c
while can encode , decode user data part of sms message when udh not present, i'm having trouble doing when udh is present (in case, concatenated sms). when decode or encode user data, need prepend udh text before doing so? this article provides encoding routine sample compensates udh padding bits (which still don't understand) doesn't give example of data being passed routine don't have clear use case (and not find decoding sample on site): http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/ . so far, have been able results if prepend udh user data before decoding it, suspect coincidence. as example (using values https://en.wikipedia.org/wiki/concatenated_sms ): udh := '050003000302'; encoded_user_data_part := 'd06536fb0dbabfe56c32'; // padding, evidently decodeduserdata := decode7bit(udh + encoded_user_data_part); writeln(decodeduserdata); output: "ß@ø¿Æ @hello world" encodeduserdata := encode7bit(decodeduse...
i have simple python curses code creates subwindow. however, in process of running function window.subwin() fails message: here test case: import curses if __name__ == '__main__': curses.initscr() window = curses.newwin(15, 40, 7, 20) window.box() window.refresh() subwindow = window.subwin(5, 10, 2, 2) subwindow.box() subwindow.refresh() subwindow.getkey() curses.endwin() produces following output: traceback (most recent call last): file "c.py", line 12, in <module> subwindow = window.subwin(5, 10, 2, 2) _curses.error: curses function returned null is there way more descriptive message? the error happens when not possible create sub-window (illegal operation). can happen because asking paint sub-window outside of window. the method subwin receives absolute coordinates (with respect screen, not parent window). fail if subwin coordinates outside of window . reason fail: width or height overfl...
Comments
Post a Comment