Categories
Mastering Development

Google Analytics Custom Dimensions command location

I registered my MVC site on GA, sending in bunch of Ga commands to register the click events, with different labels. I also want to send 2 different dimensions for 2 different User types – value1 & value2. Am i doing this right in passing 2 custom dimensions for each click in Layout page like […]

Categories
Mastering Development

django-allauth: how to avoid requesting friends list?

I have set user registration via Facebook with django-allauth. When I am trying to login with Facebook, Facebook notifies me that the app wants to get the list of my users. However, these data are not stored in my database after the login, nor are they included in my settings.py. How can I disable requiring […]

Categories
CMS Development Magento

Magento 2.3.4 – How I can add attributes to Categories

I want to add two attributes in the admin for categories, one textarea, and one text input, I already add the attributes in the database, and I use this code Vendor/Module/view/adminhtml/ui_component/category_form.xml <?xml version=”1.0″ encoding=”UTF-8″?> <form xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <fieldset name=”content”> <field name=”cat_short_description”> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”class” xsi:type=”string”>Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg</item> <item name=”formElement” xsi:type=”string”>wysiwyg</item> <item name=”wysiwygConfigData” […]

Categories
Artificial Intelligence (AI) Development

Image dataset for pomegranate plant disease

I am implementing a project on pomegranate plant disease in Machine learning. I want a dataset of all kind images of a healthy and unhealthy part of the pomegranate plant. I got a dataset from Fruit360 but that is only for pomegranate fruits but need for leaves also. Is there anyone who knows any website, […]

Categories
CMS Development Magento

Magento 2.3.4 – Category save issue after upgrade

I just upgrade the store from Magento 2.3.3 version to Magento 2.3.4 version and I can’t save any category in backend: and in the debug.log file I have this error: [2020-03-09 10:44:04] main.CRITICAL: Error: Call to a member function getAttributeCode() on bool in /chroot/home/html/vendor/magento/module-catalog/Observer/InvalidateCacheOnCategoryDesignChange.php:67 Stack trace: #0 /chroot/home/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\Catalog\Observer\InvalidateCacheOnCategoryDesignChange->execute(Object(Magento\Framework\Event\Observer)) #1 /chroot/home/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Catalog\Observer\InvalidateCacheOnCategoryDesignChange), Object(Magento\Framework\Event\Observer)) #2 /chroot/home/html/vendor/magento/framework/Event/Manager.php(66): […]

Categories
Development

Refreshing PHP file through jQuery in chrome extension

I am trying to make a chrome extension that takes data from my PHP file and displays it, it shows data correctly but whenever i do changes in my PHP file it does not show it in the extension i have to open localhost and reload PHP file every time to see changes in extension. […]

Categories
CMS Development Wordpress

How can I get variable from php function and use it in wp_localize_script?

I need to have dynamically created meta fields for WooCommerce product category. Almost everything works, just one thing leave to solve for me. I need to get dynamic $count variable from php and use it into javascript file. For this I am trying use wp_localize_script. Below is my function to enqueue scripts where I need […]

Categories
Development

How to position my elements horizontally in react with css

I have components that when viewed in my app are positioned vertically and I would like this to be horizontally. Which component should I apply the css property to and what would it be? Thank you Principal Component import React from ‘react’ import Tournament from ‘./Card.jsx’ import Tournaments from ‘./ListTournaments.jsx’ import Carousel from ‘./Carousel.jsx’ import […]

Categories
Development

Firebase listener with React Hooks

I am trying to figure out how to use a Firebase listener so that cloud firestore data is refreshed with react hooks updates. Initially, I made this using a class component with a componentDidMount function to get the firestore data. this.props.firebase.db .collection(‘users’) // .doc(this.props.firebase.db.collection(‘users’).doc(this.props.firebase.authUser.uid)) .doc(this.props.firebase.db.collection(‘users’).doc(this.props.authUser.uid)) .get() .then(doc => { this.setState({ name: doc.data().name }); // loading: […]

Categories
Development Linux Ubuntu

18.04: Different IP addresses found with IP lookup command line

I am doing the following from Ubuntu 18.04 LTS: ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.208.65 netmask 255.255.255.240 broadcast 172.17.208.79 ether 00:15:5d:c0:71:38 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 […]