I have started to get alot of "is_singular was called" and "is_page was called" in my debug.log [31-May-2020 12:10:27 UTC] PHP Notice: is_page was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /wp-includes/functions.php on line 5167 [31-May-2020 12:10:27 UTC] PHP Notice: is_singular was called <strong>incorrectly</strong>. Conditional query tags do not work before …
I have a lot of JavaScript and jQuery functions that are all working fine, but it's quite fragmented and hard to maintain as some are in Elementor HTML widgets, others in specific Pho functions annd some in an enqueued JS file. Ideally I'd like to move everything into the single JS file so it's easier to maintain, but would there be any performance implications? For example some scripts only need to run on specific pages but I assume they would …
I would like to show my WordPress blog's title as "Dummit foote 4.2.4". But I am getting all capitals as "DUMMIT FOOTE 4.2.4" What should I do to change this? I do not see any editor case in my dashboard. It was mentioned that i should change something in .css but i do not even know where to find that.
I have 3 classes with this distribution: Class 0: 0.1169 Class 1: 0.7668 Class 2: 0.1163 And I am using xgboost for classification. I know that there is a parameter called scale_pos_weight. But how is it handled for 'multiclass' case, and how can I properly set it?
How is "lift" computed? i was reading about "Gain and lift charts" in data science. I picked the following example from https://www.listendata.com/2014/08/excel-template-gain-and-lift-charts.html I am clear on how the gain values are computed. Not clear about lift values are computed? (last column in table)
I wrote a plugin that calls a PHP function from JQuery and the php sends a json response back to the Jquery using wp_send_json(). The functions are all called successfully, but the json request sends a lot of html to the jquery function every time. How do I make the json sent by the php function only a specific message? JQUERY: jQuery( document ).ready( function() { jQuery( 'body' ).on( 'click', '.wpm_mail_link', function( e ) { var varData = 'name:foobar&[email protected]'; jQuery.ajax({ …
If MLE (Maximum Likelihood Estimation) cannot give a proper closed-form solution for the parameters in Logistic Regression, why is this method discussed so much? Why not just stick to Gradient Descent for estimating parameters?
I have a parent page with the URL example.com/the-boats And then child pages like so: the-boats/story the-boats/cast the-boats/articles etc... Many visitors type example.com/boats example.com/cast So when they do this I want to redirect them to /the-boats /the-boats/story etc... I cannot figure out how to do this. I've tried 3 strategies thus far function custom_rewrite_basic() { add_rewrite_rule('^boats/?$', 'index.php?pagename=the-boats/$matches[2]', 'top'); flush_rewrite_rules(); } add_action('init', 'custom_rewrite_basic'); and... add_filter('redirect_canonical', 'my_redirect_canonical', 10, 2); function my_redirect_canonical($redirect_url, $requested_url) { if ( $requested_url == 'https://example.com/boats') { $redirect_url = 'https://example.com/the-boats'; …
I have read some articles and realized that many of them cited, for example, DLis better for large amount of data than ML. Typically: The performance of machine learning algorithms decreases as the number of data increases Source Another one says the performance of ML models will plateau, Source As far as I understand, the more data, the better. It helps us implement complex models without overfitting as well as the algorithms learn the data better, thus inferring decent patterns …
I am trying to load in 30k images (600mb) from Google drive into Google Colaboratory to further process them with Keras/PyTorch. Therefore I have first mounted my Google drive using: from google.colab import drive drive.mount('/content/gdrive') Next I have unzipped the image file using: !unzip -uq "/content/gdrive/My Drive/path.zip" -d "/content/gdrive/My Drive/path/" Counting how many files are located in the directory using: len(os.listdir(path-to-train-images)) I only find 13k images (whereas I should find 30k). According to the output of unzip, the files appear …
UPDATE: I have the following code working. It excludes the taxonomy from the search results. However, I would like this only to happen if a user is not logged in. The code below is taking effect for logged in and logged out users. How can I check if someone is logged in from the functions.php file? I've tried !is_user_logged_in() many times, and I can't seem to get it to work? Thanks for any help! add_filter( 'pre_get_posts', 'exclude_pages_search_when_logged_out' ); function exclude_pages_search_when_logged_out($query) …
.htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp_test/ RewriteRule ^index\.php$ - [L] RewriteRule ^the_image$ wp-content/uploads/2019/01/banner\.jpg [L] RewriteRule ^the_page$ sample-page [L] </IfModule> When I go to example.com/the_image it shows the correct image. However, if I go to example.com/the_page it shows the page not found page. Any work around on this?
I upload all images through the Media Library Drag and Drop Uploader with no problems. Every time I use a CSV file with several thousand products, I enter the image url for each product, which is located in the Media Library. Example: /wp-content/uploads/2018/08/oa901-essence-1oz.jpg As a result, the product page uses the image with the added -1 instead of the original or even a thumbnail of the original. Then when I download all of the products, the image url has the …
Where does the Gutenberg store site and Block Editor state data, how do I access it, and how can I use it in block and sidebar components so that they will update and re-render automatically when it changes? What is the difference between useSelect() and withSelect()?
I'm developing a plugin which uses wordpress's thickbox media library to handle media upload and selection. All is well but for the fact that I would like to automatically 'redirect' to the 'media library'-tab after I uploaded/ wordpress finished crunching the file. So basically i'm looking for a hook that's fired after the crunching of an uploaded file is finished. I can't imagine this would be such an extreme thing but I can't seem to find the right hook for …
I'm working on a theme with custom menus, currently using WP 4.0.1. I'm registering two menus in functions.php: register_nav_menus( array( 'primary' => __( 'Main Menu', 'wsy' ), 'secondary' => __( 'Secondary Menu', 'wsy' ) ) ); Then, displaying them in my header.php file: <nav role="navigation"> <?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => '1' ) ); ?> </nav> The problem is, when I select a specific menu from either the Menus page or the customizer, they stop showing up in …
I'm working on developing a model with a highly imbalanced dataset (0.7% Minority class). To remedy the imbalance, I was going to oversample using algorithms from imbalanced-learn library. I had a workflow in mind which I wanted to share and get an opinion on if I'm heading in the right direction or maybe I missed something. Split Train/Test/Val Setup pipeline for GridSearch and optimize hyper-parameters (pipeline will only oversample training folds) Scoring metric will be AUC as training set is …
I use "Digits (WordPress Mobile Number Signup and Login)" for signup by email & SMS ; when non logged in user proceed to checkout , want to redirect to signup form of Digits (not usual woocommerce signup). In case already logged-in users, they should go following the next step in the checkout process as normal. appreciate if anybody help.
As we all know Keras backend uses Tensorflow and so it should give out some kind of results when we provide the same parameters, hyper-parameters, weights, and biases initialization at each layer, but still, the accuracy is different. This may be because the batches of images that are fed at each step in both the models are not identical and get shuffled randomly. Is there any way in which we can make sure that the same batch of images is …
My site uses a plugin (Google Language Translator) to apply a Google translation of the text (see page here--the flags at the top of the page switch the language). If I change to another language, close the browser, re-open the browser, and re-open my page, the same language is displayed. How does the browser know to display in the same language as before? Is there some variable set somewhere? Perhaps a cookie, or session ID? Or perhaps some kind of …
I see examples of LSTM sequence to sequence generation models which use start and end tokens for each sequence. I would like to understand when making predictions with this model, if I'd like to make predictions on an arbitrary sequence - is it required to include start and end tokens tokens in it?
I changed url from http to https from WP Settings. After refreshing I can't access wp-login page. It says "site can't be reached" My website link is : https://jhonnathans.atwebpages.com/ Same question but i'm using awardspace.
I have to clusterize this dataset in which I have houses and water consumption in this form: $$ House1 = (x_{1},x_{2}... x_{n});\\ House2 = (y_{1},y_{2}... y_{n});\\ House3 = (z_{1},z_{2}... z_{n});\\ $$ where $x_{i}$ is the daily consumption in liters while $n$ is a fixed parameter (length of dataset). I need to cluster these houses in k clusters based on their water consumption. My question is: how can I handle data expressed in this form to feed in the clustering algorithm? …
I've a problem with my WordPress website getting updated after I make changes to its code: I'm using phpStorm with auto-save, running the website on WAMP, locally. Therefore, right after I right new code, the file in which I write the code in should be updated, and the website quickly after that. Yet the website doesn't update. I'm not using any cache plugins, and in my browser, Chrome, I disabled caching. Also, it does get updated, but only after I …
I don't know if this has a name I would like to know if there is an ai to cut out a character that appears in a video at a time. that is, to have an input video where many characters appear and an output video with all the frames where the character that interests me appears.
in my site(zamiin.ir) there are some font that slow my site speed . font fa-solid-900.woff2 two time load in my site ,one time in my theme and one time in elementor gtmetrix test: what can i do?
I am trying to create dynamic input fields in a plugin I am working on. I want to add functionality to "Add/Remove and Save" options in my plugin. Something like the below attached.
I'm new to statistics so sorry any major lack of knowledge in the topic, just doing a project for graduation. I'm trying to cluster a Health dataset containing Diseases(3456) and Symptoms(25) grouping them considering the number of events occurred. My concern is that a lot of the values are 0 simple because some diseases didn't show that particularly symptom, for example (I made up the values for now): So, I was wondering what was the best way to cluster this …
UPDATE: I have realised that I need to use a plugin like PHP Snipping or Insert PHP to make this work, I have updated my screen shots to reflect where Im upto from my research. The code is working and outputting the right User ID but the SQL is not echoing the Table data, if you have some advice on where I might of gone wrong would be great. <?php global $wpdb; $uid = get_current_user_id(); $sql = $wpdb->prepare("SELECT * FROM …
I have a specific category that all posts that are in that category must follow the following structure: category-name/child-category-name(if any)/post-name The other posts will remain with the current base structure defined which is %postname% What filter, hook that can change the permalink of these posts? How would it be?
I am trying to use pre_set_site_transient_update_plugins to update my plugin from a GitHub repository. For that I am using this example. On my Dev-System (MAMP for Mac Version 2.2) everything is fine. It gets the latest Version and shows me the update notification. When I publish it to my Live System wich is a hosted webspace package. I don’t get the Update Notification. Even after waiting 12 hours or using ?force-check=1 What I already did was to create a simple …
I'm thinking about an OCR system for digitalizing receipts. On the input system would take a picture of receipt and then return classified data (total_sum = Y, date = X, etc.). My question is regarding how to start. My initial thought was that I should start with detecting classes (name of the shop, receipt id etc.) on image and splitting it, then I would send parts of image OCR. My second idea is more NLP based. I would normally pass …
It's emphasised in Machine Learning courses that the natural generating data has a level of uncertainty because the measurement is not perfect and has noise in its process. Assuming we had the perfect measurement device, and noise wasn't a factor, how would it affect Empirical and Structural risks of the learn and validation processes?
To me it doesn't make sense to normalize it even if it is a numerical variable like Zip Code. An address should be interpreted as categorical features like "neighborhood"... ? Suppose I have geolocalisation data (latitude & longitude), the best thing to do seem to use k-means clustering and then working with cluster's label that I "encode". If the answer is : "it depends" please tell me how
We are working on a WordPress plugin and we require an API call. We are using the api: http://www.geoplugin.net/json.gp?ip=8.8.8.8 In this context: $response = wp_remote_get("http://www.geoplugin.net/json.gp?ip={$ip}", array( 'timeout' => 45, 'redirection' => 5, 'user-agent' => 'Mozilla/5.0 (compatible; Rigor/1.0.0; http://rigor.com)', )); $dataArray = json_decode(wp_remote_retrieve_body($response)); var_dump($response); However, all we get is a 403 error saying: string(162) " 403 Forbidden nginx " The API call worked fine using this code: file_get_contents("http://www.geoplugin.net/json.gp?ip={$ip}") However, we are only allowed to use wp_remote_get() by WordPress. We have been …
I want to create a new variable for the dataframe details called lower after iterating through multiple data frames. list1 is a list of string values of a column named variable_name in the details. vars_df is another data frame with 2 columns, namely variable_name and direction. Both columns contain with string values. vars_df.shape = (19,2) Some values of variable_name in vars_df are present in list1 as well as data_set. data_set.shape = (32,107).df.shape = (96,1) The following code, which aims to …