Posts

php - Codeigniter XML-RPC Response Multi Dimensional Array Approach -

i need create xml-rpc server gets cities corresponding ids. response looking weird me because of unnecessary duplicate entries couldnt find better way. array ( [cityid] => array ( [0] => 34 [1] => 35 [2] => 06 ) [cityname] => array ( [0] => istanbul [1] => izmir [2] => ankara ) ) i implemented above response. implementation: $response = array( array( 'cityid' => array(array('34', '35', '06'), 'array'), 'cityname' => array(array('istanbul', 'izmir', 'ankara'), 'array') ), 'struct' ); the problem want take response : array ( ...

actionscript 3 - My var doesn't seem to want to inherit from a custom class -

i'm sorry if ends being noob question. i have var set new object of class. however, keep getting error 1120 whenever test it. know error means it's undefined property. tried changing scope of (to every possible place in main class. namely class, after imports , constructor). the code supposed part of character creator dungeons , dragons 4e. have tried hours find solution i'm not sure. include attributes class if it's help. var humon:attributes = new attributes it's declared part of main class: package { //imports import com.classes.attributes; import flash.text.*; public class main extends movieclip() { private var humon:attributes = new attributes; public function main() { atties.text = (humon.getstr()+", "+humon.getdex()+", "+humon.getcon()+", "+humon.getint()+", "+humon.getwis()+", "+humon.getcha()+"."); var res:int = humon.getstr(); tra...

php - call function through function to search array -

my objective search multidimentional array plot , output information buried there. my code is function searchbyplot($plot, $array) { foreach ($array $key => $val) { if ($val['plot'] === $plot) { return $key; } } return null; } function calculate() { $id = searchbyplot('681', $ma); $code = $ma[$id]['code']; $last = $ma[$id]['h_last']; $plot = $ma[$id]['plot']; if (isset($last)){ echo 'id: '.$id.' code: '.$code.' lastname'.$last.''; } echo "test".$id.""; } calculate(); however when call calculate function there no response though there result in array. when call searchbyplot function directly works fine. $id = searchbyplot('681', $ma); echo $id; however when call calculate function doesn't work @ all, nothing outputted on $id can see test call above. echo $id; can please? many thanks, buster

javascript - Why is Highchart loaded twice in my rails app ? (Uncaught Highcharts error #16) -

i can't make working basic example of highcharts. i got these errors : uncaught highcharts error #16 in app/assets/javascripts/application.js uncaught typeerror: undefined not function in app/assets/javascripts/graphique_repartition_budgetaire highcharts says error 16 because : this error happens second time highcharts or highstock loaded in same page, highcharts namespace defined. keep in mind highcharts.chart constructor , features of highcharts included in highstock, if running chart , stockchart in combination, need load highstock.js file. but can't figure out how can highcharts loaded twice in same page. i'm using rails 3.2.21 i put gemfile : gem 'jquery-rails' gem 'highcharts-rails', '~> 3.0.0' i put app/assets/javascripts/application.js : //= require jquery //= require jquery_ujs //= require_tree . //= require highcharts i put app/views/layouts/application.html.haml : %html %head %title titl...

ios - Provisioning profile use existing certificate doesn't work -

i want use push notifications. what have done far: - generated app id - enabled push notification app id - generated development certificate push notification now want generate provisioning profil. can see generated certificate in member center, can't use generate promising profile. wants me generate new certificate. can't select existing one... do know why? the certificate generated not intended generating provisioning profiles, authenticating push server apple's push notification service (apns). you need regenerate current development provisioning profile pick development push notification entitlement (even may not necessary!). the same applies production push certificates , provisioning profiles.

java - extract language from a web page with Jsoup -

for example have <html lang="en"> ...... web page </html> i want extract string "en" jsoup. i tried selector , attribute without success. org.jsoup.nodes.document htmldoc = jsoup.parse(html); element taglang = htmldoc.select("html").first(); system.out.println(taglang.text()); looks want value of lang attribute . in case should use attr("nameofattribute") like system.out.println(taglang.attr("lang"));

javascript - How to change name of input text, when adding more inputs -

this form <form action="" method="post"> <input type="button" value="addmore" onclick="addrow('datatable')" /> <table id="datatable" class="tftable" border="1"> <tr> <td><label>should auto increment(like (name1, name2, name3 ...))</label> <input type="text" required="required" name="doninid[]" value=""></td> </tr> </table> <input class="submit" type="submit" value="confirm &raquo;" /> </form> this script add more => script.js: function addrow(tableid) { var table = document.getelementbyid(tableid); var rowcount = table.rows.length; if(rowcount < 20){ // limit user creating fields more limits var row = table.insertrow(rowcount); var colcount = table.r...