I struggled with this a long time! Can anyone help me? My plugin is not creating a database table once activated. The following code is in the main plugin file. function woocq_activate() { global $wpdb; $table_name = $wpdb->prefix . 'woocq'; $sql = "CREATE TABLE $table_name ( id MEDIUMINT(9) NOT NULL AUTO_INCREMENT, name VARCHAR NOT NULL, message TEXT NOT NULL, question_id INT NOT NULL, product_id INT DEFAULT NULL, timestamp BIGINT NOT NULL, PRIMARY KEY (id) );"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( …
Given a multi class logisitic classifier $f(x)=argmax(softmax(Ax + \beta))$, and a specific class of interest $y$, is it possible to construct a binary logistic classifier $g(x)=(\sigma(\alpha^T x + b) > 0.5)$ such that $g(x)=y$ if and only if $f(x)=y$?
Is there any way to fix the "Form elements do not have associated labels" issue in WordPress search form without having the search button. Google Light House Audit: Form elements do not have associated labels. Labels ensure that form controls are announced properly by assistive technologies, like screen readers. Failing Elements input <input type="text" value="Search" name="s" id="psf" onblur="if (this.value == '') {this.value = 'Search';}" onfocus="if (this.value == 'Search') {this.value = '';}"> I want to add a label in the form …
In this video from EDX, the instructor explains the binomial theorem as: Binomial Theorem: When you calculate $(a + b)^n = a^n + C(1)a^{(n-1)b} + C(2)a^{(n-2)b^2} + ... + C(n-1)ab^{(n-1) + b^n}$ The coefficients = $C1, C2, ..., C(n-1)$ Coefficient of $(a + b)^4 = 1, 4, 6, 4, 1$ From the formula above, you get after some manipulation: $(a + b)^n = a^n + (n choose 1) a^{(n-1) b^1} + (n choose 2) a^{(n-2) b^2} + ... + (n …
I am doing anomaly detection using machine learning. i have tried different models like isolation forest, SVM and KNN. The maximum accuracy that I can get from each of them is $80\%$ accordind to my dataset which contains $5$ features and $4000$ data samples, $18\%$ of them are anomalous. When I use autoencoder and I adjust the proper reconstruction loss threshold I can get $92\%$ accuracy but the hidden layers setup of the autoencoder does not seems right despite the …
I have a custom post type 'question' and taxonomy 'question_tag'using Anspress plugin. When visiting a tag page the title is "Example Tag". Desired result: "Questions on Example Tag". How could I achieve this?
I am interested in training a CNN to take in inputs where each input is a set of low-resolution images and each ground truth is a single high-resolution image. The ground truth high-resolution image was generated by averaging the information from a set of 80 low-level images. What I would like the CNN to do is to generate the same high-resolution image from a smaller set of low-level images, for example 5 low-level images. I was looking into TensorFlow GAN …
Part 1 Im going through this article and wanted to try and calculate a forward and backward pass with batch normalization. When doing the steps after the first layer I get a batch norm output that are equal for all features. Here is the code (I have on purpose done it in very small steps): w = np.array([[0.3, 0.4],[0.5,0.1],[0.2,0.3]]) X = np.array([[0.7,0.1],[0.3,0.8],[0.4,0.6]]) def mu(x,axis=0): return np.mean(x,axis=axis) def sigma(z, mu): Ai = np.sum(z,axis=0) return np.sqrt((1/len(Ai)) * (Ai-mu)**2) def Ai(z): return np.sum(z,axis=0) …
You do not have sufficient permissions to access this page. This is the error i am facing while making my own plugin.Actually, i want to link to another page. Wordpress version is 3.8.1 I made a plugin that shows the following display(the index page of my crud plugin) I want the Add New link to redirect to other create.php(which is in the same folder as crud.php the index php file).But it says You do not have sufficient permissions to access …
I'm adding some pages pragmatically as a subpage. This all works well on a test website in 1 locale. However, on the live website we have WPML with 2 locales. When adding them there, these pages DO NOT show up in the all pages list. Also accessing their url give a 404. However, when you access the edit mode directly: https://xxxxxxx.nl/wp-admin/post.php?post=3280&action=edit&lang=nl The page 'comes to life' (even without saving) and is visible as sub-page in the 'all pages' page. Any …
From what I understand, a DQN agent has as many outputs as there are actions (for each state). If we consider a scalar state with 4 actions, that would mean that the DQN would have a 4 dimensional output. However, when it comes to the target value for training the agent, it is usually described as a scalar value = reward + discount*best_future_Q. How could a scalar value be used to train a Neural Network having a vector output? For …
I am building a meta query array and all fields for the user are optional so some might not have any data. But there is also an option which requires a date query. I am still checking to see if this is working but not sure as of yet. Is this correct and if not, what would be the right way to do it? Not sure if there needs to be an OR condition in here somewhere. $meta_query = []; …
For eg. https://stackoverflow.com/questions/307291/how-does-the-google-did-you-mean-algorithm-work this is the logic behind google's did you mean algorithm - used for spell correction suggestion. What is the algorithm used in case of other search algorithm for spell correction/ to find similar text - in case of a music/OTT search app, eg. amazon music - Similarly - what is the logic used - in case of git commands - How do one usually backtrack the algorithm behind an application from usage? Any general ideas will also …
I am working on a clients site, one of the features they want is for his Editors or Authors to only be able to select existing images to insert into Posts from the Media Library. So looking at the media manager/upload screen below, is it possible to make the Upload Files tab to only be visible to Admin Users and also to make the Media Library shown by Default when this Dialog is shown?
I want to remove/hide the collapse menu item from the dashboard for user/subscriber role only. I don't want to remove it from the admin dashboard. I am the code below to remove it entirely which was posted here previously but I need to make it apply for user/subscriber only. Can someone assist? <?php function wpse_remove_collapse() { echo '<style type="text/css">#collapse-menu { display: none; visibility: hidden; }</style>'; } add_action('admin_head', 'wpse_remove_collapse'); ?>
Suppose you have trained a Feedforward Neural Network with labeled examples ($x$,$y$) in a regression task to learn a function $\hat{f}$ to predict $y$ from $x$ with some error $\epsilon$ as $\hat{f}(x)=y+\epsilon$. Assuming the performance of the model is adequate, is it possible to generate synthetic $x$ examples that have high values for $\hat{f}(x)$? Has this application of neural networks been researched in the literature? For instance, each example $x$ is vector of product features and the target $y$ is …
I basically have a contact form which generates a PDF output using a third-party plugin. The plugin allows for the use of shortcodes to add content to the final PDF. I want to be able to display the avatar image of the currently logged in user so the PDF is customized for them and not just a default look. The shortcode below works great and if I manually change the user_id it will changes the image perfectly to whom ever …
I have been having this problem recently, I want to update quite a few product images on my website with updated versions. I save the image with the exact same name and upload via FTP to my server, to my understanding it is either going to replace the current image or create a duplicate( save the image name with a -1 e.g. Ap2018-1). But neither of that happens. Both images are there with the exact same name but the old …
I use Wordpress 5.2.2 and I develop a custom theme. EDIT : On my theme I added a metabox who show an input type="text". Code in functions.php of my theme if ( ! function_exists( 'vn_add_metabox' ) ) { function vn_add_metabox () { add_meta_box('vn_youtube_single_metabox', __('Youtube link', WP_THEME_TEXTDOMAIN), 'show_vn_youtube_link_metabox', array('post', 'page'), 'side', 'low'); } add_action( 'add_meta_boxes', 'vn_add_metabox' ); } This metabox call show_vn_youtube_link_metabox who display an input text and youtube video iframe if (!function_exists('show_vn_youtube_link_metabox')) { function show_vn_youtube_link_metabox() { global $post; show_vn_input_text('vn_youtube_link'); // …
I have a dataset that contains about 87000 images in a directory, with each class in a separate subfolder. I've tried the class ImageDataGenerator() and the function flow_from_directory() for generating the images, it worked completely fine but I have a question.. Does flow_from_directory() only yield the augmented images? and if this is the case, how can I train my model "which has overfit the training set" on both original and augmented data? Thanks
I have 2 pages on my site which include blog posts (real site is pw protected): https://example.com/blog/ https://example.com/news/ All blog and news articles should have a URL that begins with https://example.com/my-blog/. Example: https://example.com/my-blog/this-is-the-article-name So, what I need to do, is include "my-blog" in the URL before the post name. I've tried things with permalinks, but that didn't work. I'm really stumped and need help with this! Thank you.
Not sure exactly what happened, but my site shows the single post content multiple times. Example. Reinstalling the theme didn't help. Also, it's not happening with any other theme, only with the current one. No plugins are active. Not sure what could be the problem.
I am looking for solution to display related product by multiple product attributes. I've tried "Display Related products for a specific product attribute value in single product pages " StackOverFlow answer code, but it works only for one product attribute value. How to make the same, but for two product attributes values?
I have trained my triplet loss model using FaceNet's architecture. I used 11k hands dataset. Now I want to see how well my model performed, so I feed it 2 images of the same class and get back their embeddings. I want to compare the distance between these embeddings and if that distance is not larger than some threshold I can say that the model correctly classifies these 2 images as of the same class. How do I select the …
how can I turn this function from Two-level into the Fourth level in WordPress? This function can only echo the parent and its child, but I'm trying to make it unlimited or at least 4 levels if it is possible A B -2 C -2 -3 -- Not Work -4 -- Not Work D -2 F this is my code: it works only till level 2 function wp_get_menu_array($current_menu) { $array_menu = wp_get_nav_menu_items($current_menu); $menu = array(); foreach ($array_menu as $m) { …
How to add functionality of adding Textbox in own custom plugin simple page in which user add copyright year in textbox for ex.2022/2023 which will change value in my footer.php. Any help appreciated. Thank you.
Apparently, deep learning methods don't achieve state-of-the-art results on tabular data problems [1,2]. This claim appears to be known also by Kagglers. The SOTA method looks like it is the gradient boosting decision tree. Is there any intuition on why this happens? Any relevant literature on the topic? Do neural networks have a stronger IID assumption that inhibits learning in tabular data? Literature: Deep Neural Networks and Tabular Data: A Survey https://arxiv.org/abs/2110.01889 Do We Really Need Deep Learning Models for …
I trained my data over 40 epochs but got finally this shape. How can I deal with this problem? Please as I used 30.000 for training and 5000 for testing and lr_schedule = keras.optimizers.schedules.ExponentialDecay( initial_learning_rate=4e-4, decay_steps=50000, decay_rate=0.5) should I increase the number of data in testing or make changes in the model? EDIT After I add regularization I got this shape and the loss started from a number greater than before in the previous shape, does that normal? Is this …
I am learning reinforcement learning, and as a practice, I am trying to stabilize an inverted pendulum (gym: Pendulum-v0) in an upright position using policy gradient: REINFORCE. I have some questions, please help me, I tried a lot but couldn't understand. an answer to any question can help me. Thanks in advance. 1- why the observations in the pendulum code are: cos(theta), sin(theta) and theta_dot? not theta and theta_dot only? 2- the action which I should send to the environment …
I would like to have the following taxonomy structure: site.com/courses/course-name/pathway/pathway-name The domain is such that any particular course can be completed by taking a number of different pathways - different module structures. The following URLS would work as such: site.com/courses shows a list of courses site.com/courses/course-name will follow a template e.g. single-course.php, showing title, content and a list of the pathways associated to this course. site.com/courses/course-name/pathways/ will follow a template e.g. archive-pathway.php, showing course-name and a list of pathways (not …
I am attempting to improve my RNN model by making my dependent variable, a stock price, non-stationary. I am aiming to make the series stationary by removing the trend with a log transformation and then performing moving average differencing to remove noise. I have a function that initially logs the series, to penalise the larger values and then performing rolling mean differencing on the values. def moving_avg_differencing(col, n_roll=30, drop=False): log_values = np.log(col) moving_avg = log_values.rolling(n_roll).mean() ma_diff = log_values - moving_avg …
My native language is a regional language and few people speak it. I have some assignements in a machine learning course and i was thinking about doing some natural languge processing on my native language but i don't know where to start since there is almost no research about this language ( no corpus , no research papers , ... ) and i'm new to machine learning. I want to start doing everything from bottom and i want to do …
I want to replace the following message when creating a user in the dashboard as an administrator: Username: xxx To set your password, visit the following address: https://development.xxx.com/wp-login.php?action=rp&key=FlFdsDeAveg2EN1HuqGB0G&login=xxx%40gmail.com https://development.xxx.com/wp-login.php This is my non-working function: /** * Custom Welcome Email * @author Archie M * */ add_filter( 'wpmu_signup_user_notification_subject', 'my_activation_subject', 10, 4 ); function my_activation_subject( $text ) { return 'Welcome to xxx! (Activation required)'; } add_filter('wpmu_signup_user_notification_email', 'my_custom_email_message', 10, 4); function my_custom_email_message($message, $user, $user_email, $key) { //Here is the new message: $message = …
I'm aware there is quite a lot of flexibility to add to the various editor components in the block editor using SlotFills this is useful when you want to add functionality. However my question is about removing functionality. I'd really like to remove one or more of the components below already added into the PluginPostStatusInfoSlot Given there aren't inbuilt filters or hooks into this at the moment - I'm wondering if I'm missing something React-y here that I can use. …