Categories
Mastering Development

SQL_ Extract failure/restoral events per user only if they are consecutive

I have a table for certain failure and restore events for users. I would like to find time difference between failure and restore event of every user. Also for some failure events, there are multiple restore events, I want to find time diff only between consecutive ones. And, there might be multiple failures before restores. […]

Categories
Mastering Development

Loop over array of user ID’s in postgresql

I have 2 tables in a postgresql database: 1 with user information (table: users, fields: user_id, username, full_name) and a with a user relation (table: relations, fields: relation_id, user_id_1, user_id_2). I have a website where a user can login. Say user ID = 1. I want to have a page where I can fetch a […]

Categories
Mastering Development

C Problem with the arrays( I think) || Programm for basic arithmetic operations N

I have a problem with my code… I want to input N numbers, for example if my N is 4 I want to calculate 1 2 3 4 with 10 20 30 40. (1 and 10, 2 and 20 etc. ) But my program calculates 1 and 2, 3 and 4, etc. So what can […]

Categories
Mastering Development

MySQL group by timestamp difference

I need to write mysql query which will group results by difference between timestamps. Is it possible? I have table with locations and every row has created_at (timestamp) and I want to group results by difference > 1min. Example: id | lat | lng | created_at 1. | … | … | 2020-05-03 06:11:35 2. […]

Categories
Mastering Development System & Network

Telnet issues between docker networks

in a host machine (its LAN ip is 192.168.0.94), I have the following services 1) mysql , its docker-compose.yml is as below. It creates a bridge network called mysql_default´╝îit is assigned a VIP 172.24.0.2 version: ‘2’ services: mysql: image: mysql:5.7 restart: always container_name: mysql volumes: – /etc/localtime:/etc/localtime – /data/mysql:/var/lib/mysql ports: – 3306:3306 2) nacos, its […]

Categories
Development

MATLAB: Does there exist a smart way to remove adjacent (x,y) points stored in some array?

Does there? I am thinking specifically about some matrix array where the rows correspond to x and y coordinates, e.g. 4 3 4 5 5 4 3 4 4 4 such that (4,3) and (4,5) etc. are (x,y) points. The problem is this: If one of the points in the list is surrounded adjacently by […]

Categories
Development

Logistic regression using customer survey data in Python

I have a project which I’m not sure how to implement. I need to build a logistic regression using customer survey data to predict NPS (actually, the coefficients are more important for this use case). I feel confident using various machine learning data sets, but I have several concerns about customer survey data. My questions […]

Categories
Development

MySQL – Array in cell

My scenario is that I have a table that stores classes at a school. Each class is a row in the table. One of the fields in there is the class period that the class is offered in. Some are only offered one period, some are offered multiple periods, some are offered every period. In […]

Categories
Development

MySQL – Array in cell

My scenario is that I have a table that stores classes at a school. Each class is a row in the table. One of the fields in there is the class period that the class is offered in. Some are only offered one period, some are offered multiple periods, some are offered every period. In […]

Categories
Development

Most efficient way of storing objects with corresponding indices

I want to store a collection of Points, which are objects of the class Point. (Point contains properties as positionX, positionY, electricalPotential, etc.) Each of them should have an index i, but the don’t need to be ordered in any way. This is why I used a dictionary Dictionary<int, Point> meshpoints in the first place. […]