How to remove visited from required form fields, when the form is submitted in CxJS

Advertisements I have a from which has couple of required fields. When users submits the form, I clear all the fields, but then I get the ‘required’ red border around them. This is a problem, because the form shroud be clean, ready for a new submission. After submission, I expect fields to be cleared and… Read More How to remove visited from required form fields, when the form is submitted in CxJS

Trying to install postgres within docker container and containerizing django project

Advertisements I am new to docker and web-development generally. When trying to containerize my django-project I run into an error and can’t solve it for several days. The error might be silly, but I can’t find a solution. I’ll be very glad if someone helps me to solve me the problem. Thank you in advance.… Read More Trying to install postgres within docker container and containerizing django project

How to log value in karma

Advertisements Hi I’m trying to console log / console error from karma tests – but there is no any logs in terminal! it(‘should not delete card on deleteCard method if user cancels’, async(() => { const eventMock = jasmine.createSpyObj(‘event’, [‘preventDefault’, ‘stopPropagation’]); const testCard = testCards[1]; cardsServiceSpy.deleteCard.calls.reset(); actionSheetDismissService.canDismiss.and.returnValue(Promise.resolve(false)); console.log(testCard); component.deleteCard(eventMock, testCard).then((dataOnDelete) => { console.log(dataOnDelete); expect(dataOnDelete).toBe(testCard.id); expect(cardsServiceSpy.deleteCard).not.toHaveBeenCalled();… Read More How to log value in karma

Kotlin duplicate items in list to create a new list of different objects with the same data

Advertisements I have two data structures: data class MyObjectA(val foo: String, val barA: String, val barB: String) data class MyObjectB(val foo: String, val bar: String) And I have a list with MyObjectA items: val mylistA = listOf( MyObjectA("aaa", "bbb", "ccc"), MyObjectA("ddd", "eee", "fff") ) I want to get a list with each object repeated, but… Read More Kotlin duplicate items in list to create a new list of different objects with the same data