Posts

.htaccess - htaccess redirect from wrong URL (Laravel) -

i using laravel unfortunately google picking urls wrong. example, page such as: www.domain.co.uk/article/hello-world has been indexed in google www.domain.co.uk/public/index.php/article/hello-world . when visit site, urls seem correct , www.domain.co.uk/article/hello-world url shows page expected, guess google bots using .htaccess , viewing long url instead (i had put public folder comes laravel in public_html) the .htaccess in public_html has: rewriteengine on options +followsymlinks options -indexes rewritecond %{request_filename} !-f rewriterule (.*) /public/$1 [l] and there additional .htaccess in public_html/public folder: options -multiviews rewriteengine on rewritecond %{request_filename} !-f rewriterule ^ index.php [l] does know of solutions issue? i have tried rewrite rules redirect url when public/index.php url having 0 luck. tips appreciated. if forced host include files in document root, surely need 1 .htaccess file in root itself? mo...

Android strings xml file formatting -

hy! working on android app , want format text textview shows text on contact on website, dont know how format in strings.xml file. have tried basic html formatting putting <br> tag new row , <a> tag email adresses , web site, nothing change. how format ? can large strings saved strings.xml ? http://visitsplit.com/#pages?page=409 you can use \n new lines. further, can use html.fromhtml create spanned have basic formatting - bold, italic, links, etc. you need override movement method make links operational: textview.setmovementmethod(linkmovementmethod.getinstance()); textview.setlinksclickable(true);

sql - Extract XML using PLSQL based upon child element value -

i have following xml document stored in clob variable within plsql procedure: <soap:envelope> <soap:body> <ns2:getallissuehistoriesresponse> <return> <eventdate>2013-08-02t11:45:58.013+02:00</eventdate> <eventtext>test</eventtext> <issueeventtype> <id>10</id> <value>replied</value> </issueeventtype> </return> <return>...</return> <return>...</return> </ns2:getallissuehistoriesresponse> </soap:body> </soap:envelope> i trying extract return nodes have , issueeventtype value of 10. i have used following code in attempt achieve p_xml_content clob containing xml: l_xml_parser := '<?xml version="1.0" encoding="utf-8"?><results>'; l_xml_parser := l_xml_parser ||(xmltype(p_xml_content).extract('//return/issueeventtype/[id=10]...

multithreading - Using semaphore , Sync two threads Patient and Assistant -

i asked question in interview prestigious group in company(i cannot tell name) stack question while, generated possible solutions them want make sure solution correct, please comment or fix solution or guide me solution or show if solution has deadlock, starvation etc..., this problem: patients go bio lab work. lab contains nummachines. in lab there supervisor assign 1 machine each patient if there available machines. after patient finishes work, releases machine , waits until 2 patients done. when group has 3 patients formed leave. use semaphores , operations on semaphores, synchronize 2 types of threads: patient , supervisor binary semaphore mutex=1 counting semaphore machine =5 , done =0 patient: p(machine); v(done); p(mutex); waitingpatient++; if(waitingpatient==groupsize){ for(int i=0’i<groupsize;i++){ v(waiting); } waitingpatient=0; p(waiting); v(mutex); } else{ p(waiting); v(mutex); } assistant: while(true){ p(done); v(m...

javascript - echo user agent Casperjs -

so i've set new user agent using: casper.useragent('mozilla/5.0 (macintosh; intel mac os x 10_6_8) applewebkit/537.36(khtml, gecko) chrome/28.0.1500.95 safari/537.36'); but obtain newly modified user agent testing purposes, how 1 print out user agent has been modified using casper.js ? you try: casper.on('remote.message', function(msg) { this.echo(msg); }); casper.evaluate(function() { console.log(window.navigator.useragent); });

php - UrlEncoding giving different results -

javscript function: var s="ì"; var e=encodeuricomponent(s); document.write(e); exspected result: %c3%ac result : %c3%ac php function: $s = "ì"; echo $e = urlencode($s); exspected result: %c3%ac result : %ec what doing wrong? your php file encoded in single-byte encoding, iso-8859-1. when type in non-ascii character, use encoding's representation of character. expecting utf-8 (multi-byte) result. to result, encode php file utf-8 file. usually, ide have option this; in "save as..." dialog. alternatively, if can't or don't want change file's encoding, can do echo $e = urlencode(utf8_encode($s));

ios - Stop activityIndicator in Embedded TableView Cell Upon Return From Detail ViewController -

i have viewcontroller has container view. in container view have tableview contains static cells. each cell has disclosure indicator. created in ib. parent viewcontroller embedded in navigationcontroller. each cell pushes new view controller loads mapview. each map parses , loads .kml file. .kml files huge , take minute (or more) load. i placed activityindicator in accessory view of each cell using following code: - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{ uitableviewcell *cell = [tableview cellforrowatindexpath:indexpath]; uiactivityindicatorview *activityview = [[uiactivityindicatorview alloc]initwithactivityindicatorstyle:uiactivityindicatorviewstylegray]; [activityview startanimating]; [cell setaccessoryview:activityview]; [self.tableview deselectrowatindexpath:[self.tableview indexpathforselectedrow] animated:yes];} this appears work expected. after viewing map touch "back" button provided navigation...