Posts

Fatal error: #include <stdio.h> generated after "pip install mysql-python" command -

like many people, having issues getting mysql , python work together. specs are: osx10.9.2 anaconda 1.9.1 python 2.7.2, although 2.5 , 2.6 appear included mysql 5.6.16 i have written python script try import mysqldb, or pymysql mysqldb, neither works. i read many of threads on stack overflow, , result tried $ export cflags=-qunused-arguments $ export cppflags=-qunused-arguments $ pip install mysql-python the results below. fatal error issued, can seen @ bottom of output. downloading/unpacking mysql-python downloading mysql-python-1.2.5.zip (108kb): 108kb downloaded running setup.py (path:/private/var/folders/lx/h7jq_qx92_j0n7plsjmr6wl40000gp/t/pip_build_vincent/mysql-python/setup.py) egg_info package mysql-python installing collected packages: mysql-python running setup.py install mysql-python building '_mysql' extension /usr/bin/clang -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -qunused-arguments -qunused-arguments -dversion_info=(1,2,5,...

html - Unsafe JavaScript attempt and cordova web security -

in mobile application have page iframe. <iframe id="activityframe"></iframe> to show iframe content run next code. var frame = document.getelementbyid('activityframe'); var url = "ourdomen.com"; iframe.setattribute('src', url); all iframe content loaded correctly. user can navigate between pages. on last page inside iframe "ourdomen.example" load other iframe payment form domen "secyrityservice.example". when user click submit button "secyrityservice.example" rederct on "ourdomen.com" iframe by <script type="text/javascript"> <!-- $(function() { document.redirectform.submit(); }); //--> </script> </head> <body> <form name="redirectform" action="ourdomen.example" method="post" target="_parent...

c++ - Overloading operator trouble -

hello i'm trying create program reads in series of infix expressions file until reaches semi-colon or period (a+b.), , output postfix of expression file. i'm having trouble getting overloaded operators work correctly. can give me tips on what's wrong them? std::istream& operator>>(std::istream& in, expression& x) { char y; { in >> y; x.ifix += y; if (y == '.') { x.last = true; } } while (y!= ';' || y!= '.'); x.converttopostfix(); return in; } std::ostream& operator<<(std::ostream& out, const expression& x) { out << x.pfix; return out; } this expression true: while (y != ';' || y != '.'); if y ';' , y can not '.' , second half true. same other way around when y '.' . you want while (y != ';' && y != '.'); or, if want express more human: ...

javascript - how to select select2 using another select2 values -

i have 2 select2 input boxes, requirement if selected 1 select2 box value effect select2 box. my code below: <input class="select2-offscreen itemid_0" type="text" name="itemid" id="itemid[]" style="width:100px; left:297.5px !important; top:863px !important; float:left !important" tabindex="-1" onchange="display();"> <input class="select2-offscreen unitid_0" type="text" name="unitid" id="unitid[]" style="width:100px; left:297.5px !important; top:863px !important; float:left !important" tabindex="-1"> <script> function display(){ $(".unitid_0").select2("val","hr"); } </script> please tell me did mistake? thanks, madhuri you mean value in both boxes should same, right? $(function () { $(".itemid_0").keyup(function () { // on key in first box var value = $(this...

HTML text field input can only accept 1 or 0 as a value in Perl -

may ask, how can html accept text field input 1 or 0 value? can show me? implement html in perl. here example of code: #!/usr/bin/perl #index5.cgi require 'foobar-lib.pl'; ui_print_header(undef, $module_info{'desc'}, "", undef, 1, 1); ui_print_footer("/", $text{'index'}); #print "content-type:text/html\n\n"; print qq~<html> <link rel="stylesheet" type="text/css" href="style.css"> <body> <div id="content"> <div id="bar"> <span><p>data gateaway</p></span> </div> <div id="main-container"> <table border="0" width="100%" height="100%"> <tr> <td colspan="5"> <div id="button"> <form action="index.cgi"> <input type="submit" value="back"> </form> </div> </td> </tr> <t...

web services - Java Rest webservice with bad queryparam -

i have below web service method, @get @produces({ "application/xml", "application/json" }) @path("/service/salesorder/{identifier}/{ordertype}") public response readorder(@pathparam("identifier") string identifier, @pathparam("ordertype") string ordertype); if user calls below correct url, want service work fine, if 1 calls bad url (extra query param), not defined in method, want throw error, how can catch bad urls? correct url : http://myapp.com/service/salesorder/123/shoppingorder bad url : http://myapp.com/service/salesorder/123/shoppingorder&badparam addionial should inject @context method parameter: public response readorder(@pathparam("identifier") string identifier, @pathparam("ordertype") string ordertype, @context httpservletrequest req); and check servlet api httpservletrequest#getparameternames() if...

javascript - Titanium mobileweb font face not working -

we developing apps android, ios , mobile web using titanium. want change font of text , working fine on android, ios, mobile web on emulator. if open file on browser (ie firefox), font not working. there code changing font: "textfield": { height : 40, color : "#000000", returnkeytype : titanium.ui.returnkey_done, backgroundfocusedcolor : "transparent", font: { fontsize : 16, fontfamily : "opensans-regular" } } and when check firebug, shows this: @font-face { font-family: "mobileweb\f ontsopensans-regular"; src: url("mobileweb\f ontsopensans-regular.ttf,mobileweb\f ontsopensans-regular.woff"); } which not gonna work since font-family shows address , not font name. searched on web , see if have solution , cant find one. maybe bug know if guys have workarounds on this. ill appreciate help. thanks! you need set text value above or below "font: {}...