Jump to content

arvark

Member
  • Posts

    827
  • Joined

  • Last visited

Everything posted by arvark

  1. Hello, I'm having a problem, when I go to sleep I leave my PC on, every morning I find it turned off (HP Spectre x360), probably some hybernation setting, but every time this happens, the external monitor doesn't get input, I tried another PC and it worked, so the problem must either be my laptop or t he usb dongle I use to connect it to the monitor, I tried reinstalling the drivers etc. Only solution seems to try n amount of times plugging and unplugging until it works Any solution?
  2. Hello, I've got a question, how is saved data managed with android apps and windows programs? Do they use encrypted files or encrypted databases? I'm in Grade 13 (last year of HS in my country) currently studying IT, last year I've worked with Java and we'd save and load data from a file (be it txt or some other format, so basic stuff), this year we're working with databases and I'm wondering, common android apps or windows programs that rely on the device itself to keep the data, do they save it in a local db or do they just save stuff in an encrypted file?
  3. package clientclasse; import javax.xml.bind.annotation.*; @XmlRootElement(namespace = "hertz.javaxmlparser.jaxb") public class Classe { @XmlElementWrapper(name = "classe") @XmlElement(name = "studente") Studente[] Studenti; public Classe() { } public Classe(Studente[] Studenti) { this.Studenti = Studenti; } public Studente[] getStudenti() { return Studenti; } public void setStudenti(Studente[] Studenti) { this.Studenti = Studenti; } } CLASSE package clientclasse; import javax.xml.bind.annotation.*; @XmlRootElement(name = "studente") @XmlType(propOrder = { "nome", "cognome", "eta" }) public class Studente { String nome; String cognome; int eta; public Studente() { } public Studente(String nome, String cognome, int eta) { this.nome = nome; this.cognome = cognome; this.eta = eta; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public String getCognome() { return cognome; } public void setCognome(String cognome) { this.cognome = cognome; } public int getEta() { return eta; } public void setEta (int eta) { this.eta = eta; } } STUDENTE
  4. Already did all that, the problem is the sending/recieving at the end, even if I send a messagge saying ("aaa") it would still not work.
  5. Thanks, but it's for my homework, so I have to use this technique
  6. Hello, I've developed a simple client/server app for my homework, the client makes an XML file out of data you input, sends it to the server, the server takes the XML, transform it in an object array and sends back some data, thing is, even if I pw.println() and pw.flush, the client doesn't recieve anything, and even stuff that worked before, doesn't work anymore if I put the br.readLine() in the client. CLIENT package clientclasse; import java.util.Scanner; import java.net.*; import java.io.*; import javax.xml.bind.*; public class ClientClasse { /** * @param args the command line arguments */ static Socket S; static InputStream is; static InputStreamReader isr; static BufferedReader br; static OutputStream os; static PrintWriter pw; public static void main(String[] args) throws IOException, JAXBException { Scanner Scan = new Scanner(System.in); S = new Socket("localhost", 4000); is = S.getInputStream(); isr = new InputStreamReader(is); br = new BufferedReader(isr); os = S.getOutputStream(); pw = new PrintWriter(os); Classe C = new Classe(); Studente[] Stud = new Studente[3]; for (int i = 0; i < 3; i++) { System.out.println("Inserire i dati "); String cognome = Scan.next(); String nome = Scan.next(); int eta= Scan.nextInt(); Stud[i] = new Studente(cognome,nome,eta); } C.setStudenti(Stud); converti(C); //String etaMax = br.readLine(); //System.out.println("l'eta massima e': " + etaMax); // System.out.println("l'eta massima e':" + br.readLine()); System.out.println(br.read()); S.close(); is.close(); isr.close(); br.close(); os.close(); pw.close(); } static void converti(Classe C) throws JAXBException { JAXBContext context = JAXBContext.newInstance(Classe.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); m.marshal(C, pw ); } } /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package serverclasse; /** * * @author Anis */ import java.io.*; import java.net.*; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import javax.xml.bind.annotation.*; @XmlRootElement(namespace = "hertz.javaxmlparser.jaxb") public class ServerClasse { /** * @param args the command line arguments */ static ServerSocket SS; static Socket S; static InputStream is; static InputStreamReader isr; static BufferedReader br; static OutputStream os; static PrintWriter pw; public static void main(String[] args) throws IOException, JAXBException { SS = new ServerSocket(4000); while(true){ S = SS.accept(); is = S.getInputStream(); isr = new InputStreamReader(is); br = new BufferedReader(isr); os = S.getOutputStream(); pw = new PrintWriter(os); Classe C = riconverti(); System.out.println(C.getStudenti()[0].getCognome()); int etaMax = 0; for(int i = 0; i<3; i++) { if(C.getStudenti()[i].getEta()>etaMax) { etaMax = C.getStudenti()[i].getEta(); } } System.out.println(etaMax); pw.println(""+etaMax); pw.flush(); S.close(); is.close(); isr.close(); br.close(); os.close(); pw.close(); } } static Classe riconverti() throws JAXBException { JAXBContext context = JAXBContext.newInstance(Classe.class); Unmarshaller unm = context.createUnmarshaller(); Classe C = (Classe) unm.unmarshal(is); return C; } } SERVER Thanks
  7. Mmh something I'm interested in? As in? Like a specific area of development or what?
  8. By "know" I mean I've worked with them and know the syntax and could do a basic app/site/whatever with it, not that I've mastered them. Not sure if I misunderstood but I'm not claiming I am a full stack developer or anything, I just asked what languages could I add to my "portfolio" (again, not a portfolio of languages I mastered but a portfolio of languages that I've used, even as an hobby) if I ever want to become one!
  9. I've worked with Java but not with Javascript.
  10. Hello! I'm currently in Grade 13 (last year of HS in my country). I'm studying IT and I've always been a step in front of what we studied in school (I was studying C# when we were stil learning how to convert numbers from decimal to binaries, PHP and SQL a couple of years ago, while in school we're only doing it now) so I find it kind of boring. I currently know: C# C++ Java HTML CSS PHP SQL I've also used Python (but only on one of those codecademy style courses, I've never managed to develop a Python program, silly me). I've worked with Unity as well. What other languages (being it scripting languages like Javascript or full programming languages) would you advise me to learn to expand my portfolio (especially as full stack web dev
  11. Hello, I have a Xiaomi Mi Mix 2 with a broken screen, the touch works. I'm thinking of projecting the phone screen to the PC via Vysor or something else and try to recover some files. Vysor recognizes my PC but fails to install the APK. I have enabled USB Debugging, but it says "INSTALL_CANCELLED_BY_USER", from what I read it's because "Install via USB" option isn't enabled, I have no way to enable it unless I have another Xiaomi Mi Mix 2 with a normal screen so that I know where to press... Any idea how to project the screen to the PC?
  12. It's the old version (the better one, the new one wasn't as good), IIRC it's pretty decent
  13. Didn't give me the time to write it... GTX 970. As or right now i've tried unplugging and replugging the PCI-E connectors, and it seemed to work... I managed to finally install the drivers and it did give me signal.
  14. Hello, last year I've had the same problem and it solved randomly... Basically, after playing GTA V (only with that...) my PC freezes and doesn't recognize my GPU and I have to reboot and clear CMOS a bunch of times to get it to work (I can't understand how and why it solves itself), and today it started happening even when not playing GTA V. Yes, I've tried reinstalling the game. I'm trying to reinstall the drivers but the first time it froze, and this time it BSOD'ed. Now it is getting recognized but won't display signal... Jesus IDK what the hell is going on.
  15. My bad, I'm using FTTN so it's actually still DSL.
  16. You mean like fiber or ADSL? If so I'm a FTTN so it isn't fully fiber IIRC
  17. What do you mean? My router is connected to two outlets, one for power and another one through cables (which I think is the one that connects to the "internet"), http://prntscr.com/n5z2v1 something like this. Shouldn't moving this plug also move the cable? Pardon my ignorance but I'm really that fond of networks
  18. Hello, my wireless adapter only supports 2.4GHz, so instead of having 50Mbps+ I only have 10Mbps on my computer. My question is, instead of buying a new adapter or a longer ethernet cable (I have two but they are too short), I want to put my modem in my room, how can I do that? Do I just put the two plugs in an outlet in my room?
  19. Uhm yeah the Pi may be a good idea, I'll look into it. Yes I do use discord, that'd be a nice idea maybe.
  20. Thanks, but that'd be kinda hard since my pc is far away from my peephole, appreciate the input though.
  21. Hello, I have one (or maybe two) 1280x1024 monitor and I'd like to use them in some way. I've considered using one of them as a 2nd monitor but I'd hardly use it (I can't really think how that would be useful for me, but feel free to prove me wrong). I thought of using it for a digital peephole in some way but I have no idea how I can connect the monitor through my spare webcam (yes I know digital peepholes exist but it's not really a necessity, but if I could find a way to do it w/ my webcam+monitor without spending much I'd do it).
  22. Now it seems it's magically fixed, both crashing and detecting, and no I haven't tried it, but I will if it persists! thanks a lot!!
  23. Owned by Asus, I have one, never given me problems (although I am facing problems now but IDK if it's for the Mobo or GPU... But yeah 3+ years with no problem)
  24. After another reboot now the bios fix doesn't even work anymore EDIT: It works but randomly... if I press reset button or soft reboot it doesn't work, if I emergency shutdown the pc it does...
×