Posts

java - Replacing Main Fragment from its Child Fragment -

enter image description here i'm trying replace mainfragment other fragment childfragment of mainfragment . using part of code: android.support.v4.app.fragmentmanager fragmentmanager = getfragmentmanager(); fragment fragment = null; fragment = mainfragment2.class.newinstance(); fragmentmanager.begintransaction().replace(r.id.flcontent, fragment).commit(); fragmentmanager.executependingtransactions(); problem is, mainfragment get's destroyed , replacing successful, problem child of mainfragment never gets destroyed , child methods(destroy, pause, stop..) never called(i need methods). remain in memory , when getting between activities in app onresume() method of child fragment gets called. strange. i'm doing wrong here? create interface : interface mainnavigaton { void replacefragment(); } on main activity class activity exteds... implements mainnavigation...

javascript - bootstrap carousel not displaying images -

my carousel not displaying images .i have 3 images stored in folder name images.i using bootstrap 4 ,let me know wrong.i wanted know if suppose insert images below 900*500 resolution. 1-ronald.jpg of 634 * 424 then 2-messi.jpg of 594 *432 , last 3-pogba.jpg of 620 * 348 resolution <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxazxuh4hwsyylfb+j125mxis6mr5fohampbg064zb+afewh94ndvacbm8qnd" crossorigin="anonymous"> <style type="text/css"> .carousel-inner > .carousel-item > img { padding-top:35px; margin: 0 auto; border-radius: 10px 10px 10px 10px; max-height: 500px; width: 750px; } .carousel-control.left, .carousel-control.right { background-image: none; } #carousel { margin-bottom: 50px; } </style> <div id="carousel-example" c...

selenium - URL not typing in firefox -

i facing problem when executing selenium in eclipse. i using eclipse luna, mozilla firefox 41 , selenium 2.48.2. when try run below code, url not typing in firefox. import org.openqa.selenium.webdriver; import org.openqa.selenium.firefox.firefoxdriver; public class first { public static void main(string args[]) { webdriver driver = new firefoxdriver(); driver.get("http://www.google.com"); } }

reporting services - SSRS Include a sub report into a main report -

i have main report , sub report have common id between them , different data sets . steps used not able see preview of report 1) drag sub report main report.right click on sub report properties , select sub report , in parameters giving parameter used sub report on left side , value main report data set, page keeps on loading , not lead anything can tell me how solve

python - List of lists changes reflected across sublists unexpectedly -

i needed create list of lists in python, typed following: mylist = [[1] * 4] * 3 the list looked this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] then changed 1 of innermost values: mylist[0][0] = 5 now list looks this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] which not wanted or expected. can please explain what's going on, , how around it? when write [x]*3 get, essentially, list [x, x, x] . is, list 3 references same x . when modify single x visible via 3 references it. to fix it, need make sure create new list @ each position. 1 way is [[1]*4 n in range(3)] which reevaluate [1]*4 each time instead of evaluating once , making 3 references 1 list. you might wonder why * can't make independent objects way list comprehension does. that's because multiplication operator * operates on objects, without seeing expressions. when use * multiply [[1] * 4] 3, * sees 1-element list [[1] * 4] evaluates to, not [[1] * 4 express...

php - dynamically loading javascript fails, but innerHTML does -

i've wrote script in javascript file , innerhtml refreshes time time setinterval(activeload,1000); function activeload() { activediv.innerhtml=""; scriptsrc.src="http://localhost/mypro/pro/activeuser.php"; for(i=0;i<=activeuser.length;i++) { if(activeuser[i]!=null) activediv.innerhtml+="<p onclick='dial(' " + activeuser[i] +" ' )'> " + activeuser[i] +"</p><br>"; } scriptsrc.src=''; } in above script, innerhtml modifying, src attribute of script not changing... js file loaded is <script src="http://localhost/mypro/pro/activeuser.php" id="scriptsrc" type="application/javascript"></script> this php file refreshes every 5 secs , accurate in information. need in loading javascript perfectly although it's not clear me want array comes activeuser.php , seems ajax best bet bring in ...

Java IF statements not working properly -

there problem if statements. error shows problem me figure out what's wrong ? main task motor insurance company has 4 categories of insurance based on age , gender of applicant. this code : string gender, age; char group; int genderint, ageint; gender = joptionpane.showinputdialog("please specify gender(1 male, 0 female)"); age = joptionpane.showinputdialog("please enter age"); genderint = integer.parseint(gender); ageint = integer.parseint(age); if (gender = 0 || 1 && age = > 18 && < 26) { group = "category a"; } else if (gender = 0 && age = > 27 && < 60) { group = "category b"; } else if (gender = 1 && age = > 27 && < 60) { group = "category c"; } else if (gender = 0 || 1 && age = > 60) { group = "category d"; } else if (gender = 0 || 1 && age = < 18) { joptionpane.showmessagedialog(null, "sorry, you...