Categories
CMS Magento Mastering Development

Checkout custom shipping address field – set as required

I have created a custom module that adds a text field in shipping address. It’s workin ok but I’d like to make it required. How can I do that? I tried adding ‘required-entry’ => true at validation parameter, in file Plugin/Checkout/LayoutProcessor.php but it didn’t work. Here are the module files: Mymodules/FieldCheckout/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, ‘Mymodules_FieldCheckout’, […]

Categories
CMS Magento Mastering Development

Magento 2 : Calling a JS function from another JS file?

This Accessing a JS function from another JS file solution not mapped on my problem ,Please give me direction that how can i call getPureValue: function () from tax.js into some where in minicart.js tax.js /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** * @api */ […]

Categories
CMS Development Wordpress

Why still output /wp-content/themes/twentynineteen?

I’ve developed some twentynineteen-child template. Today, I need to convert my last child-template into a template stand-alone. I removed the following line from the style.css file: Template: twentynineteen And added a few lines to my functions.php file: if ( ! function_exists( ‘oripeau_setup’ ) ) : function oripeau_setup() { load_theme_textdomain( ‘oripeau’, get_template_directory() . ‘/languages’ ); add_theme_support( […]

Categories
CMS Development Magento

Get getTotalsAction result data

I tried updating the cart using JS and summary container is updating properly. But I want to update the quantity of the item. So basically I have added a custom button in checkout/cart page. When this button is click I add one product into the cart. Now this product is fix and the quantiity added […]

Categories
Development

CSVRecordReader and Un-terminated quoted field at end of CSV line

I have a problem with the datasets that I am using. They are CSV that contain fake news. My problem is with the CSVRecordReader class, which is what DataVec (Deeplearning4j) offers me. I am trying to make a spark transformation process. My problem is the well-known “Un-terminated quoted field at end of CSV line” error. […]

Categories
Development

Microsoft Azure spark kusto connector — Is it possible to get files of azure storage out of databricks?

I’m trying to read and write files at azure storage, my attempts until now: Creating the Spark Session: import pyspark from pyspark.sql import SparkSession from pyspark.sql import SQLContext sparkOptions = {“executor_memory” : “1G”,”driver_memory”: “1G”, “max_results_size”: “1G”} conf = pyspark.SparkConf().setAppName(app) conf = (conf.setMaster(“local[*]”) .set(‘spark.executor.memory’, sparkOptions[“executor_memory”])\ .set(‘spark.driver.memory’, sparkOptions[“driver_memory”])\ .set(‘spark.driver.maxResultSize’, sparkOptions[“max_results_size”])\ .set(‘spark.sql.crossJoin.enabled’, “true”)\ .set(‘spark.jars.packages’, ‘com.microsoft.azure.kusto:spark-kusto-connector:1.0.0’)\ .set(“fs.azure”, “org.apache.hadoop.fs.azure.NativeAzureFileSystem”)\ .set(“fs.azure.account.auth.type”, […]

Categories
CMS Development Magento

Magento 2 : Firefox javascript not working

I am trying to create buttons to either add or remove 1 from the shopping cart. In my search I found some code online that works great for Chrome but appears to not work on any other browser. the Onclick function won’t get fired in Firefox. Underneath is the javascript. <script type=”text/javascript”> require([ ‘jquery’ ], […]

Categories
Development

Non-conformable arrays in neural network – neuralnet package

I am trying to create a neural network using this code: countries=read.table(‘countries.txt’,header =TRUE,sep=’\t’,quote=””,dec=”,”) #install.packages(“neuralnet”) library(neuralnet) trainset<-countries[1:85,] testset<-countries[86:118,] retea<-neuralnet(Tari.europene~Enrolement_P+Enrolement_S, trainset, hidden=4, lifesign=”minimal”, linear.output=FALSE, threshold=0.1) and I get this error: hidden: 4 thresh: 0.1 rep: 1/1 steps: Error in x – y : non-conformable arrays Also , the results for this line are: dput(trainset[c(“Tari.europene”, “Enrolement_P”, “Enrolement_S”)]) I […]

Categories
Development

Using grep on a Python command output into a shell script

I’ve been struggling for the past two hours on this simple example : I have this line: python -c ‘import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)’ Which gives: Loaded plugins: product-id {‘arch’: ‘ia32e’, ‘basearch’: ‘x86_64’, ‘releasever’: ‘7Server’, ‘uuid’: ‘d68993fd-059a-4753-a7ab-1c4a601d206f’, ‘yum8’: ‘rhel’, ‘yum9’: ‘7.1’} And now, I would just like to get the line with […]

Categories
Development

R Shiny validate column number input file

I’m replicating the example of the Shiny File Upload app. As you can see I added a validate function for the file type. I also set fixed column names, because I want to allow the user to only upload date for a maximum of 5 columns. Right now when the user uploads a file that […]