Categories
CMS Mastering Development Wordpress

directory structure issue when calling a JS file and Ajax

I can not seem to make the call to the proper JS file location despite trying everything that I can think of. Below is the way that it should be from everything I know to find that "myjsfile.js" (name replaced for stackoverflow) function my_scripts() { wp_enqueue_script( ‘myscript’, get_theme_file_uri( ‘/assets/js/myjsfile.js’ ), array(‘jquery’), null, true ); wp_localize_script(‘myscript’, […]

Categories
Mastering Development

Android Roaming and Bluetooth is_enabled exception

On Android, I’ve been trying to retrieve Roaming and Bluetooth data to see if they are enabled. I’ve used the following: Cursor cursorCheck = getContentResolver().query( Settings.Global.CONTENT_URI, new String[]{Settings.Global.BLUETOOTH_ON}, null, null, null); assert cursorCheck != null; cursorCheck.moveToFirst(); for (int i = 0; i < cursorCheck.getCount(); i++) { Log.i("check1", cursorCheck.getString(0) + " "); cursorCheck.moveToNext(); } cursorCheck.close(); However, […]

Categories
Mastering Development

OpenCl cannot compile kernel with ‘printf’

I am getting the error error: implicit declaration of function ‘printf’ is invalid in OpenCL when I try to build an OpenCL kernel. The kernel code is this __kernel void conj_grad(int dim, int num_vals, __local float *r, __local float *x, __local float* A_times_p, __local float *p, __global int *rows, __global int *cols, __global float *A, […]

Categories
Linux Mastering Development Ubuntu

Digidesign Mbox 2 driver make error

I am trying to install this mbox 2 driver, but I get the following errors when making the file. I have never compiled a driver yet so I have absolutely no idea what is happening. I notice that the instructions are for kernel version 3.x, does that have somethings to do with it. Or may […]

Categories
CMS Mastering Development Wordpress

Iris color picker in custom theme option page not saving value

I have implimented the Iris color picker on my theme options page, but clicking ‘Save’ does not save the selected value, it just resets to blank (or the pre-set value). What am I missing here? functions.php: function accelerator_admin_scripts(){ wp_enqueue_script( ‘custom-js’, get_template_directory_uri() . ‘/js/custom.js’, array(‘jquery’), ‘1.0.0’, true ); wp_enqueue_style( ‘wp-color-picker’ ); wp_enqueue_script( ‘iris’, admin_url( ‘js/iris.min.js’ ), […]

Categories
CMS Magento Mastering Development

Error magento 2.3.3-p1 with Smile ElasticsuiteCore

During magento upgrade to 2.3.5-p1, after doing a composer install this happened when I tried to do any command i.e: magento setup:upgrade The error on terminal: Class Smile\ElasticsuiteCore\Model\Search\Request\RelevanceConfig\Resolver\Containers does not exist#0 /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct(‘Smile\\Elasticsu…’) #1 /var/www/html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(49): Magento\Framework\Code\Reader\ClassReader->getConstructor(‘Smile\\Elasticsu…’) #2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters(‘Smile\\Elasticsu…’) #3 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create(‘Smile\\Elasticsu…’) #4 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(196): Magento\Framework\ObjectManager\ObjectManager->get(‘Smile\\Elasticsu…’) #5 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(172): Magento\Framework\ObjectManager\Factory\AbstractFactory->parseArray(Array) #6 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, NULL, Array, ‘scopeResolvers’, ‘Magento\\Framewo…’) […]

Categories
CMS Magento Mastering Development

Class NewRelic\Monolog\Enricher\Handler does not exist

I just reinstalled magento using composer install Then I tried to run this command php bin/magento setup:upgrade and also tried running other setup commands. I got the following error: Class NewRelic\Monolog\Enricher\Handler does not exist#0 /vagrant/www/vendor/magento/framework/Code/Reader/ClassReader.php(26): ReflectionClass->__construct(‘NewRelic\\Monolo…’) #1 /vagrant/www/vendor/magento/framework/ObjectManager/Definition/Runtime.php(54): Magento\Framework\Code\Reader\ClassReader->getConstructor(‘NewRelic\\Monolo…’) #2 /vagrant/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters(‘NewRelic\\Monolo…’) #3 /vagrant/www/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create(‘NewRelic\\Monolo…’) #4 /vagrant/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(203): Magento\Framework\ObjectManager\ObjectManager->get(‘NewRelic\\Monolo…’) #5 /vagrant/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(179): Magento\Framework\ObjectManager\Factory\AbstractFactory->parseArray(Array) #6 /vagrant/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, NULL, […]

Categories
Mastering Development Software

With C#, in what way would it be problematic to have hundreds of classes derived from one abstract class?

With C#, I am defining the physical structure and behavior of a robot. For the physical structure: I wrote an abstract "Unit" class. Other classes such as "Factory" or "Arm" are derived from Unit. So there is a hierarchy/tree of Unit objects that defined the physical makeup of the robot. For example, the constructor of […]

Categories
Mastering Development

How to create a spinner with different colors in each row

I would like to create a sppiner with different colors in each row, I know that there are many explanations similar to my question but they are all in Java and it has been complicated for me, I carry out the steps. My code val lista = listOf<Mood>( Mood(resources.getColor(R.color.blue, null), "Color1"), Mood(resources.getColor(R.color.purple, null), "Color2"), Mood(resources.getColor(R.color.green, […]

Categories
Mastering Development

Identify text areas on a Talmud page

I have a Talmud page like these: And I want to find the text areas with opencv to get such a result, that each text will be on its own like this: In the attached image, each area is marked in a different color, and text has a number, what is important is to identify […]