Categories
CMS Mastering Development Wordpress

ACF Flexible in TCPDF

So, i need to display Flexible content in TCPDF, i have my Flexible content fields: if( have_rows(‘levels’) ): while ( have_rows(‘levels’) ) : the_row(); if( get_row_layout() == ‘level_one’ ): $sub = the_sub_field( ‘subtitle_’ ); $pic = the_sub_field( ‘image’); endif; endwhile; else : endif; then when i try display this all in my TCPDF function, i […]

Categories
Mastering Development

How to Un-Sort The legends in the graph in R?

I am not an expert in R. I am having an issue, the legends are sorted alphabetically. I cannot arrange them manually because I have 87 patients and each patient has 300 days and the status (category) changes every day so i want to plot the graph exactly like it has in the source. ggplot(data […]

Categories
Database Development

Query finds no values when sharppend

I am trying to join two datasets and find the most recent certification date I the following 2 datasets Certifications (1, ‘Judge Level 1’, ‘Judge’, 10, 2), (2, ‘Judge Level 2’, ‘Judge’, 20, 2), (3, ‘Judge Level 3’, ‘judge’, 30, 2), (4, ‘Olympic Judge’, ‘olympic judge’, 30, 2), (5, ‘Junior Leader’, ‘leadership’, 10, 1), (6, […]

Categories
CMS Mastering Development Wordpress

Tiny MCE image alignment and manual resizing

I’m searching a solution to remove the differents possibilities of alignment of images in TinyMCE editor in WordPress and remove the manual resizing by mouse. I already done the last one with this in css, but it could exist a better way : /* Remove sizing on image */ div#mceResizeHandlenw, div#mceResizeHandlene, div#mceResizeHandlese, div#mceResizeHandlesw { display: […]

Categories
Mastering Development

cannot arrange numbers into shape (n,n) matrix

I have the following code that generates a fractal image, the problem is how to reconstruct numbers to be a matrix. from PIL import Image from pylab import * from numpy import NaN import numpy as np import matplotlib.pyplot as plt def julia(C): X = arange(-1.5, 1.5, 0.05) Y = arange(-1.5, 1.5, 0.05) pixel = […]

Categories
Mastering Development

Algorithm to find string which is longest and contains lowest possible numbers?

I have to find string out of these which is longest and contains the lowest possible numbers. 10,20 10,20,30 10,30,40 30,40,50 Ans 10,20,30 I am trying to think of algorithm which can be used to find such record. Record will not contain duplicate number for example e.g 10,10,20 won’t be case.

Categories
Mastering Development

How to extract row before and after when flag change from 0 to 1

I have one dataframe , i want to extract 2 rows before flag change from 0 to one and get row where value ‘B’ is minimum , also extract two rows after flag 1 and get row with minimum value of ‘B’ df=pd.DataFrame({‘A’:[1,3,4,7,8,11,1,15,20,15,16,87], ‘B’:[1,3,4,6,8,11,1,19,20,15,16,87], ‘flag’:[0,0,0,0,1,1,1,0,0,0,0,0]}) df_out=pd.DataFrame({‘A’:[4,1], ‘B’:[4,1], ‘flag’:[0,1]})

Categories
Mastering Development

Search and process data from multi-index DataFrames

I have two dataframes df2, with the payment statistics (that have the probability of the client pay a certain debt) and df3 with new clients data. import pandas as pd d = {‘City’: [‘Tokyo’,’Tokyo’,’Lisbon’,’Tokyo’,’Tokyo’,’Lisbon’,’Lisbon’,’Lisbon’,’Tokyo’,’Lisbon’,’Tokyo’,’Tokyo’,’Tokyo’,’Lisbon’,’Tokyo’,’Tokyo’,’Lisbon’,’Lisbon’,’Lisbon’,’Tokyo’,’Lisbon’,’Tokyo’], ‘Card’: [‘Visa’,’Visa’,’Master Card’,’Master Card’,’Visa’,’Master Card’,’Visa’,’Visa’,’Master Card’,’Visa’,’Master Card’,’Visa’,’Visa’,’Master Card’,’Master Card’,’Visa’,’Master Card’,’Visa’,’Visa’,’Master Card’,’Visa’,’Master Card’], ‘Colateral’:[‘Yes’,’No’,’Yes’,’No’,’No’,’No’,’No’,’Yes’,’Yes’,’No’,’Yes’,’Yes’,’No’,’Yes’,’No’,’No’,’No’,’Yes’,’Yes’,’No’,’No’,’No’], ‘Client Number’:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22], ‘DebtPaid’:[0.8,0.1,0.5,0.30,0,0.2,0.4,1,0.60,1,0.5,0.2,0,0.3,0,0,0.2,0,0.1,0.70,0.5,0.1]} df = pd.DataFrame(data=d) df2=df.groupby([‘City’,’Card’,’Colateral’])[‘DebtPaid’].\ value_counts(bins=[-0.001,0,0.25,0.5,0.75,1,1.001,2],normalize=True) […]

Categories
Mastering Development

Angular Material *matNoDataRow doesn’t work

I’ve made a MatTable where you can filter. If there is no data matching the filter, I want to show a text using the *matNoDataRow directive mentioned in the Angular Material documentation. However, it doesn’t work as in the examples by Angular Material. Is there something I forgot? Or is this directive not yet working? […]

Categories
CMS Mastering Development Wordpress

Disabling the free shipping method when the cart has product/s which assigned a certain shipping class [closed]

Can you please tell me how can I adapt this snippet (it disables the free shipping method for a certain product) to make it possible to disable the free shipping method when the cart has product/s which assigned a certain shipping class? (WooCommerce 4.2+) Any help appreciated. Thanks. function my_free_shipping( $is_available ) { global $woocommerce; […]