Jump to content

Blade_792

Member
  • Posts

    70
  • Joined

  • Last visited

Awards

This user doesn't have any awards

System

  • CPU
    Ryzen 7 3700x
  • Motherboard
    ROG Strix B550-f Gaming (Wi-Fi)
  • RAM
    2× Corsair Vengeance LPX 8Gb 3600mhz
  • GPU
    EVGA GeForce RTX 2070 Super Black Gaming 8Gb
  • Case
    Corsair Carbide 275r Airflow
  • Storage
    Boot 1× Western Digital Green SSD sata 160Gb
    Gaming 1x Samsung 970 EVO Plus 500gb
    Other 1× Seagate Barracuda HDD 2Tb 7200rpm
  • PSU
    Corsair RM750 750w
  • Cooling
    Wraith Prism
  • Keyboard
    Logitech K120
  • Mouse
    Some chinese mouse
  • Sound
    Logitech G332
  • Operating System
    Windows 10 Home
  • Laptop
    Hp Ryzen 3 3200u with VEGA 3 8gb 2400mhz ram 250gb ssd
  • Phone
    Samsung Galxy J7 (2016)

Recent Profile Visitors

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

Blade_792's Achievements

  1. Thats the point, my pc is powerfull enough to run about 3 or 4 VM at the same time (tried while testing programm for a project) and right now i am not doing much other than gaming that, for the moment at least, is better on windows so i don't know what other advantage i get. Even because with a VM i can test some networking programm if i will write those again.
  2. Hi, i wanted to know what real benefit i have if i were to install a linux distro togheter with windows. I mainly play videogames but often (i study informatic tecnology) i write programs, mainly python, using visual studio as IDE. I didn't found much on that just that i would be able to use linux if i want to (and not on a VM, that is how i actually use it).
  3. To access, download and upload file from other device in and outside mi local network
  4. Sort of. I use that virtual machine on a dmz to connect from internet. I can use that to connect from when i am at school or somewhere else and i want/need to work at something. That way i don't have to carry file around. And it will also work as syncrhonisation repository for my laptop, my desktop and the windows virtual machines that i use to test my programm.
  5. i wanted to make a nas with a simple web interface, if possible with login, on my ubuntu desktop virtual machine. how can i do that?
  6. I have a linux machine that i use as a server. I wanted to set up a nas with it using python http.server or similar because i can access it from a web browser. The only problem is that i want to upload file other than download. How can i do it?
  7. i know its a pain but can you tell me how have you set up your server for non-lan user?
  8. thats what i need but i was not shure how to do it thanks. but when i declare them or in the class or outside the code give me x not defined, and i assume y too.
  9. i have thise code: from tkinter import * window = Tk() btn= [None]* 9 class Frame: #position of button array def BTNposition(): i= 0 c= 0 k= 0 while i< 9: #declaration of button array btn[i] = Button(window, height= 10, width= 20, borderwidth= 3) btn[i].place(x= c, y= k) i+= 1 if c == 300: k+= 150 c= 0 else: c+= 150 BTNposition() btnp_x= 0 btnp_y= 0 def click_position(eventorigin): global x,y x = eventorigin.x y = eventorigin.y print(x,y) """def GAME(): btn[i].destroy() check what button is pressed and it's coordinates""" i= 0 #while i< 9: #btn[i].bind('<Button-1>', GAME) window.bind("<Button 1>", click_position) window.title('PyTris') window.geometry("700x450") window.mainloop() i have to take x and y from the function click_position() and use them i other function, since i have about 2 days of experience with python, can someone help me?
  10. chat_function is a class. declaration: #ifndef CHAT_FUNCTIONS_H #define CHAT_FUNCTIONS_H #include "config.hpp" #include "UDP_function.hpp" class chat_function { public: //ARGOMENTI UDP_function udp; //METODI void ricezione_messaggi(); void Pulizia(char vettore[], int dimnecessaria, int dimreale); int cont_buffer(char buffer[]); void buff_out(char buffer[]); void creapacchetto(char buffer[], char nome[15], int op); void Copia(char vettdest[], char vettmitt[], int dim_vett); }; //void ricezione_messaggi(); #endif // CHAT_FUNCTIONS_H metods: #include "chat_function.hpp" #include "UDP_function.hpp" #include "config.hpp" #include <iostream> using namespace std; //ricezione dei messaggi con rispettiva formattazione void chat_function::ricezione_messaggi() //void ricezione_messaggi() { char buffer[BUFF_DIM]; int error= 0; unsigned long ip_address= 0; unsigned short port_number= UDP_PORT_HOST; Pulizia(buffer, 0, cont_buffer(buffer)); if (error= udp.UDP_receive(&ip_address, &port_number, buffer, sizeof(buffer))) { cout << "Errore: " << error << endl; } else buff_out(buffer); Pulizia(buffer, 0, cont_buffer(buffer)); } //pulizia dei buffer void chat_function::Pulizia(char vettore[], int dimnecessaria, int dimreale) { for(int i=dimnecessaria-1; i<dimreale; i++) vettore[i]=0; } //contatore dei caratteri di un buffer int chat_function::cont_buffer(char buffer[]) { int i= 0; while(buffer[i]!= '\0') i++; return i; } //formattazione dei messaggi ricevuti void chat_function::buff_out(char buffer[]) { int i; cout << "<"; for(i= 1; i< 16; i++) { if(buffer[i]== 32) break; cout << buffer[i]; } cout << "> "; for(i= 17; i< cont_buffer(buffer); i++) { cout << buffer[i]; } } //creazione del pacchetto da inviare void chat_function::creapacchetto(char buffer[], char nome[15], int op) { char password[15]; char messaggio[MESS_DIM]; char nome1[15]; if(op== 0) { cout << "Inserisci nome: "; cin >> nome; cout << "Inserisci password: "; cin >> password; while(strlen(nome)< 15) strcat(nome," "); strcat(buffer,"$"); strcat(buffer,nome); strcat(buffer,"0"); strcat(buffer,password); strcat(buffer,"\r\n"); } else if(op== 1) { Copia(nome1, nome, 15); Pulizia(nome1, 15, strlen(nome1)); cout << "Inserisci messaggio: "; cin.ignore(); cin.getline(messaggio, 400); strcat(buffer, "$"); strcat(buffer,nome1); strcat(buffer,"1"); strcat(buffer,messaggio); strcat(buffer,"\r\n"); } } //copia dei valori di un buffer in un altro void chat_function::Copia(char vettdest[], char vettmitt[], int dim_vett) { for(int i=0; i<dim_vett; i++) vettdest[i]=vettmitt[i]; }
  11. I am writing an UDP chat on c++ using object and the compiler give me this error: C:\Program Files (x86)\CodeBlocks\MinGW\lib\gcc\mingw32\4.9.2\include\c++\functional|1665|error: no type named 'type' in 'class std::result_of<std::_Mem_fn<void (chat_function::*)()>()>'| I call the thread only on this main: #include "chat_function.hpp" #include "UDP_function.hpp" #include "config.hpp" #include <cstring> #include <stdio.h> #include <iostream> #include <thread> #include <windows.h> using namespace std; int main() { chat_function CHAT; UDP_function UDP; char buffer[BUFF_DIM]; char buffer1[BUFF_DIM]; char ip_to_send[]= IP_ADDR_DEST; unsigned long ip_address= 0; unsigned short port_number= UDP_PORT_SERVER; char nome[15]; int op= 0; int error= 0; //thread receaving_thread; CHAT.Pulizia(buffer, 0, CHAT.cont_buffer(buffer)); UDP.UDP_init(UDP_PORT_SERVER); while(1) { CHAT.Pulizia(buffer, 0, CHAT.cont_buffer(buffer)); CHAT.creapacchetto(buffer, nome, op); strcpy(ip_to_send, IP_ADDR_DEST); // SENDER if (error= UDP.UDP_send(UDP.IP_to_bin(ip_to_send), UDP_PORT_SERVER, buffer, sizeof(buffer))) { cout << "Errore: " << error << endl; } else cout << "Messaggio inviato: \"" << buffer << "\"" << endl; if(op== 0) { CHAT.Pulizia(buffer1, 0, CHAT.cont_buffer(buffer1)); if (error= UDP.UDP_receive( &ip_address, &port_number, buffer1, sizeof(buffer1))) { cout << "Errore: " << error << endl; } if(strcmp(buffer1, WrongPass)== 0) { op= 0; cout << "Password Errata" << endl; } if(strcmp(buffer1, CorrPass)== 0) { op= 1; cout << "Password Corretta" << endl; thread receaving_thread(CHAT.ricezione_messaggi); } CHAT.Pulizia(buffer1, 0, CHAT.cont_buffer(buffer1)); } } UDP.UDP_close(); return 0; } what can i do to solve?
  12. i putted the bad modules in the slot that i know its working but i don't know how to test the other slot
  13. About a week ago one of my ram module died due to a short blackout and i was wondering is there any chance that the motherboard slot died to?
  14. I want to put a simple gui made in java for 2 different c++ programs (they have to be in the same gui). One is just a console otput that refresh itself endlessy and the other have some imput. How can i do it?
×