Posts

ios - How do I add an image to the UITableViewHeaderFooterView? -

can me figure out how add , image header view? code tried using doesn't work. below have far. - (void)tableview:(uitableview *)tableview willdisplayheaderview:(uiview *)view forsection:(nsinteger)section { uitableviewheaderfooterview *headerview = (uitableviewheaderfooterview*)view; if (headerview != nil) { headerview.contentview.backgroundcolor = [uicolor greencolor]; uiimageview *imageview = [[uiimageview alloc] initwithframe:cgrectmake(200.0f, 0.0f, 100.0f, 25.0f)]; *imageview.image = [uiimageview = image.png];* //this line doesn't work. [headerview.contentview addsubview:imageview]; uilabel *mainlabel = [[uilabel alloc] initwithframe:cgrectmake(0.0f, 0.0f, 100.0f, 25.0f)]; mainlabel.text = [sectiontitles objectatindex:section]; mainlabel.backgroundcolor = [uicolor redcolor]; [headerview.contentview addsubview:mainlabel]; uilabel *secondlabel = [[uilabel alloc] initwithframe:cgre...

java - Error installing pyjnius, "jni.h" not found. (OS X 10.10.1) -

i have been trying install pyjnius on os x 10.10.1. other dependencies taken care of, haven't been able solve issue of header file "jni.h" not being found. here's happens: $ sudo python setup.py install /system/library/frameworks/python.framework/versions/2.7/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py running build_ext skipping 'jnius/jnius.c' cython extension (up-to-date) building 'jnius' extension cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -os -pipe -fno-common -fno-strict-aliasing -fwrapv -denable_dtrace -dmacosx -dndebug -wall -wstrict-prototypes -wshorten-64-to-32 -dndebug -g -fwrapv -os -wall -wstrict-prototypes -denable_dtrace -arch x86_64 -arch i386 -pipe -i/system/library/frameworks/javavm.framework/versions/a/headers -i/system/library/frameworks/python.framework/versions/2.7/incl...

php - Limiting the number of radio buttons checked by a user after submit in Symfony2 form -

i new symfony2. have created form has 3 sets of radio buttons , submit button. display form, have used formtype. now, have apply condition user can select maximum of 2 sets of radio buttons(and minimum of 0 sets of radio buttons) , not 3 sets of radio buttons. if user selects 3 sets of radio buttons , clicks on submit want throw error message user saying "you can select 2". this formtype "subscriptionstype.php" <?php namespace instituteevents\studentbundle\form\type; use symfony\component\form\abstracttype; use symfony\component\form\formbuilderinterface; class subscriptionstype extends abstracttype { public function buildform(formbuilderinterface $builder, array $options) { $builder ->add('event1', 'choice', array('choices' => array('1' => 'tourism', '2' => 'food party', '3' => 'south korean food', '4' => 'cooking', '5' =>...

sql - Join two select queries horizontally in Postgresql -

i have following 2 queries: query #1: (select pl.c_project_id, pl.c_projectphase_id, pl.c_projecttask_id, pl.m_product_id, pj.name projectname, ph.name phasename, pt.name taskname, pd.name prodname, round(pl.plannedqty, 2) planqty, round(pl.plannedprice, 2) planrate, round(pl.plannedamt, 2) planamt adempiere.c_projectline pl left join adempiere.c_project pj on pl.c_project_id = pj.c_project_id left join adempiere.c_projectphase ph on pl.c_projectphase_id = ph.c_projectphase_id left join adempiere.c_projecttask pt on pl.c_projecttask_id = pt.c_projecttask_id left join adempiere.m_product pd on pl.m_product_id = pd.m_product_id pl.c_project_id = 1000001 , pl.ad_client_id = 1000000 order ph.c_projectphase_id, pt.c_projecttask_id) output is: 11 columns , 16 rows query #2: (select fa.c_project_id, fa.c_projectphase_id, fa.c_projecttask_id, fa.m_product_id, pj.name costprojectname, ph.name costphasename, pt.name costtaskname, pd.name costprodname, ...

javascript - append values to radio button instead of dropdown box after previous dropdown selection -

i have piece of program fetches values database , displays in dropdown box depending on previous dropdown selection. but instead of displaying/appending fetched value on dropdown, want in radio button format. i'm doing it javacsript. have tried couple of codes , searched on net still dont want , still struggling. can please me find out how displayed on radio buttons instead of drop down? many in advance help. below have. on html: <div class="modal-body"> <div id="secondmodelalert"></div> <div id="defaultsmodelcontainer"> <form onsubmit="return false;" class="form-horizontal"> <fieldset> <div id="currentprojectidinputcontainer" class="control-group"> <label class="control-label" for="currentprojectid">project</label> <div id="...

c - FTP Active mode client error in Ubuntu: I won't open a connection to 127.0.1.1 -

i have created ftp active mode client. on os x operating system works great. when have migrated ubuntu, has started fail. problem on os x, when enabling data connection, listening socket listens on wifi router ip. don't know why, on ubuntu listens on 127.0.1.1. because of this, response port commnd: i won't open connection 127.0.1.1 how prioritize hosts had in os x? data connection: else if (strcmp(command, "ls") == 0) { // listening data socket initialization data_socket = listen_to_server(&ip_address); if (data_socket == socket_error) { goto exit; } // ftp commad port request if(request_port(&command_socket, ip_address) == socket_error) { goto exit; } // server response receiving if(receive_packet(&command_socket, packet) == socket_error) { goto exit; } // server response printing ...

asp.net mvc 4 - Why httpGet action method not display the data into view in mvc 4? -

my problem view model,when pass values http action to http post action through view, view method not display values directly showing http post action without display view method why not displaying view? [httpget] public actionresult index() { return view(); } view model public class sample { [key] public int id { get; set; } public string name{ get; set; } } view @using (html.beginform()) { @html.textboxfor(m=>m.name); <input type="submit" value="index"/> } post method [httppost] public actionresult index(string name) { return view(); } i think not using httppost method correctly. should doing way: [httppost] public actionresult index(sample model) { return view(model); }