Categories
Mastering Development

How to test JSON response without name tags for the outer array using RestAssured library and Selenium using springboot

I get the following JSON in response to a REST service but without name tags for the outer array [ { “limitId”: 4, “limitValue”: “150”, “product”: “ALL”, “timeFrame”: “D”, “description”: “Deposit Limit”, “limitName”: “DEPOSIT_LIMIT” }, { “limitId”: 12, “limitValue”: “15000”, “product”: “ALL”, “timeFrame”: “M”, “description”: “Deposit Limit”, “limitName”: “DEPOSIT_LIMIT” }, { “limitId”: 9, “limitValue”: “1000”, […]

Categories
Mastering Development

Finding the max value in an ArrayList of integers using recursion

I don’t have much on this… my assignment is to create a recursion method that will output the highest value in an ArrayList of integers. public static int maxValue(ArrayList<Integer> a) { if (a.isEmpty()) throw new NoSuchElementException (“Can’t compute max of empty list.”); if(a.size()==1){return a.get(0);} else { //not sure what to add here for the recursion […]

Categories
Mastering Development

How to reset a CSS animation so that it runs everytime with only Javascript

I’ve implemented the solution from This thread and it still only runs once. Code: const ButtonClickFunction = (e,id)=>{ e.preventDefault() var el = document.querySelector(`.location-${id}`) el.style.animation = ”; el.style.animation = “addition 1s”; } From what I can tell, every time I click the button the elements animation is cleared, then set to the animation I want. But […]

Categories
Mastering Development

I am stuck on creating a loop to read 6 lines of a file at a time, saving each line to a variable to be used later for calculations

The project is to analyze a text data file and provide statistics from it. It is a fixed format file. We write a new fixed format file using data we read. What we do is read the First name, Last name , Age, current income, current savings , and raise. There is 606 lines of […]

Categories
Mastering Development

close current window by submenu item in ElectronJs

I have two windows opened as you see in this picture: screenshot I want to close smaller window by clicking on “close” submenu. here’s my code: const addMenuTemplate = [ { label:’file’, submenu:[ { label:’close’, click(){ //i dont know what to put here } } ] } ] what should I do ? I’ve already […]

Categories
Mastering Development

How to change the properties of an AutoCAD object programmatically in Python

I want to automatically process a bunch of AutoCAD drawings using Python. To that end I need to change the properties of the drawing entities programmatically. I’ve been struggling for a while, to no avail. This is the code I’m using to read the .dxf and open the .dwg files: import win32com.client import dxfgrabber import […]

Categories
Mastering Development

CNN Semantic segmentation network (UNET) performing poorly when tested with images

I am working on building a UNET semantic segmentation network, to detect the iris in eye images we are using DICE loss function and we achieved over 90% train mean IOU and around 87% on validation data but the validation loss and mean IOU showed fluctuation during the 200 epochs, and when we tested our […]

Categories
Mastering Development

Create subgraph query in Gremlin around single node with outgoing and incoming edges

I have a large Janusgraph database and I’d to create a subgraph centered around one node type and including incoming and outgoing nodes of specific types. In Cypher, the query would look like this: MATCH (a:Journal)N-[:PublishedIn]-(b:Paper{paperTitle:’My Paper Title’})<-[:AuthorOf]-(c:Author) RETURN a,b,c This is what I tried in Gremlin: sg = g.V().outE(‘PublishedIn’).subgraph(‘j_p_a’).has(‘Paper’,’paperTitle’, ‘My Paper Title’) .inE(‘AuthorOf’).subgraph(‘j_p_a’) .cap(‘j_p_a’).next() […]

Categories
Mastering Development

Forward and Reverse animating multiple DIVs in sequence using CSS

So, I have a set of boxes placed around each other. But using CSS animations I want to hide all the boxes One by One at a time, when the last box is hidden, I want to show back all the boxes but in reverse order, where last box appears first and then 9th, 8th […]

Categories
Mastering Development

Do turning bluetooth on with Android makes it a beacon?

if i turn on bluetooth in iOS it will be discovered in beacon scanner, is it the same with Android? Or we should turn the android to be a beacon explicitly using any libraries like alt beacon? What am trying to achieve is to get RSSI from android by ONLY enabling Bluetooth.