Better way to set cell

I started writing my first apps using MVC, and i dont know with code version is better on this pattern. In viewcontroller: let quantity = quantityProducts[indexPath.row] let nameProduct = productsArray[indexPath.row] cell.configurateWithItem(quantity: quantity, name: nameProduct) In cellClass: class NeedProductsTableViewCell: UITableViewCell { @IBOutlet weak var quantityLabel: UILabel! @IBOutlet weak var productNameLabel: UILabel! func configurateWithItem(quantity:String,name:String){ quantityLabel.text = quantity…

Details

DECODE function is not working in place of CASE statement in oracle

I have a stored procedure where I want to use DECODE function. So I use that like below select SAP_ID, DECODE(st.rank > 23, ‘PRE HOTO’, ‘POST HOTO’) as STATUSRANK from ( select a.sap_id, st.rank from R4G_OSP.ENODEB a left join APP_WFM.WFM_CANDIDATE_STATUS ST on st.status = a.ENODEBSTATUS WHERE a.sap_id = P_SAPID AND a.SCOPE IN (‘EnodeB-Connected_Fibre’,’EnodeB-Connected_MW’)); but its…

Details

How can I blur a part of image in opencv python

Mu code: import cv2 import numpy as np video_path = ‘icando.mp4’ cap = cv2.VideoCapture(video_path) tracker = cv2.TrackerCSRT_create() ret, img = cap.read() cv2.namedWindow(‘Select’) cv2.imshow(‘Select’, img) rect = cv2.selectROI(‘Select’, img, fromCenter=False, showCrosshair=True) cv2.destroyWindow(‘Select’) tracker.init(img, rect) while True: ret, img = cap.read() succcess, box = tracker.update(img) x, y, w, h = [int(v) for v in box] circle =cv2.circle(img,…

Details

How to keep list items that fall between two values

I would like to keep a set of items that fall between two values. Below is a representation of the list I have: List = [‘Waste’,’Waste’,’Start’,’Data’,’Data’,’End’,’Waste’,’Waste’] I need to keep the ‘Data’ strings. Desired result below. Res = [‘Start’,’Data’,’Data’,’End’] I’m currently converting the list to a string, splitting on ‘Start’, converting back to a string,…

Details