Posts

Android - How the state of views are preserved during Fragment Transforamtion -

Image
this confuses me lot. i had 2 fragments, , use fragmenttransaction.replace() swap 2 fragments. state of input controls radiogroup , checkbox preserved when switch other fragments , switch again. . i set break point on oncreateview() of fragment, , every swap seems trigger method , new views created each time. savedinstancebundle null well. since new views created, how state of old views? public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view v = inflater.inflate(r.layout.fragment_fieldsetup_marking, container, false); // ... return v; } this effect fine app, want know how implemented. where states stored? where android sdk code restore (i can not find in class fragmenttransection).

html - Tumblr Theme - Text from custom pages not showing up? -

i'm adapting existing tumblr theme , having few problems. when user creates custom page , uses standard layout text put in doesn't show anywhere on page. i've trawled through docs , tutorials try , find out how text custom pages rendered there doesn't appear information on topic. can find few hacky ways displaying on custom page, can't figure out how actual text or title user enters. ideas?

php - route codeigniter not working -

i have problem routes file in codeigniter. on wamp, routes run correctly. but, on server (shared hosting), routes doesn't run. my homepage in fr folder. controller index. default controller 'fr/index'. $route['default_controller'] = 'fr/index'; $route['404_override'] = ''; when write www.domainname.tld, "file not found." without css style. in source code have 1 file not found. 2 while when write www.domainname.tld/aaaa (404 error), have 404 error : <!doctype html> <html lang="en"> <head> <title>404 page not found</title> <style type="text/css"> ::selection{ background-color: #e13300; color: white; } ::moz-selection{ background-color: #e13300; color: white; } ::webkit-selection{ background-color: #e13300; color: white; } body { background-color: #fff; margin: 40px; font: 13px/20px normal helvetica, arial, sans-serif; color: #4f5155; } { c...

asp.net mvc - Secure a single action with Forms Authentication & Basic Authentication simultaneously -

my mvc application secured using forms authentication . have global filter applies authorizeattribute . i have controller called development action called report . can access fine authenticating in normal way , going http://localhost:8080/development/report . if not authenticated redirects me forms authentication login. i trying embed page ios app user can view information without having manually authenticate themselves. confuse things ios app uses different authentication system, holds device id , unique token mvc app store. what trying make report action available both via forms authentication , ios app using basic authentication username device id , password token . it's important when authenticated using method user can access report action. what's best way implement whilst keeping secure? i thinking of marking report action allowanonymous attribute , creating custom authentication action. best way? authentication strategies that: strategies. they...

php - Correctly Passing data from Controller to View CodeIgniter -

this question may asked numerous times facing difficulty in doing so. var_dump($lex_post_data); works fine on controller my controller code try{ // need manage functionality initialized. $manage_mode = false; $appointment = array(); $provider = array(); $customer = array(); $lex_post_data = $this->input->post('lexname'); var_dump($lex_post_data); // load book appointment view. $view = array ( 'available_services' => $available_services, 'available_providers' => $available_providers, 'company_name' => $company_name, 'manage_mode' => $manage_mode, 'appointment_data' => $appointment, 'provider_data' => $provider, ...

Javascript Recursion returning undefined -

i'm struggling in recursive javascript function find specific subdirectory. code: function navigatetoparent() { var parentfullpath = parentdirectory(); // gets full path string if (parentfullpath != null) { var parent = getdirectorybyname(parentfullpath, rootdirectory); // set parent directory object current 1 currentdirectory(parent); } } function getdirectorybyname(fullname, mydirectory) { if (mydirectory.fullname == fullname) { return mydirectory; } else { var subs = mydirectory.subdirectories; (i = 0; < subs.length; i++) { return getdirectorybyname(fullname,subs[i]); } } } every directory object has properties fullname (string), subdirectories (array of directories) , files (array of files). aim correct directory object, it's fullname matching. i know, have break loop in way, don't know how exactly. after overthinking logic came solution (seems work): fun...

css - Locating an element under div -

<div class="form-item"> <label class="form-item-label">mailing account:</label> <div class="form-element"> <div class="form-field-wrap> <input class="form-text x-form-field x-combo-noedit"> </input> i trying locate element <input class="form-text x-form-field x-combo-noedit"> comes under <label class="form-item-label">mailing account:</label> . first element should matched on text "mailing account:" , second element on of these classes "form-text x-form-field x-combo-noedit". can suggest logic using using xpath or cssselector please? let me see if understand correctly, want find element classes 'form-text' 'x-form-field' , 'x-combo-noedit', if containing div sibling of label text "mailing account" way using xpath: webelement firstelement = driver.findelement(...