Posts

php - change array output with changing value -

so have table value $i column counts/labels each row (goes 1 12). i have array add, table column. trying do, have array change value outputting each time $i value changes. this sort of looks coding: <?php $i=1; $myarray= array('one', 'two', 'three', 'etc...') ?> <center> <?php echo'<table width="100%">'; echo '<tr>'; echo '<th></th>'; echo '<th>country</th>'; echo '<th>greeting</th>'; echo '<th>translation</th>'; echo '<th>language</th>'; echo '</tr>'; $number_of_rows = 11; ($row = 0; $row <= $number_of_rows; $row++) { echo '<tr>'; echo '<td >'. $i++ . '</td>'; echo '<td >'. “blue” . '</td>'; echo '<td >...

junit - Is it possible to have a main method with a @Before and @Test method in the same class? Java -

this question has answer here: how sequentially execute 2 java classes via mvn command 1 answer i want pass commandline arguments java class junit test annotations, possible? example: @before public void before(string a, string b) { // processing } @test public void test() { } public static void main(string[] args) { if (args[0] != null) default_content_dir = args[0]; if (args[1] != null) default_fonts_dir = args[1]; if (args[2] != null) formmldir = args[2]; before(default_content_dir, default_fonts_dir); } is possible? possible? yes. want? not. public class customemain { public static void main(string [] args) { customsetup(args); junitcore.main(new string [] {"sometest"}); } } the problem no 1 invokes junit themselves. use ant, maven, eclipse, or other build tool. if case there cu...

ios - Localising a UILabel with attributed string from a Storyboard -

i have uilabel text set "attributed" in storyboard. when generate main.strings file translating different language text label not appear. i tried add manually entry main.strings file copying object id. tried setting "text" property , "attributedtext" property when run app translated string not used. so, how localise uilabel set "attributed" on storyboard? i ended solving combination of storyboard , code, using this answer reference. to start with, attributed string used on storyboard applied 1.5 line spacing whole string, easier set text on code preserving storyboard's label formatting. the storyboard contains uilabel text property set attributed , 1.5 line height multiple. on view controller code have setupui method , outlet uilabel. @interface myclass () @property (weak, nonatomic) iboutlet uilabel *alabel; @end @implementation myclass - (void)setupui { nsmutableattributedstring *attributedstring = [[nsmutable...

indexing - Oracle:How to check index status? -

i create index createdate_idx on field createdate , make query: select * tablename createdate>=to_date('2016-02-29','yyyy-mm-dd'); but not sure whether index createdate_idx has been used or not. how can make confirm? explain plan show index used , other information. for example: explain plan select * tablename createdate>=to_date('2016-02-29','yyyy-mm-dd'); select * table(dbms_xplan.display); plan hash value: 3955337982 ------------------------------------------------------------------------------- | id | operation | name | rows | bytes | cost (%cpu)| time | ------------------------------------------------------------------------------- | 0 | select statement | | 1 | 9 | 2 (0)| 00:00:01 | |* 1 | table access full| tablename | 1 | 9 | 2 (0)| 00:00:01 | ------------------------------------------------------------------------------- predicate information (ide...

javascript - jQuery multiselect is not a function -

i'm new sort of web related stuff have been working away few weeks on web project @ work. today though hit problem couldn't solve. have been using multiselect plugin, http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ , while without issue. today tried include datatables plugin ( https://www.datatables.net/ ) after doing multiselect function no longer available. attached simple example showing minimal example of when things break down when plugin included. shown, code work , when run show dropdown box. when uncommented line included , datatable plugin added, console in chrome gives error: uncaught typeerror: $(...).multiselect not function(anonymous function) @ test.php:20i @ datatables.min.js:14j.firewith @ datatables.min.js:14n.extend.ready @ datatables.min.js:14k @ datatables.min.js:14 from seems plugins in conflict somehow, i'm not quite sure how resolve this. <link rel="stylesheet" type="text/css" href="../...

php - How do I insert into database with codeigniter without it putting the single quotes? -

i'm making feature in app users can select multiple db items , change department belong @ once. have in codeigniter model currently: function multimove($dept, $jobstring) { $sql = "update jobs set department = ? id in(?)"; $this->db->query($sql, array($jobstring, $dept)); echo $this->db->last_query(); } the function takes in 2 values department number , id's of selected jobs. i'm trying achieve sql function: update jobs set department = 3 id in(5,6,48); but codeigniter generates this: update jobs set department = '3' id in('5,6,48'); it puts single quotes on values , creates errors. there way around this? calling model $this->load->model('model_jobs'); $this->model_jobs->multimove(3,'2,3,8'); model function multimove($dept,$jobstring) { $ids = explode(",",$jobstring); $upd_data = array('department' => $dept ); $this->db->...

reverse engineering - How do you debug libc in OSX? -

i expect able statically link against build of libc debug symbols, run program through lldb. otool -l <my binary> makes dynamically linked library (dll) is: /usr/lib/libsystem.b.dylib (compatibility version 1.0.0, current version 1226.10.1) which guess libc dll (though nm doesn't list i'd expect in libc). maybe kind of stub loader. in /usr/lib/ seems apple not supply debug build of libsystem. how debug libc on osx (10.11.3)? possible duplicate of: on mac os x, how can debug build of system/libc source level debugging? i'm having hard time following question, there points made think cover you're asking: otool -l show dylibs linking against. /usr/lib/libsystem.b.dylib umbrella library re-exports multiple dylibs, including libc (/usr/lib/system/libsystem_c.dylib). if want see symbols part of system's c runtime, want use nm on dylib, not libsystem. if statically linking in own libc, won't show in 'otool -l' because ...