Categories
Game Creation Mastering Development

Any ideas as to how a role playing game collision can be made in pygame WITHOUT the use of sprites

Would you use the player’s position X and Y and subtract the tiles X and Y so that if I were to touch the sides my character cannot pass through the specified tile? Is there some other type of thing going on that I don’t understand. (Just want to clarify I am trying to make […]

Categories
Database Development

To generate a script to drop or map the orphan users in a SQL Server Instance

I am very new to SQL Server. i have a script which will find the orphan users in all the databases and generate the script to either drop the users or map the user to correct login (If available).Since i want to run the script in vast number of servers, I thought of using powershell […]

Categories
Database Development

To generate a script to drop or map the orphan users in a SQL Server Instance

I am very new to SQL Server. i have a script which will find the orphan users in all the databases and generate the script to either drop the users or map the user to correct login (If available).Since i want to run the script in vast number of servers, I thought of using powershell […]

Categories
Database Development

To generate a script to drop or map the orphan users in a SQL Server Instance

I am very new to SQL Server. i have a script which will find the orphan users in all the databases and generate the script to either drop the users or map the user to correct login (If available).Since i want to run the script in vast number of servers, I thought of using powershell […]

Categories
Linux Mastering Development Ubuntu

New Ubuntu install. Still have old Ubuntu install on old drive?

2yrs ago I bought an cheap Windows laptop to install Ubuntu on. I installed Ubuntu and formatted/removed Windows completely. The install went great and the laptop worked great. Last year I decided to upgrade that laptop: I installed an M2 drive (and some more ram). When I upgraded I decided to make the M2 my […]

Categories
Mastering Development

Why file.flush() in Python function is skipping lines when called after each csv.writerow()?

I am writing csv files from a dictionary variable using csv.writerow() and I need to see lines after I write into csv, for this purpose I am using file.flush() in the following way: import csv def get_header(filetype): headers = { "memory": ["ts","kbmemfree","kbmemused","%memused","kbbuffers","kbcached","kbcommit","%commit","kbactive","kbinact","kbdirty",], "cpu": ["ts","CPU","%usr","%nice","%sys","%iowait","%steal","%irq","%soft","%guest","%gnice","%idle",], } return headers[filetype] json_objs = [{‘cpu’: {‘%usr’: 11.63, ‘%idle’: 2384.38, ‘%guest’: […]

Categories
Linux Mastering Development

Backup Linux with Rsync & Send Backup Directory to Zip

Two Part Question PART ONE: I want to use the the following rsync command to back up my Ubuntu 18.04 file system starting at / during an Ubuntu Live Session (meaning my file sys), but I am not sure if I all the necessary / recommended excludes and I am not sure if my syntax […]

Categories
Linux Mastering Development

CPU load and CPU usage impact on processes

I have looked into a fair bit of online forums and blogs to understand the impact of CPU load and CPU usage on processes. By CPU Load I mean the Load average which appears in top command. 1min, 5min, 15min averages CPU usage I mean the percentages mentioned in top command. Idle, Sys, User So […]

Categories
Mastering Development

After creating an exe file with fc_freeze there are problems with the packages statsmodel and scipy

I have programed the tool ‘csv-data-analyze’. (an analyze and statistic-tool) The code is based on python3. I use additional packages. The tool run in python environments very well. Due to the factor, that the most people only want to use program without install python environment, I have tried to create an windows program with the […]

Categories
Mastering Development

sorting columns by two criteria

I got a list of results, which I’d like to sort by two criteria. I performed first sorting on the sys column: systems = {‘BzBz_S’:0,’BzBz_PD34′:1,’MeMe’:2} sorted_results = sorted(results, key = lambda e: (systems[e[0]])) and passed to DataFrame df = pd.DataFrame(sorted_results,columns = [‘sys’,’dis’,’basis’,’Energy’]) This gives me the following output: ,sys,dis,system,basis,Energy 0,BzBz_S,10.0,BzBz_S_10.0,S,0.02562465 1,BzBz_S,3.2,BzBz_S_3.2,S,1.48510297 2,BzBz_S,3.3,BzBz_S_3.3,S,-0.25086498 3,BzBz_S,6.0,BzBz_S_6.0,S,-0.11827975 4,BzBz_S,3.9,BzBz_S_3.9,S,-2.44705244 5,BzBz_PD34,0.4,BzBz_PD34_0.4,PD34,-1.88172312 […]