Posts

php - How to get value from multidimensional array value -

array ( [updatecategories] => array ( [products] => array ( [0] => array ( [cat_id] => 3 [position] => 2 [product_id] => 8 ) [1] => array ( [cat_id] => 4 [position] => 11 [product_id] => 8 ) [2] => array ( [cat_id] => 3 [position] => 4 [product_id] => 39 ) [3] => array ( [cat_id] => 4 [position] => 9 [product_id]...

Record Sound in Android using ActionScript 3 -

Image
i build application record sound in desktop using actionscript 3 , convert application andriod application there problem sampledataevent.sample_data event doesn't receive data record here code : private var _microphone:microphone; private var _buffer:bytearray = new bytearray(); private var _difference:uint; public function record():void { if ( _microphone == null ) _microphone = microphone.getmicrophone(); _difference = gettimer(); _microphone.setsilencelevel(_silencelevel, _timeout); _microphone.gain = _gain; _microphone.rate = _rate; _buffer.length = 0; _microphone.addeventlistener(sampledataevent.sample_data, onsampledata); _microphone.addeventlistener(statusevent.status, onstatus); } private function onsampledata(event:sampledataevent):void { _recordingevent.time = gettimer() - _difference; dispatchevent( _recordingevent ); var butedata:number; while(event.data.bytesavailable > 0) { butedata = ev...

sql - SELECT DISTINC LOWER : SUBSTR -

i'm having difficulties resolve request: select distinct lower (customername), substr(customer.postalcode, 1, 3) +" "+ substr(customer.postalcode,4,6)as'postal' customer order customer.cuname i'm having message : expected lexical element not found this 1 works perfectly. select distinct customer.name, customer.postalcode as'postal' customer order customer.cuname is can help? select distinct lower (customername), substr(customer.postalcode, 1, 3) + ' ' + substr(customer.postalcode, 4, 6) 'postal' customer order customer.cuname

imap - OAuth 2 SASL string error -

i have generated following sasl string oauth 2: user=designadmin@npmdesign.mygbiz.com^aauth=bearer ya29.ahes6zttyou0nr0vaybrvkznchjpuzepr4hk3w3dxcxfq88^a^a then encoded , sent encoded string this: msb authenticate xoauth2 encoded string but error response as: {"status":"400","schemes":"bearer","scope":" https://mail.google.com/ "} what error mean , how can correct it? i figured out. in case, gmail scope(" https://mail.google.com/ ") missing, token generation process. works fine now.

Bash - replace string inside all files in directory -

i have 31 .ctl files in directory, looks this: load data characterset al32utf8 infile '../dane/kontakty_biura_wyborcze.csv' "str '\n'" append table odi_puw_osoby2 fields terminated ';' optionally enclosed '"' , '"' trailing nullcols ( lp char(4000), wojewodztwo char(4000), powiat char(4000), gmina char(4000), nazwa_instytucji char(4000), kod char(4000), miejscowosc char(4000), adres char(4000), nazwisko_i_imie char(4000), funkcja char(4000), tel_sluzb_stacjon_1 char(4000), tel_sluzb_stacjon_2 char(4000), tel_sluzb_stacjon_3 char(4000), tel_sluzb_kom_1 char(4000), tel_sluzb_kom_2 char(4000), fax_sluzb_1 char(4000), fax_sluzb_2 char(4000), email_sluzb_1 char(4000), email_sluzb_2 c...

mysql - MP3 conversion using Cron? -

i have created php script moves wav files user has uploaded via ftp temporary directory. having problems running lame.exe when accessed via exec have decided run locally on vps , store source file names , destination names in table (for example called cronmp3). i stuck go next. have queue files ready in mysql table, not sure how call them , process them, or put in cron file moving files not problem after conversion, able that. to honest, mysql isn't great queues. recommend adding redis stack. in php using predis: // when file uploaded // add whatever mysql // $mysqli->... // connect redis $redis = new predis\client(); // add $file encodequeue $redis->call('lpush', 'encodequeue', $file); then in cronjob: #!/bin/bash file=`redis-cli lpop encodequeue` lame $file -options > output... whatever

java - Setting session in JSP and getting session in servlet -

i setting session attribute in jsp code below , submitting http form servlet: session.setattribute("qnainfo", qnainfo); system.out.println("session.getattribute" + session.getattribute("qnainfo")); i trying session attribute in servlet code below: httpsession session = request.getsession(true); authqnainfo storedqnainfo = (authqnainfo) session.getattribute("qnainfo"); in servlet null on ie. in chrome value. please resolve this. in browsers ,the session.getattribute("aaaa") working , try ones