Categories
Mastering Development

Writing 5 nested queries

I am writing 5 five nested queries and every nested connects 2 or more tables AND this is tables and data that I want to apply to nested query Please help me make the Query in SQL language Create table Doctor ( Dr_ID int not null primary key, D_nam varchar(50) not null, Dr_addres varchar(90) not […]

Categories
Mastering Development

Mutate a new row based on further up rows. Trying to use somehting like dplyr::mutate but across rows

I have a small data frame: ga_sessions_combined <- structure(list(Metric = c(“Users”, “Bounces”, “Transactions”, “Revenue”), ym_201904 = c(5813, 2124, 193, 24923.155206), ym_201905 = c(7094, 2445, 257, 40361.46), ym_201906 = c(5647, 2049, 181, 26314.32 ), ym_201907 = c(5553, 1864, 144, 23678.14), ym_201908 = c(5392, 1811, 116, 16893.6), ym_201909 = c(5160, 1933, 121, 23635.754179 ), ym_201910 = c(7504, […]

Categories
Mastering Development

How to upload data to the IBM IoT Platform and Cloudant Database using HTTP APIs?

I am trying to upload my sensor data to the IBM IoT Platform and Cloudant database using https API. The command I use is curl -X POST “https://{orgId}.internetofthings.ibmcloud.com:8883/api/v0002/device/types/{deviceType}/devices/{deviceId}/events/{event_name}” -H “Content-Type: application/json” -d “EventPayload” -u ‘use-token-auth:{password}’ After I execute the command I am able to upload the data but the data I saw in IBM IoT […]

Categories
Mastering Development System & Network

MacOS Bonjour (ZeroConf) sleep issue

Bonjour work fine on “MacOS Server” for a very short time (1 – 2 min.). Call FTP via FileZilla from an other Mac. The server wake correctly: a download run in the usual way but the Mac return to sleep after 1/2 to 2 minutes. FileZilla report this errors: Connection timed out after 20 seconds […]

Categories
Mastering Development

Is there any modification on HED algorithm in python for enhancing edge detection

I am working on an image processing task using python which depends mainly in detecting the grains in the image of soil samples so the first step in the processing process is edge detection ,I use HED algorithm (holistically nested edge detection ) for this step rather than using other edge detection functions in python […]

Categories
CMS Development Magento

“Could not receive Stock Item data” Line Appear Instead of Admin Product Grid – Magento 2

“Could not receive Stock Item data” line appear instead of product grid in admin side. I have recently imported other db to my Cloud local setup. When I am doing indexing,I am getting error like this. SQLSTATE[HY000]: General error: 1449 The user specified as a definer (”@’%’) do es not exist, query was: DELETE price_index […]

Categories
Mastering Development

How to filter values in a time series where they previously were larger than a specific value

I am attempting to filter coral demographic data in a time series. I have a set of corals that have been measured every 3 months. What I want to do is a.) filter out all corals that at some point had a maximum diameter of 9, 10, or 11 mm and b.) remove corals that […]

Categories
Mastering Development

Efficient way to merge two dimensional array

I want to merge two lists which contain same number. Each list contains unique number and never matches more than one row of the other list. ([2, 1, 3, 4, 5] of listA only match a single row [1, 4, 3, 10] of listB) I wrote my code below in Python. Is there more efficient […]

Categories
Development

How contour an image area with known coordenates?

I have an ultrasound image and the coordenates (array of x and y points) of the tumour of each image. How can I make a contour around the tumour with those known coordenates using “cv.drawContours()”? I wish to delete all the information around the tumour and stay only with the tumour image/information. temp=np.array([[284., 60.],[276., 59.],[269., […]

Categories
Development

What is the equivalent to .Net Guid.ToByteArray() in Java

How can I convert the following .net usage of Guid.ToByteArray() to Java? var g= Guid.Parse(“9836f2b9-ba8c-42a6-b884-2e9eed9fb95a”); var ga = g.ToByteArray(); .Net Byte array returned ga= [185,242,54,152,140,186,166,66,184,132,46,158,237,159,185,90] Attempt in Java (Doesn’t match .Net array) UUID uuid = UUID.fromString(“9836f2b9-ba8c-42a6-b884-2e9eed9fb95a”); ByteBuffer bb = ByteBuffer.wrap(new byte[16]); bb.putLong(uuid.getMostSignificantBits()); bb.putLong(uuid.getLeastSignificantBits()); byte[] ga= bb.array(); Java Byte array returned ga= [-72,-124,46,-98,-19,-97,-71,90,-104,54,-14,-71,-70,-116,66,-90] Updated w/ solution […]