Categories
CMS Mastering Development Wordpress

How to prevent multiple post with same meta value being created simultaneously in WordPress (with ajax)

I’m trying to make my own appointment system for WordPress. For this, I created a post type called "appointments". When users select a service from the service list, the available dates and times are listed. When the available date and time are selected and the appointment is created, a meta key named "appointment_datetime" is added […]

Categories
Database Development

Log all users activity in SQL SERVER as history to trace users’ queries [duplicate]

I need to log the below attributes at a new table when any user or application contact and query anything in the SQL server. Remote Machine Name. Remote Machine IP. Server Name OR IP connected. Action Date. Type of Access. The username – used for login. DB Name connected. Queries executed. I try to do […]

Categories
Database Development

Log all users activity in SQL SERVER as history to trace users’ queries

I need to log the below attributes at a new table when any user or application contact and query anything in the SQL server. Remote Machine Name. Remote Machine IP. Server Name OR IP connected. Action Date. Type of Access. The username – used for login. DB Name connected. Queries executed. I try to do […]

Categories
CMS Magento Mastering Development

Magento2.2.6 Module not working, unable to show pay cash option in the my account section of the customer

Our Store is build using Magento 2.2.6 What we are trying to achieve: In our store we am trying to let my customers select Cash On Delivery as the payment method, when the our delivery person visits the customer. we want to provide an option in the customer’s my account section to make the payment […]

Categories
CMS Magento Mastering Development

How can I override Magento/Customer/Model/AccountManagement?

I need to override below from AccountManagement: public function authenticate($username, $password) { try { $customer = $this->customerRepository->get($username); } catch (NoSuchEntityException $e) { throw new InvalidEmailOrPasswordException(__(‘Invalid login or password.’)); } $customerId = $customer->getId(); if ($this->getAuthentication()->isLocked($customerId)) { throw new UserLockedException(__(‘The account is locked.’)); } try { $this->getAuthentication()->authenticate($customerId, $password); // phpcs:ignore Magento2.Exceptions.ThrowCatch } catch (InvalidEmailOrPasswordException $e) { throw […]

Categories
Development

C#: How do I create an instance with a generic while it has been declared as object

I am facing a problem where I want to create an instance of a SomeClass<T> where T is giving by the method, but SomeClass<T> is added to a dictionary that is declared like ConcurrentDictionary<OtherClass, SomeClass<object>>. What I want to do does not compile because Type ‘T’ doesn’t match expected type object private readonly SemaphoreSlim semaphoreSlim; […]