Categories
Mastering Development

How can I provide conditions in SQL query?

I’m trying to update the database table. How can I prevent the password ("MemberPassword", $ pass) coming from the form from being updated with sql codes by providing a condition if it is empty? Is it possible? //database connection $SQL = "mysql:host=" . $this->MYSQL_HOST . ";dbname=" . $this->MYSQL_DB; try { $this->pdo = new \PDO($SQL, $this->MYSQL_USER, […]

Categories
Mastering Development

Can you include multiple mediators in the mediation package in R for one group?

I would like to perform mediation analyses in R for one group, including 2 mediators that I want to fit in one model at the same time. I tried it with the mediation package in R. But I don’t have a treated or control group. Just one group. Is there a way to still get […]

Categories
Mastering Development

How to move the data that I have called from the Firebase real-time database, in a listview to another activity in android studio?

So, I have a simple listview application. When I click an item, it will send the data to the next activity using Bundle. In the first time, I use this JSON structure "teacher": [ { "name": "Carl", "age": "40" }, { "name": "Johnson", "age": "44" } ], And this is my Java code: Query query […]

Categories
Mastering Development

Why does API Gateway’s Method Request not block this test input?

I have an API Gateway with OPTIONS and POST methods, where the POST method has the following Method Request Model (with a content type of "application/json"): { "$schema" : "http://json-schema.org/draft-04/schema#", "title" : "Basic User Request Schema", "type" : "object", "properties" : { "email" : { "type" : "string" }, "id" : { "type" : "string" […]

Categories
Mastering Development

calling a super class in python is failing

class Pet: def __init__(self,name,age): self.name=name self.age=age return None def show(self): print("Hi my self {} and am of {} old".format(self.name,self.age)) return True def speak(self): print("I do speak but am a parent") return True class Cat(Pet): def __initi__(self,name,age,breed): super.__init__(name,age) self.breed=breed return None def show(self): print("This is called from Child class Cat") return True def speak(self): print("This is […]

Categories
Database Development

Can’t create procedure when specifying language plpgsql

Why does the following fail with SQL Error [42601]: ERROR: syntax error at or near "insert" Position: 54 create or replace procedure insert_company() as $$ insert into public.company(name, age, adress, salary) values (‘Paul’, 32, ‘California’, 20000.00); $$ language plpgsql; And why is this fine? According to the documentation this should work. create or replace procedure […]

Categories
Mastering Development

PySpark RDD programming code to create paired rdd and filter for given datasets

I am new to PySpark rdd programming, how can I create a pairrdd from external dataset Employee.txt with Id as key and rest as values? using the same pairrdd how to find out employees whose salary lesser than 20000? File data is given below filename: Employee.txt dataset: ID,Name,AGE,SALARY 101,A,21,8000 102,B,22,14000 103,C,23,7000

Categories
CMS Magento Mastering Development

Help to create form – now its neverending spinner magento2

I’m learning to create an UI components form, but stuck on neverending spinner. Help me to create this form, step by step, please. I have a module in adminhtml which shows a table from database. This table contains columns id, age, name, comment. I need to build an edit form which shows after click on […]

Categories
CMS Magento Mastering Development

Help to create form – now its neverending spinner magento2

I’m learning to create an UI components form, but stuck on neverending spinner. Help me to create this form, step by step, please. I have a module in adminhtml which shows a table from database. This table contains columns id, age, name, comment. I need to build an edit form which shows after click on […]

Categories
CMS Magento Mastering Development

Help to create form – now its neverending spinner magento2

I’m learning to create an UI components form, but stuck on neverending spinner. Help me to create this form, step by step, please. I have a module in adminhtml which shows a table from database. This table contains columns id, age, name, comment. I need to build an edit form which shows after click on […]