-
Posts
125 -
Joined
-
Last visited
Everything posted by razvandragos29
-
are virusi arhiva nu o luati : ( Category: Trojan Description: This program is dangerous and executes commands from an attacker. Recommended action: Remove this software immediately. Items: containerfile:E:\UdemyUsr6\Rootkits and Invisible Software.part3.rar containerfile:E:\UdemyUsr6\Rootkits and Invisible Software\2- Download your training code and examples\3- Your ZIP package with source codes and examples .zip file:E:\UdemyUsr6\Rootkits and Invisible Software.part3.rar->Rootkits and Invisible Software\2- Download your training code and examples\3- Your ZIP package with source codes and examples .zip->Modules/10/rcmd/Release/__hide.exe file:E:\UdemyUsr6\Rootkits and Invisible Software\2- Download your training code and examples\3- Your ZIP package with source codes and examples .zip->Modules/10/rcmd/Release/__hide.exe asta mia dat Windows Defender
-
Salut am de facut pentru facultate un joc in visual basic .Am zis sa incep cu tutorialele de la new boston de aici .Imi puteti recomanda si alte surse ?
-
Nu e tarziu ,tu ai facut vreo ceva ?
-
Un cod si mie va rog pe privat daca vreti
-
Se pare ca sa descoperit pe Udemy Studio faptul ca exista un udemy downloader si ca cineva de pe grup posteaza pe un anumit forum cupoane free uitati aici pentru cei ce sunt pe grup https://www.facebook.com/groups/UdemyStudio/permalink/875788169109039/
-
nu stiu daca este si printre cele postate de tine insa am mai gasit si eu unu https://www.udemy.com/complete-android-java-apps-developer-course/?couponCode=FIRSTCOURSE2015
-
The Python Master Class: Become an expert programmer https://www.udemy.com/python-master-class/?couponCode=FREEBIE spunea autorul ca merge doar de 250 de ori deci grabitiva
-
Daca vrei sa stii ceva eu sunt la calculatoare in Galati dai un pm !
-
Bine ai venit esti la facultate in Galati la calculatoare ?
-
Da eu nu am inclus treaba cu an bisesc
-
Salut am realizat un generator de cnp nu stiu daca este "bun" pentru ceea ce am eu nevoie este de ajuns .Acesta este codul import java.text.DecimalFormat;import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Random; import java.util.Scanner; public class Cnp { public static void main(String args[]) { int sexPersoana = 0; Scanner introduAn = new Scanner(System.in); System.out.println("Introduceti anul: "); int an = introduAn.nextInt(); Scanner introduLuna = new Scanner(System.in); System.out.println("Introduceti luna: "); int luna = introduLuna.nextInt() - 1; Scanner introduZiua = new Scanner(System.in); System.out.println("Introduceti ziua : "); int ziua = introduZiua.nextInt(); System.out.println("Anul , luna si ziua au fost introduse "); System.out.println(); Calendar ziuaNasterii = new GregorianCalendar(); ziuaNasterii.set(an, luna, ziua); System.out.println("Ziua nasterii este " + ziuaNasterii.getTime()); Calendar cal1900 = new GregorianCalendar(); cal1900.set(1900, 0, 1); cal1900.clear(cal1900.MILLISECOND); Calendar cal1999 = new GregorianCalendar(); cal1999.set(1999, 11, 31); cal1999.clear(cal1999.MILLISECOND); Calendar cal1800 = new GregorianCalendar(); cal1800.set(1800, 0, 1); cal1800.clear(cal1800.MILLISECOND); Calendar cal1899 = new GregorianCalendar(); cal1899.set(1899, 11, 31); cal1899.clear(cal1899.MILLISECOND); Calendar cal2000 = new GregorianCalendar(); cal2000.set(2000, 0, 1); cal2000.clear(cal2000.MILLISECOND); Calendar cal2999 = new GregorianCalendar(); cal2999.set(2999, 11, 31); cal2999.clear(cal2999.MILLISECOND); Scanner sex = new Scanner(System.in); System.out.println("Introduceti sexul: "); String sexul = sex.nextLine(); System.out.println(); if (ziuaNasterii.getTime().after(cal1900.getTime()) && ziuaNasterii.getTime().before(cal1999.getTime())) { switch (sexul) { case "masculin": sexPersoana = 1; break; case "feminin": sexPersoana = 2; break; } } if (ziuaNasterii.getTime().after(cal1800.getTime()) && ziuaNasterii.getTime().before(cal1899.getTime())) { switch (sexul) { case "masculin": sexPersoana = 3; break; case "feminin": sexPersoana = 4; break; } } if (ziuaNasterii.getTime().after(cal2000.getTime()) && ziuaNasterii.getTime().before(cal2999.getTime())) { switch (sexul) { case "masculin": sexPersoana = 5; break; case "feminin": sexPersoana = 6; break; } } System.out.println("Sexul persoanei este " + sexPersoana); DecimalFormat formater = new DecimalFormat("00"); int getAn = ziuaNasterii.get(ziuaNasterii.YEAR) % 100; String getAnn = formater.format(getAn); int getZiua = ziuaNasterii.get(ziuaNasterii.DAY_OF_MONTH); String getZiuaa = formater.format(getZiua); int getLuna = ziuaNasterii.get(ziuaNasterii.MONTH) + 1; String getLunaa = formater.format(getLuna); System.out.println("S : " + sexPersoana + " AA " + getAnn + " LL " + getLunaa + " ZZ " + getZiuaa); Scanner introduJudet = new Scanner(System.in); System.out.println("Introduceti judetul : "); String judet = introduJudet.nextLine(); System.out.println(); int nrJudet = 0; switch (judet) { case "GALATI": nrJudet = 17; break; case "BRAILA": nrJudet = 9; break; } String getJudet = formater.format(nrJudet); System.out.println("S : " + sexPersoana + " AA " + getAnn + " LL " + getLunaa + " ZZ " + getZiuaa + " JJ " + getJudet); Random random = new Random(); int min = 1; int max = 999; int nrGenerat = random.nextInt(max - min) + min; DecimalFormat formatare = new DecimalFormat("000"); String getNNN = formatare.format(nrGenerat); System.out.println("S : " + sexPersoana + " AA " + getAnn + " LL " + getLunaa + " ZZ " + getZiuaa + " JJ " + getJudet + " NNN " + getNNN); System.out.println(); // // Inmultire pt cifra de control /////// int S = sexPersoana * 2; int AA1 = (getAn / 10) * 7; int AA2 = (getAn % 10) * 9; int LL1 = (getLuna / 10) * 1; int LL2 = (getLuna % 10) * 4; int ZZ1 = (getZiua / 10) * 6; int ZZ2 = (getZiua % 10) * 3; int JJ1 = (nrJudet / 10) * 5; int JJ2 = (nrJudet % 10) * 8; int NNN1 = (nrGenerat / 100) * 2; int NNN2 = (nrGenerat / 10) * 7; int NNN3 = (nrGenerat % 10) * 9; int cifraControl = S + AA1 + AA2 + LL1 + LL2 + ZZ1 + ZZ2 +JJ1 + JJ2 + NNN1 + NNN2 + NNN3 ; int cifraControlFinal; int rest = cifraControl % 11; System.out.println("restul este " +rest); if(rest == 10) { cifraControlFinal = 1; }else { cifraControlFinal = rest; } String controlFinal = Integer.toString(cifraControlFinal); StringBuilder cnp = new StringBuilder("").append(sexPersoana) .append(getAnn).append(getLunaa).append(getZiuaa) .append(getJudet).append(getNNN).append(controlFinal); System.out.println(cnp); } } Daca aveti vreo metoda prin care sa imbunatesc acest generator astept parerile voastre .Este scris destul de dezordonat din pacate
-
Da a mers mersi mult am facut acuma aceeasi greseala ..
-
@M2G am incercat sa adaug coloanele in metoda din clasa Conexiune insa tot nici un rezultat si nici dupa ce am schimbat cu ce ai dat tu . " aici model o sa fie inlocuit de instanta care ai creat-o in extragereTabel. Iar acea instanta nu are adaugate coloane." public DefaultTableModel extragereTabel() { DefaultTableModel model = new DefaultTableModel(); //...------------------------>>>>>>>>>>>>am incercat sa adaug aici mode.addColumn() --insa nici un rezultat return model; }
-
Salut ma chinui de cateva ore sa adaug datele dintr-o bd intr-un Jtable si nu reusesc ,datele din bd sunt aduse deoarece am incercat cu Syste.out.println si in consola imi apar toate datele . Am incercat sa pun Jtable intr-un Panel nu a mers nici asta , am incercat sa nu folosesc nici un LayoutManager si sa ii setez dimensiunile cu setBounds() insa apare doar un chenar mare si alb atat .Acesta este codul sper sa ma lamureasca si pe mine cineva . package proiect;import java.sql.Date; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.table.DefaultTableModel; import com.mysql.jdbc.PreparedStatement; public class Conexiune { private final static String jdbcUrl= "jdbc:mysql://localhost:3306/EvidentaPopulatiei"; private final static String user="root" ; private final static String pass=""; private final static String dbClass= "com.mysql.jdbc.Driver"; private java.sql.Connection conn; public Conexiune() { try { Class.forName(dbClass); java.sql.Connection conn=DriverManager.getConnection(jdbcUrl,user,pass); if(conn != null) { System.out.println("Am reusiit conexiunea la baza de date!!"); } } catch (ClassNotFoundException | SQLException e) { System.out.println("Eroare"); } } public void insertData(long cnp,String nume, String prenume, String sex, int idStagiuMilitar, int idStareCivila, String idDomiciliu, int idCetatenie,long parinti,int idLocalitati,Date dataNasterii) { PreparedStatement statement = null ; try { java.sql.Connection conn=DriverManager.getConnection(jdbcUrl,user,pass); String query = "insert into Persoana (cnp,nume,prenume,sex,idStagiuMilitar,idStareCivila,idDomiciliu,idCetatenie,parinti,idLocalitati,dataNasterii) " + "Values (?,?,?,?,?,?,?,?,?,?,?)"; statement=(PreparedStatement) conn.prepareStatement(query); statement.setLong(1, cnp); statement.setString(2, nume); statement.setString(3,prenume); statement.setString(4, sex); statement.setInt(5, idStagiuMilitar); statement.setInt(6,idStareCivila); statement.setString(7,idDomiciliu); statement.setInt(8, idCetatenie); statement.setLong(9, parinti); statement.setInt(10, idLocalitati); statement.setDate(11, dataNasterii); statement.execute(); conn.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public DefaultTableModel extragereTabel() { DefaultTableModel model = new DefaultTableModel(); try { java.sql.Connection conn = DriverManager.getConnection(jdbcUrl,user,pass); java.sql.Statement statement = conn.createStatement(); String query = "select * from Persoana"; ResultSet rset = statement.executeQuery(query); while(rset.next()) { long cnp = rset.getLong("cnp"); String nume = rset.getString("nume"); String prenume = rset.getString("prenume"); String sex = rset.getString("sex"); int stagiuMilitar = rset.getInt("idStagiuMilitar"); int stareCivila = rset.getInt("idStareCivila"); String domiciliu = rset.getString("idDomiciliu"); int cetatenie = rset.getInt("idCetatenie"); int localitati = rset.getInt("idLocalitati"); Date dataNasterii =rset.getDate("dataNasterii"); long parinti = rset.getLong("parinti"); model.addRow(new Object[] {cnp,nume,prenume,sex,stagiuMilitar,stareCivila,domiciliu,cetatenie, localitati,dataNasterii,parinti }); System.out.println(cnp); System.out.println(dataNasterii); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return model; } } metoda cu pricina este extrageTabel si aici am si partea de interfata grafica package proiect;import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class TableFrame extends JFrame { private JButton buton; private JTable table; private JPanel panel; public TableFrame() { super("TableForm"); table = new JTable(); panel = new JPanel(); buton = new JButton("Tabel"); buton.setBounds(500, 500, 150, 150); buton.setVisible(true); buton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { if (arg0.getSource() == buton) { Conexiune conn = new Conexiune(); DefaultTableModel model = new DefaultTableModel(); model.addColumn("Cnp"); model.addColumn("Nume"); model.addColumn("Prenume"); model.addColumn("Sex"); model.addColumn("StagiuMilitar"); model.addColumn("StareCivila"); model.addColumn("Domiciliu"); model.addColumn("Cetatenie"); model.addColumn("Localitati"); model.addColumn("DataNasterii"); model.addColumn("Parinti"); model = conn.extragereTabel(); table = new JTable(model); } } }); table.setVisible(true); table.setFillsViewportHeight(true); JScrollPane tableContainer = new JScrollPane(table); panel.add(tableContainer); setLayout(new BorderLayout()); add(buton, BorderLayout.PAGE_START); add(panel, BorderLayout.CENTER); setSize(600, 600); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } } PS:Am urmat exact indrumarile date in acest topic https://rstforums.com/forum/86400-adaugare-date-din-db-variabile-java.rst , model.addColumn() a fost pus si in metoda extrageTabel ();
-
Este posibil sa schimbam si sa setem noi de la ce videoclip sa inceapa ? Incerc sa iau un curs care are 170 de videoclipuri si in cele 5 minute imi ia doar 120 cam asa .
-
Am o problema dupa ce am inchis la un curs sa nu se salveze numai merge extensia am sterso si am puso din nou si tot nimic imi spune DONE la toate videoclipurile insa nu imi mai arata sa le salvez
-
Are cineva un cupon pentru cursul acesta https://www.udemy.com/javaspring/ sau pentru acesta https://www.udemy.com/javawebtut/
-
@florin_darck vezi ca a postat M2G link catre un torrent unde erau mai multe cursuri despre web cred nu stiu sigur ca este si acest curs acesta este linkul UDEMY Mega Pack 70 in 1 TORRENT _ BBHF
-
Cel mai bine inveti singur si cand ai o problema postezi pe forum sunt sigur ca vei fi ajutat de cineva. In mare parte sunt de acord cu ideea ta si asi participa la asa ceva insa dupa cum vezi sa incercat odata nu a mers si acum nimeni numai vrea sa se complice
-
Usr6 chiar am un proiect despre asa ceva la facultate mersi mult !
-
Mega Oferta 96% pentru un Web Developper si nu numai!
razvandragos29 replied to dragosh1904's topic in Off-topic
Daca sar putea sa imi trimiti si mie aceste materiale (video si cartile ) -
Salut cum am spus si in topicul trecut cel cu Delagation in java https://rstforums.com/forum/87471-delegation-java.rst invat dupa cartea Thinking in Java si am intampinat cateva probleme la acesta chestie. Am urmatorul exercitiu de facut din carte Modify Detergent.java so that it uses delegation aceasta este clasa Detergent.java class Cleanser {private String s = "Cleanser"; public void append(String a) { s += a; } public void dilute() { append(" dilute()"); } public void apply() { append(" apply()"); } public void scrub() { append(" scrub()"); } public String toString() { return s; } public static void main(String[] args) { Cleanser x = new Cleanser(); x.dilute(); x.apply(); x.scrub(); print(x); } } public class Detergent extends Cleanser { // Change a method: public void scrub() { append(" Detergent.scrub()"); super.scrub(); // Call base-class version } // Add methods to the interface: public void foam() { append(" foam()"); } // Test the new class: public static void main(String[] args) { Detergent x = new Detergent(); x.dilute(); x.apply(); x.scrub(); x.foam(); print(x); print("Testing base class:"); Cleanser.main(args); } } si acesta este rezolvare mea class Cleanser1{ private String s="Cleanser"; public void append(String a) {s+=a; } public void dilute() {append("dilute()") ;} public void apply(){append("apply()");} public void scrub(){append("scrub()"); } public String toString(){ return s; } } public class Detergent1 { Cleanser1 x=new Cleanser1(); public void append(String s) {x.append(s);} public void dilute() {x.append("dilute");} public void apply(){ x.append("apply()"); } public void scrub() { x.append("Aply()"); } public void foam(){ x.append("Foam()"); } public String toString(){ return x.toString(); } public static void main(String args[]) { Detergent x=new Detergent(); x.apply(); print(x); } } am cautat pe net rezolvarea exercitiului si am gasit asta http://greggordon.org/java/tij4/reusing/DetergentDelegation.java nu inteleg de ce tipu spune ca anumite metode erau delegate in totalitate si altele nu si de ce a suprascris metoda append in clasa Detergent deoarece in exemplu din carte acesta mostenea toatea metodele si rescria doar 2 din ele scrub si apply . Edit:Am gasit ghidul cu solutii al cartii care este realizat chiar de autor si a rezolvat acest exercitiu exact ca mine. PS:M2G mi-a spus sa fac acest topic "Intrebari Java" si cand am probleme sa postez aici in acest mod nu fac 100 de topicuri pentru toate probleme din carte .
-
Mersi mult am inteles este un mod bun de a nu folosi mostenirea in anumite situatii.
-
Salut invat in acest moment dupa Thinking in Java editia a 4-a si am intampinat o problema nu inteleg la ce se refera autorul prin "delegation" acesta este exemplu public class SpaceShipControls {void up(int velocity) {} void down(int velocity) {} void left(int velocity) {} void right(int velocity) {} void forward(int velocity) {} void back(int velocity) {} void turboBoost() {} public class SpaceShipDelegation { private String name; private SpaceShipControls controls = new SpaceShipControls(); public SpaceShipDelegation(String name) { this.name = name; } // Delegated methods: public void back(int velocity) { controls.back(velocity); } public void down(int velocity) { controls.down(velocity); } public void forward(int velocity) { controls.forward(velocity); } public void left(int velocity) { controls.left(velocity); } public void right(int velocity) { controls.right(velocity); } public void turboBoost() { controls.turboBoost(); } public void up(int velocity) { controls.up(velocity); } public static void main(String[] args) { SpaceShipDelegation protector = new SpaceShipDelegation("NSEA Protector"); protector.forward(100); }
-
Cum iau licenta ? cand dau pe serial no ma duce la o pagina care nu merge