Categories
Mastering Development

not getting fullscreen background or font

I don’t know what is wrong. I am supposed to go to full screen, set background, and add text. I get full screen and the background color, but there is no text on screen. I am following a tutorial and I had to deviate and add super. Paint (g) and getContentPane (). setBackground (Color. PINK); […]

Categories
Mastering Development

Best subset of matrix with minimum number of co-occuring non NA values?

I have a N by T matrix of data (N >>T), which have many missing NA values. I am searching for the best row-subset of my matrix, such that any two rows N_i and N_j will have at least k>=2 co-occurring (i.e. occurring at same time t) non-NA values. To motivate this, my end goal […]

Categories
Mastering Development

detect rows with different ID’s but duplicate values pandas

I have a dataframe which collects readings from device. Sometimes there are multiple readings for same sample, and thats stored as seperate ID in my dataframe. Is there a way for me to detect the duplicated ID’s by using the columns that have same value? Sample dataframe: test_df = {‘ID’: [1,2,3,4,5,6], ‘Age’: [18,18,19,19,20,21], ‘Sex’:[‘Male’,’Male’,’Female’,’Female’,’Male’,’Female’], ‘Values’:[1200,200, […]

Categories
Mastering Development

OpenCV Figure Detection

It’s my first time working with openCV. I’m trying to recognize where the cubes are located, draw their contour and identify their color. I have been able to create contours for them but when I put their corner locations I see some overlaps and I cant figure out how to identify the number of cubes […]

Categories
Mastering Development

When does ndarray.T get updated?

In Numpy, you can transpose a ndarray with the transpose() method, but it has an attribute T as well. When a ndarray is altered, not only the return value of transpose() method, but also the attribute T is automatically updated at the same time. ndarray.transpose() is a function, so it is not to be wondered […]

Categories
Mastering Development

Multiple joins on the same table multiply counts

When I run multiple joins on the same table, the first join seems to be the only one to go through. For example, I’ll get results like this: ID, NAME, 200, 200 ID, NAME, 150, 150 ID, NAME, 100, 100 Where obviously the ticket count is clearly not the same as the time entry count. […]

Categories
User Help

Linux mint freezes when running SDL2 prgram

In the past couple SDL2 programs I’ve been developing the strangest error seems to pop up; whenever I run the program– after an arbitrary amount of time has passed– Linux mint freezes. I can’t move my mouse or do anything with the computer. My only option at that point is to push the power button […]

Categories
Mastering Development

Why are my enemy bullets not deleting when they touch my player [duplicate]

So I been trying make it so when my enemy bullet’s touch my player, it will disappear. My problem is that the bullets will randomly work for a couple of times then the next time it hits the player I get this error. eguns.pop(eguns.index(egun)) ValueError: <__main__.main_loop.<locals>.enemybullets object at 0x06F69E50> is not in list also here […]

Categories
Game Creation Mastering Development

SFML test app feels slow/clunky

Similar to this question https://stackoverflow.com/questions/33904998/sfml-extremly-slow-irregular-framerate, I have created a small program to experiment with SFML I have a very simple SFML test application on ubuntu 20.04 using SFML 2.5.1. There are three circles. One under user control and one bouncing left to right. Problems: The one moving left to right is not very fast. Even […]

Categories
Mastering Development

Pass arguments from one function to another

Here I have been developing a chat application. Here I want to load chat messages according to the email address of the user. Here I want to pass email address to the backend. In javascript, I want to pass email to LoadChat function from (".friend").each(function(x){. It shows in console.log in LoadChat function, immediatetly it becomes […]