Categories
Database Development

How to add “You are Friends” button instead, if user is not in the addfriends table?

How to add “You are Friends” button instead, if user is not in the addfriends table? Hi all, I have assigned a column called “friendshipstatus” as a DEFAULT Constraint =0 in “addfriends” table. Here the table :- CREATE TABLE addfriends( id INT AUTO_INCREMENT, fname varchar(255), lname varchar(255), email varchar(255), reg_date date, friendshipstatus int(11) DEFAULT 0, […]

Categories
Database Development

How to add “You are Friends” button instead, if user is not in the addfriends table?

How to add “You are Friends” button instead, if user is not in the addfriends table? Hi all, I have assigned a column called “friendshipstatus” as a DEFAULT Constraint =0 in “addfriends” table. Here the table :- CREATE TABLE addfriends( id INT AUTO_INCREMENT, fname varchar(255), lname varchar(255), email varchar(255), reg_date date, friendshipstatus int(11) DEFAULT 0, […]

Categories
Mastering Development

how to profile PyPy with vmprof?

I read the vmprof doc in https://vmprof.readthedocs.io/en/latest/vmprof.html And I try to to prof pypy, with the cmd: pypy -m vmprof –web hello.py Then i return that: /usr/bin/pypy: No module named vmprof I Try pip install vmprof then pypy -m vmprof –web hello.py But it doesn’t work yet! I am totally confused, can somebody tell me […]

Categories
Linux Mastering Development

How to take an average of time by grouping multiple columns in a csv file

I have file with comma delimiter, where my 6th field is time.I have to group the record based on first 3 fields and take average on 6th field time. Rest of the 4th and 5th field should populate the first encountered value Rid,rname,fid,fname,date,time 112,dmart,400,test[20200102].txt,apr-2,11:30 112,dmart,400,test[20200103].txt,apr-3,12:30 112,dmart,400,test[20200104].txt,apr-4,01:30 111,fagu,401,trader[20200105].txt,apr-7,02:09 111,fagu,401,trader[20200106].txt,apr-8,01:09 The average of time has to be […]

Categories
Linux Mastering Development

How to take an average of time by grouping multiple columns in a csv file

I have file with comma delimiter, where my 6th field is time.I have to group the record based on first 3 fields and take average on 6th field time. Rest of the 4th and 5th field should populate the first encountered value Rid,rname,fid,fname,date,time 112,dmart,400,test[20200102].txt,apr-2,11:30 112,dmart,400,test[20200103].txt,apr-3,12:30 112,dmart,400,test[20200104].txt,apr-4,01:30 111,fagu,401,trader[20200105].txt,apr-7,02:09 111,fagu,401,trader[20200106].txt,apr-8,01:09 The average of time has to be […]

Categories
Mastering Development

Failed Google App Engine deployment. No matching distribution found for pywin32==xxx

I have run gcloud app deploy for my Django application, but it fails with the following errors at the end of the build log: Step #1 – “builder”: Collecting pywin32==227 (from -r requirements.txt (line 63)) Step #1 – “builder”: Step #1 – “builder”: INFO `pip_download_wheels` had stderr output: Step #1 – “builder”: ERROR: Could not […]

Categories
Mastering Development

Decoder Implemented in VHDL refuses to assign certain signals [closed]

For some reason when I run my test bench, the signal Func (an enumerated type) is always its default value of LUI, even though it is initialized as NOP and always assigned. Additionally, for the instructions SLLI, SRLI, and SRAI (in the “00100” case), the correct value for the “immediate” signal is not assigned, and […]

Categories
Mastering Development

Troubles with task loop in discord python

I’m building a discord bot in python but getting some troubles about using a task loop : The bot shotdown after few loops without any particular event. client = discord.Client() @tasks.loop(seconds=120) async def checking_game(): await client.wait_until_ready() try: if checking_game.current_loop==0: await asyncio.sleep(15) date_actual = datetime.now().strftime(‘%Y-%m-%d %H:%M:%S’) print(“{} : Initializing…”.format(date_actual)) count_league=0 list_leagues = dbconnect.get_list_leagues_parsed(DB_local) for league in […]

Categories
Development System & Network

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build bfe8bf5b-8368-4db6-a64e-8272d269ed76 status: FAILURE

Hi I am trying to do a deploy, but I am always receiving this follow error: gcloud app deploy –promote File upload done. Updating service [default]…failed. ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build bfe8bf5b-8368-4db6-a64e-8272d269ed76 status: FAILURE. Build error details: {“error”:{“errorType”:”BuildError”, “canonicalCode”:”INVALID_ARGUMENT”,”errorId”:”19241AD3″,”errorMessage”:”INFO FTL version php-v0.17.0\nINFO Beginning FTL build for php\…… ”’ ”’ ” \”url\”: \”https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7ae. Check […]

Categories
Development

Read from binary file and convert to Text File [duplicate]

I have this input file “.dat” contains Students ID , fName , lName , and GPA but in a binary way (like this) Input File I need to read it and convert it to .txt file “As readable” This is my code but something is wrong I think. When I run it says > invalid […]