Posts

php - Unable to show 4 products in row in subcategory/shop page woocommerce -

i'm unable show 4 products in row, put filter in themes/functions.php . code below: function loop_columns(){ return 4; } add_filter('loop_shop_columns', 'loop_columns',999); when return 3, working fine, when put 4 here, shows grid this: product | ______________________________________ product | product | product | product ______________________________________ product | product | product | product ______________________________________ product | product | product | product note: why product display on top? please me. live link of issue http://csjs.com/product-category/bhai-guriqbal-singh-ji-books/ more detail : 4 products in row, after adding filter 4 columns in functions.php, problem occur. if go direct shop page fine, if open category wise products not showing well, because show sub-categories of parent on shop page. note: if reduce width upper 3 columns, single product in row shift on above row. requirement is, 1 row show sub categories ,...

android - Show ProgressBar in an AppWidget that updates every second -

i've been researching on topic before implementing it. thing is, mine music player app i'm making widget, control music playback. wanted put seekbar in widget that's not supported. progressbar supported there hardly widgets use one. i'm skeptical of how using progressbar effect user's phone's performance (in terms of battery life , memory usage). since progressbar meant display current position of music playing, have updated every second. read here progress bar in appwidget playback service updating widget's progressbar every second bad idea. post more 4 years old. couldn't find newer. question is, still bad idea use progressbar , updates every second, in app widget? or have latest android updates brought in new ways efficiently? if yes, how go it? any guidance helpful. question is, still bad idea use progressbar, updates every second, in app widget? in general, bad idea update app widget every second, regardless of whe...

javascript - How to get the height and width of window in bootstrap -

in bootstrap have fixed top nav bar , fixed bottom nav bar. want show large image in background between space of 2 nav bars , want cover width of window. how can dynamically height between navbars , width of window? window size may change depending on device.so need dynamic $(window).resize(function() { var top_nav_height = $("#id_of_top_nav").height(); var bottom_nav_height = $("#id_of_bottom_nav").height(); var window_height = $(window).height(); var height_of_open_space = window_height - (top_nav_height+bottom_nav_height); $("#id_of_img").css({ height:height_of_open_space+'px'; }); }); this fine if 0px padding , margin, if not values , subtract height_of_open_space before applying img height

android - How to find id of dynamically created radio groups and each have 4 radio buttons -

how find id of dynamically created radio groups , each radio button have 4 radio buttons you can set id every view setid(int) , search it. remember put in layout views without same ids.

c# - How to bind a text box to a member in data context conditionally? -

i'm not sure if it's possible @ wonder if it's possible bind text box 2 different fields depending on value of third. suppose have carrier goes origin destination , has status of being on way or having arrived. because of business logic , way customer works want grid of orders this. #id orgin dest. status 101 b going 102 c d going 103 d going however, when order id e.g. 102 reaches status, point of destination should viewed in origin column , destination column should empty (or show next stop or whatever else), this. #id orgin dest. status 101 b going 102 d - done 103 d going so bind column origin field origin in data context if status going bind field destination if status done . if it's not possible, how can approach it? forced create new data type maps actual orders viewable orders? or add property view model isn't supported field rather renders value depending on status? here exa...

Wildcard replace RegEx in C# -

i've searched , searched, seen bits of code looks solution, doesn't work. i'm not experienced in use of regular expressions , see i'm doing wrong here. string line = input.replace("<td>", ";"); string withouttabs = regex.replace(line, "\t", ";"); string withouttd = regex.replace(withouttabs, ".*</td>", ";"); the code above trying replace of <td> </td> , tabs html table layout. doesn't work, doesn't remove tabs nor replace </td> tags. </td> tag attached text, this: text</td> i want this: text; could point out mistake, or regex wrong , need replace else? i want replace <td> </td> , tabs ; regex.replace(input, @"</?td>|\t", ";"); demo

android - Change Image in ListView if cursor has certain value -

i have several markers on google maps , in each marker listview several entries. each entry can liked user , if has liked, there stored entry in sqlite database marker id, entry id , if has liked (1) or took (0). want filled heart shown below each list item user has liked. problem is: if there many entries, there randomly filled hearts, if user liked 1 entry. can figure out mistake? activity, saves in sqlite database if entry saved: getallentryslistview.setonitemclicklistener(new adapterview.onitemclicklistener() { @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { try { jsonobject entryclicked = jsonarray.getjsonobject(position); entryid = entryclicked.getstring("id"); } catch (jsonexception e) { e.printstacktrace(); } likebutton = (imageview) view.findviewbyid(r.id.heartimage); ...