Posts

Is there any free C++ and/or C# compiler that runs on an Android-enabled Tablet PC? -

Is there any free C++ and/or C# compiler that runs on an Android-enabled Tablet PC? - the question not writing c++ android, it's writing c++ on android. i have android-enabled tablet pc , need both c++ , c# programming. is there free c++ and/or c# compiler runs on android-enabled tablet pc? i not want develop android apps on pc. i want programming on ide runs on android. it exists in form, @ least. have managed find application compiles c , delphi without dependencies (i assume comes gcc , freepascal.) can't find @ moment, maintain searching. in meantime, touchqode @ to the lowest degree give scripting support. c#, you'll need mono. the runtime mono available on android , see absolutely no reason there can't compiler on android well. edit: commonwares mentions, there no freely available mono port android, none of applies. pity. c# android c++ ide

c++ - Statfs return strange values -

c++ - Statfs return strange values - i'm trying disk space in byte en used space in byte statfs(). made little function unusual values. (i'm working on ubuntu 32bit system) here code: bool checkdiskspace( const clstring &devpath, ulonglong &disksize, ulonglong &totalfreebytes ) { bool retval = false; struct statfs fs; if( ( statfs( devpath.c_str(), &fs ) ) < 0 ) { printf( "failed stat %s: %s\n", devpath.c_str() ,strerror( errno ) ); homecoming false; } else { disksize = fs.f_blocks * fs.f_bsize; totalfreebytes = fs.f_bfree * fs.f_bsize; retval = true; } homecoming retval; } int main() { ulonglong disksize, totalfreebytes; checkdiskspace( "/dev/sda5", disksize, totalfreebytes ); printf( "disk size: %llu byte\n", disksize ); printf( "free size: %llu byte\n", totalfreebytes ); } and get: disk size: 1798447104 byte free size: 1798443008 byte i not understand result because...

c++ - Retrieving pointers from a vector -

c++ - Retrieving pointers from a vector - i've been working on project uses graph-based api. have need of beingness able traverse graph , force pointers existing nodes list (in case, std::vector). of course, 1 time i'm done traversing graph, want take pointers , assign them fellow member variables of class. problem, of course, trying re-create pointers vector class variables. issue results having store nodes in vector cast pointers base of operations class, cast them actual type when passed class fellow member variables. roughly speaking, want is: std::vector<smart_pointer<node_base> > nodes; nodes.push_back( node ); //"node" smart pointer of derived type node_base ( ... ) { myclass::member_node_ref = static_cast<node_type>( ( *vector_node_iterator )); //member_node_ref smart pointer of derived node type //vector_node_iterator iterator of vector<node_base> object } all works fine until re-create construct...

browser - Is server-side useragent detection bad? -

browser - Is server-side useragent detection bad? - clientside useragent detection is known bad, bad react differently based on incoming useragent in http request an illustration sniffing types of browsers out of img requests , sending smaller or larger images based on whether incoming useragent mobile or desktop. i think depends motivation is. example, in mobile web sector attempting provide user looks sensible on platform. why concerned user-agent user reporting, when purely own benefit? if go effort of tricking different user-agent, person suffers. main problem of course of study false positives; it's not exclusively reliable. i follow argument should not rely on such, mobile developers under attack generic broad statements this. yes there alternatives, across every browser can imagine, info can useful @ point certainty begins degrade. what don't ever plain-text header utilize facilitate access control. user agent detection considered bad when there...

html - Resizing iframe between two static-width panels - using jQuery -

html - Resizing iframe between two static-width panels - using jQuery - i have setup 2 side panels, 1 float:left , 1 float:right, , iframe in between them. want 2 side panels have width of 150px, , iframe fill rest of page. attempting using jquery create functions alter iframe width dynamically when window resized, yet not working. here have far: <body> ... <script src="jquery.js"> function setframesize() { $("#ifrm").width($(window).width() - $("#leftpanel").width() - $("#rightpanel").width()); } $(window).resize(function() { setframesize(); }); $(document).ready(function() { setframesize(); }); </script> ... </body> can tell me why not working? thanks! it's much improve css: http://jsfiddle.net/7pbjb/ html: <div id="left"></div> <div id="center"></div> <div id="right"></...

sql server 2008 - Compare two dates with existing date and Get values from Table -

sql server 2008 - Compare two dates with existing date and Get values from Table - i'm using sql2008 create sps. in procedure want compare 3 date values , between 2 dates info table. i'm getting 2 dates ui @date1 , @date2 , have date3 column in table based on @date1 , @date2 , date3 want select info table. how can this? i think want this: select col1, col2, col3, ... table date3 between @date1 , @date2 this rows table date3 date >= @date1 , <= @date2 . sql-server-2008

python - QDialog not opening from Main window (pyQt) -

python - QDialog not opening from Main window (pyQt) - i'm trying launch dialog clicking button in main window: here's (qtdesigner generated) code modified test .. i've set showdial function show dial when button clicked. doesn't work : from pyqt4 import qtcore, qtgui try: _fromutf8 = qtcore.qstring.fromutf8 except attributeerror: _fromutf8 = lambda s: s class ui_dialog(object): def setupui(self, dialog): dialog.setobjectname(_fromutf8("dialog")) dialog.setwindowmodality(qtcore.qt.windowmodal) dialog.resize(400, 300) dialog.setwindowtitle(qtgui.qapplication.translate("dialog", "dialog", none, qtgui.qapplication.unicodeutf8)) self.retranslateui(dialog) qtcore.qmetaobject.connectslotsbyname(dialog) def retranslateui(self, dialog): pass class ui_mainwindow(object): def setupui(self, mainwindow): mainwindow.setobjectname(_fromutf8("mainwind...