Jump to content

Search the Community

Showing results for tags 'java'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Par boot.lv forumu
    • Foruma noteikumi
    • Raksti
    • BOOT.lv foruma informācija
    • Biežāk uzdotie jautājumi (BUJ)
    • Akcijas, pasākumi un jaunumi
  • Datortehnikas programmatūra un operētājsistēmas
    • Windows
    • Unix, Linux, BSD utml.
    • MacOS, Un cita Apple programmatūra
    • Programmatūra un interneta servisi
    • Programmēšana
    • Vīrusi, spams, spiegu programmas
  • Datortehnika
    • Datoru komponentes
    • Monitori
    • Datortīklu tehnika
    • Printeri / Skaneri
    • Portatīvie datori
    • Apple Macintosh datori un cita produkcija
  • Tehnika
    • Foto
    • Videokameras un video apstrāde
    • Audio un audio tehnika
    • SatTV, ciparuTV
    • Televizori / DVD, Blu-Ray tehnika
    • Kabeļi, akumulatori un citi aksesuāri
    • Dārza tehnika, apkure un ūdensapgāde
    • Virtuves un mājas sadzīves tehnika
    • Cita tehnika
  • Mobilie tālruņi / Radio ierīces / Internets / GPS
    • Mobilie tālruņi, viedtālruņi un planšetdatori
    • Mobilo sakaru operatori
    • GPS
    • Citas RF ierīces
    • Interneta provaideri
  • BOOT.lv tirdziņš
    • Pārdod
    • Pērk
    • Maina
    • Publiskais tirdziņš visiem
    • Atdodu par velti
    • Darbs, vakances, pakalpojumi
  • BOOT lietotāju DIY projekti
    • BOOT lietotāju IT/elektroniskie projekti
    • Overclocking jaunumi un jautājumi
    • Citi DIY projekti
  • Juridiskie jautājumi
    • Pirātisms un autortiesības
    • Darba ņēmēju tiesības un pienākumi
    • Patērētāju tiesības
    • Citas juridiskās lietas
    • Veikali, norēķini, bankas, kredīti
    • Nekustamais īpašums
  • BOOT.Lv diskusijas
    • Tehniska rakstura diskusijas
    • Izglītība, kursi, sertifikāti
    • Neietilpstošas tēmas par sadzīvi
    • Humors
  • BOOT.LV
  • GAMEZ Forums
    • Ražots Latvijā
    • Diskusijas par un ap spēlēm
  • BOOT.Lv Auto / Moto / Velo
    • Auto modeļi (BMW, Audi, Opel, Žiguļi u.c.)
    • Auto remonts, serviss, "šķūnings"
    • Satiksme, policija, fotoradari, CSN, autosports
    • Auto, velo, moto SPORTS
    • Auto un to daļu sludinājumi
    • Velosipēdi, mopēdi, skuteri, motocikli, kvadricikli

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. migelitto

    Java. Iegūt datus no .xls faila.

    Sveiki programmētāji. Taisu vienu projektiņu un esmu apstājies pie datu nolasīšanas no excel faila. meklēju googlē, bet katrs jaunais, ko atrodu, ir kompilcētāks par iepriekšējo un īsti triviālu (cik nu tas ir iespējams) neko nevaru atrast. Man ir jānolasa dati no excel faila, bet ne viss. Veidojas tabula ar, protams, nosaukumiem augšā. Viss kopā ir gads, iekļautas 2 sezonas - ziemas un vasaras. Tās sadalītas mēnešos. (tas pa kolonnām). rindas sadalītas pēc 4 citiem kritērijiem. Un man ir jāapstrādā pa kolonnām, pa rindām, pa sezonām un viss kopā. kā to lai izdara? apmēram? petiks ar linku uz LABU materiālu, klases (kas darbojās šajā sektorā) nosaukums utt. ļoti ceru, ka ir tādas lietas kā, piemēram, getCell(int, char); nu vai kkas tāds. Tnx!
  2. nuubik

    java client-server chat

    Tātad, man ir udevums, izmantojot internetu( kodus var meklēt arī internetā ) atrast un izpidīt sekojošu uzdevumu: Jāizveido čats, klients-servers programmu. Nepieciešams čatošanas rezultātus saglabāt failā/os (logošana) servera pusē. Programmu esmu atradis un pārbaudījis tās darbību, vienīgā problēma ir tāda, ka es nekādīgi nespēju izveidot operāciju, lai visu čatošanu programma saglabātu failā (os (logošana) servera pusē). Varbūt kāds varētu palīdzēt šajā sakarā? Kodi : Servera kods - package multithreadchatserver; import java.io.*; import java.net.*; public class MultiThreadChatServer{ static Socket clientSocket = null; static ServerSocket serverSocket = null; static clientThread t[] = new clientThread[10]; public static void main(String args[]) { int port_number=2222; if (args.length < 1) { System.out.println("Usage: java MultiThreadChatServer \n"+ "Now using port number="+port_number); } else { port_number=Integer.valueOf(args[0]).intValue(); } try { serverSocket = new ServerSocket(port_number); } catch (IOException e) {System.out.println(e);} while(true){ try { clientSocket = serverSocket.accept(); for(int i=0; i<=9; i++){ if(t[i]==null) { (t[i] = new clientThread(clientSocket,t)).start(); break; } } } catch (IOException e) { System.out.println(e);} } } } class clientThread extends Thread{ DataInputStream is = null; PrintStream os = null; Socket clientSocket = null; clientThread t[]; public clientThread(Socket clientSocket, clientThread[] t){ this.clientSocket=clientSocket; this.t=t; } public void run() { String line; String name; try{ is = new DataInputStream(clientSocket.getInputStream()); os = new PrintStream(clientSocket.getOutputStream()); os.println("Enter your name."); name = is.readLine(); os.println("Hello "+name+" to our chat room.\nTo leave enter /quit in a new line"); for(int i=0; i<=9; i++) if (t[i]!=null && t[i]!=this) t[i].os.println("*** A new user "+name+" entered the chat room !!! ***" ); while (true) { line = is.readLine(); if(line.startsWith("/quit")) break; for(int i=0; i<=9; i++) if (t[i]!=null) t[i].os.println("<"+name+"> "+line); } for(int i=0; i<=9; i++) if (t[i]!=null && t[i]!=this) t[i].os.println("*** The user "+name+" is leaving the chat room !!! ***" ); os.println("*** Bye "+name+" ***"); for(int i=0; i<=9; i++) if (t[i]==this) t[i]=null; is.close(); os.close(); clientSocket.close(); } catch(IOException e){}; } } Klienta kods: package multithreadchatclient; import java.io.*; import java.net.*; public class MultiThreadChatClient implements Runnable{ static Socket clientSocket = null; static PrintStream os = null; static DataInputStream is = null; static BufferedReader inputLine = null; static boolean closed = false; public static void main(String[] args) { int port_number=2222; String host="localhost"; if (args.length < 2) { System.out.println("Usage: java MultiThreadChatClient \n"+ "Now using host="+host+", port_number="+port_number); } else { host=args[0]; port_number=Integer.valueOf(args[1]).intValue(); } try { clientSocket = new Socket(host, port_number); inputLine = new BufferedReader(new InputStreamReader(System.in)); os = new PrintStream(clientSocket.getOutputStream()); is = new DataInputStream(clientSocket.getInputStream()); } catch (UnknownHostException e) { System.err.println("Don't know about host "+host); } catch (IOException e) { System.err.println("Couldn't get I/O for the connection to the host "+host); } if (clientSocket != null && os != null && is != null) { try { new Thread(new MultiThreadChatClient()).start(); while (!closed) { os.println(inputLine.readLine()); } os.close(); is.close(); clientSocket.close(); } catch (IOException e) { System.err.println("IOException: " + e); } } } public void run() { String responseLine; try{ while ((responseLine = is.readLine()) != null) { System.out.println(responseLine); if (responseLine.indexOf("*** Bye") != -1) break; } closed=true; } catch (IOException e) { System.err.println("IOException: " + e); } } }
×
×
  • Izveidot jaunu...