Jump to content

jcole54321

Member
  • Posts

    32
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jcole54321's Achievements

  1. Hi all, I know it's not really computer based but it is an electronics question. Basically I want to build my brother a small electric go-kart, nothing overly fast, like 5-10 mph and I have an old table saw motor, it's a 0.3kw 1400rpm motor, I was wondering if this would be powerful enough to move about 100kg at a reasonable speed. Thanks
  2. Hi , any help anyone could offer would be greatly appreciated, basically im trying to write a server which allows multipul clients to connect and send messages to the server. so far i have a login working and the server allows multipul connections. however when i call the "Chat() funtion it only seems to allow each user to send one message. Yet it allows one client to send loads of messages without crashing, the error i get is : "ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine" ive looked online and it says the antivirus/firewall could be causing problems butt ive tried disabling both yet i still get the same problem. to me it seems like a problem with either the function of the multithreading. Any help would be massivly appreciated and the code is included below. Thanks in advance Sever code import socket import hashlib import threading s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(('127.0.0.1', 4000)) def Client_Connection(): YES = False while YES == False: Login = c.recv(1024).decode() FileName = "Login.txt" print(Login) if Login == "c1c224b03cd9bc7b6a86d77f5dace40191766c485cd55dc48caf9ac873335d6fc1c224b03cd9bc7b6a86d77f5dace40191766c485cd55dc48caf9ac873335d6f": YES=True print("OI") AddUser() else: file = open(FileName,"r") for line in file: print(line) if line == Login + "\n": YES=True message = "Welcome" c.send(message.encode()) Chat() else: print("NO") c.send("NO".encode()) file.close def AddUser(): FileName = "Login.txt" file = open("Login.txt" , "a") RecievedCreds = c.recv(1024).decode() print(RecievedCreds) file.write(RecievedCreds +"\n") file.close c.send("New Login Created\nRestarting server Please reconnect".encode()) c.close() def Chat(): MessageContents = "" while MessageContents != "end": message = "Welcome" c.send(message.encode()) MessageData = c.recv(1024).decode()#max number of bytes recv SplitMessage = MessageData.split(",") Sender,MessageContents = SplitMessage[0],SplitMessage[1] print(Sender,":", MessageContents) Disconnect() def Disconnect(): c.close() input("\n\n press enter to close") def Setup (): print("Listening: ") while 1: s.listen(10) #listen to 1 connection at a time global c c, addr = s.accept() print ("Connection from: ", addr) Client = threading.Thread(target= Client_Connection) Client.start() Setup() Client Code import socket import hashlib s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) def connect(): message="" print("Waiting for connection") s.connect(('127.0.0.1', 4000)) Login() def Login(): Username = input("Please Enter Your Username: ") Password = input("Please Enter Your Password: ") SendPass = hashlib.sha256(Password.encode()).hexdigest() SendUser = hashlib.sha256(Username.encode()).hexdigest() Credentials = SendUser + SendPass s.send(Credentials.encode()) print(Credentials) if Credentials == "c1c224b03cd9bc7b6a86d77f5dace40191766c485cd55dc48caf9ac873335d6fc1c224b03cd9bc7b6a86d77f5dace40191766c485cd55dc48caf9ac873335d6f": Admin() else: data = s.recv(1024).decode() if data =="Welcome": Chat() else: Login() def Admin(): NewUsername = input("Please enter the new Username: ") NewPassword = input("Please enter the new Password: ") SendNewPass = hashlib.sha256(NewPassword.encode()).hexdigest() SendNewUser = hashlib.sha256(NewUsername.encode()).hexdigest() NewCreds = SendNewUser + SendNewPass print(NewCreds) s.send(NewCreds.encode()) Return = s.recv(1024).decode() print(Return) def Chat(): NickName = input("Please enter a nickname: ->") message="" while message!= NickName+",end": message =NickName + ","+ str(input("Send: ->")) s.sendall(message.encode()) s.close() input("\n\n press enter to close") print("successfully disconnected from the server") connect()
  3. Hi everyone, My pc crashed and gave me a kernel error message which I found out had something to do with power. I looked at my psu voltages in the hardware monitor section of my bios and the 3.3v reading is 2.994 and highlighted in red. I was wondering if this means it time for me to buy a new power supply or if there could be a software fix. Before the crash I was having problems with the pc no posting or powering up for half a second then turning off again. (I found that one of the 24 pin connectors was missing it's plastic casing so I kinda getto fixed it but since then I have only had the crashing issue in Windows 10)
  4. Ok, update. It posts. Then does 3 short beeps. Pc runs for maybe a minute then powers of and restarts. Any idea?
  5. Yup, tried that. Nothing. Now getting 1 long 3 short (then 2 short But that's just no VGA detected)
  6. I've done that too ??. I mean I'm not 100% sure in how I clear the CMOS on this motherboard but I've done what the Asus website says.
  7. Yes, or at least I think I have. And I don't understand why it will boot kinda with all my ram in but not one stick or two
  8. Hi, I've tried that and I get a constant red dram led whenever I do it
  9. Hi all, I would love some help. I've had this pc, quite a while. Maybe 7 years or so ??. And all was fine until about 50 minutes ago. I was just chilling, Spotify, discord, the normal sorta stuff and it blue screened. After that it flat our refused to boot into windows 10 again. I tired startup repair, command prompt, safe mode. Nothing worked. After about 20 attempts to fix the BSOD i was getting to video output from the card and a post code error. I tried individual sticks of ram, nothing helped. Took the video card out and changed slots, no difference and even tried reseating the CPU. It's kinda an old ish machine but I am now getting one long beep, 3 short then a pause and 2 short beeps. The CPU is an i7. Couldn't tell you what gen. Think around 2011 kinda time. Asus p6x5803 motherboard. 32 GB of ram And an amd radion r9 270x Any help would be greatly appreciated. I won't be too sad if it's completely dead because it is quite old, I would just like to be able to use it still if it's not completely dead.. Looking for any help, even if it's just emotional ?. Thanks
  10. I was going to do something like that. I've got a fairly large sound system set up in my room. Maybe a summer project.
  11. We are talking proper like vista type shit. Amd athlon Dual core 3800+ @ 2gh 2gb ddr2 Geforce 250 graphics card
  12. Hi, I was wondering if anyone could give me some creative advice. Basically I have an old pc which is no good for gaming and isn't good enough to replace my media pc. I was wondering if someone could give me any ideas on what to do with it. No idea is a bad one ?
  13. Acer aspire v5 is all I know the snid number is 31215582066 I'm getting it from the Acer website but I have to come out of safe mode because edge isn't starting in safe mode because of something to do with the built in administrator account...
  14. As soon as I reinstalled the driver it messed up again I'm not sure what to do or what I'm doing wrong
×