Categories
Mastering Development

R Shiny Dashboard: Upload data from both local file and the online database (such as Google Sheet)

I am a beginner of Shiny dashboard and I have a problem that bothered me a long time. My final target is to assign data to a variable called "myData", but I give the users options to upload data either from local file or online file (in my case GoogleSheet). Below is a simplified version […]

Categories
CMS Mastering Development Wordpress

category list with cutom post count

i want to show category list with custom post type count. but i have two different post types in every category. how can i do that . please help. this is my code: <?php $category_object = get_queried_object(); $current_category_taxonomy = $category_object->taxonomy; $current_category_term_id = $category_object->term_id; $current_category_name = $category_object->name; $args = array( ‘child_of’ => $current_category_term_id, ‘current_category’ => $current_category_term_id, […]

Categories
CMS Mastering Development Wordpress

category list with cutom post count

i want to show category list with custom post type count. but i have two different post types in every category. how can i do that . please help. this is my code: <?php $category_object = get_queried_object(); $current_category_taxonomy = $category_object->taxonomy; $current_category_term_id = $category_object->term_id; $current_category_name = $category_object->name; $args = array( ‘child_of’ => $current_category_term_id, ‘current_category’ => $current_category_term_id, […]

How does this recursive Python code work?

I came across this recursive function that’s supposed flatten a dictionary: def flatten(data, prefix=”, separator=’.’): """Flattens a nested dict structure. """ if not isinstance(data, dict): return {prefix: data} if prefix else data result = {} for (key, value) in data.items(): result.update(flatten(value,_get_new_prefix(prefix, key, separator), separator=separator)) return result def _get_new_prefix(prefix, key, separator): return (separator.join((prefix, str(key))) if prefix […]

Categories
CMS Mastering Development Wordpress

Rewrite Rule Working for all but one of the taxonomies created

I have a hierarchical taxonomy, county, which takes a parent and child taxonomy as well as a rewrite rule to include them in my permalinks. I have three of these county taxonomies, but only two of them are working as expected. For the third one, the permalinks break when you add both the parent and […]

Categories
CMS Mastering Development Wordpress

How to add active class dynamically

**I use this code but not working ** <div class="row"> <!– Featured Post Area –> <div class="col-12"> <div class="featured-post-area"> <div id="featured-post-slides" class="carousel slide d-flex flex-wrap" data-ride="carousel"> <div class="carousel-inner"> <?php $feuted_post_slider = new WP_Query( array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 5, ‘order’ => ‘ASC’, // ‘meta_key’ => ‘featured_post’, // ‘meta_value’ => ‘on’ ) ); // need […]

Categories
CMS Mastering Development Wordpress

Custom post type hierarchical taxonomy slug

I am working on a test. Where i want the follow to be able to work: https://1587469162.webton.dev/referenties/ = page https://1587469162.webton.dev/referenties/hoofdcategorie/ = main taxonomy https://1587469162.webton.dev/referenties/hoofdcategorie/subcategorie/ = sub taxonomy https://1587469162.webton.dev/referenties/hoofdcategorie/subcategorie/referentienaam-3/ = single reference For so far I got this working, but I allso want the following to be able to work: https://1587469162.webton.dev/referenties/hoofdcategorie/referentienaam/ = single reference but shows […]

Multi row insert in Redshift using jdbc

I want to generate a multi row sql insert to Redshift. According to the documentation, this is the efficient way to do this : https://docs.aws.amazon.com/redshift/latest/dg/c_best-practices-multi-row-inserts.html insert into category_stage values (default, default, default, default), (20, default, ‘Country’, default), (21, ‘Concerts’, ‘Rock’, default); I am developing in Kotlin and using jdbc. For now, I am doing a […]

Categories
Mastering Development

Disable or remove mintues dropdown from daterangepicker

I want to disable future hours from daterangepicker, i’ve tried “maxDate”: moment().utc().startOf(‘hour’), but this is disabling future dates only not hours. Also, how can i disable minutes dropdown or just remove it daterangepicker as i want to keep only hours dropdown. below is what i’m using. $(‘#demo’).daterangepicker({ “showISOWeekNumbers”: true, “timePicker”: true, “showDropdowns”: true, “timePicker24Hour”: true, […]

Display ONLY ONE $term (Out of 4 terms) from a Custom Taxonomy and CPT

I hope someone can shed some light into this problem that i cannot find a solution for! (I have been searching the www for days). WHAT I HAVE DONE: I created a CPT: “service” and a Custom taxonomy: “service_cat”, which contains 4 $terms: corporate events, fundraisers, private events and weddings. I also created two files: […]