Search Results

Search found 19 results on 1 pages for 'rgksugan'.

Page 1/1 | 1 

  • What to learn in my summer holidays?

    - by rgksugan
    I am finishing my graduate and i am into a sotware company. I am a fresher and have some knowledge in Java and JEE. I can program servlets and JSP and have also developed some Swing applications. I dont have that much knowledge in web frameworks. I want to use my holidays usefully at the same time i dont want to spend a lot of time into programming. What can i learn. Suggest me something usefull. I prefer learning some programming tips/algorithms.

    Read the article

  • decompiling a DNS packet

    - by rgksugan
    I am trying to catch DNS packets which are sent from my system using Jpcap API. I have got an dns packet. I want to retrieve the ip address for which the DNS lookup is made. How can i get that?

    Read the article

  • how to open jquery ui dialog automatically when the page loads?

    - by rgksugan
    I need my dialog to open when the page is loaded automatically. What is the way to do it using jquery. Without any user interaction to open it. I tried this code but it dint work <script type="text/javascript" src="script/jquery-1.4.2.min.js"></script> <link type="text/css" href="css/jquery-ui-1.8.1.custom.css" rel="stylesheet" /> <script type="text/javascript" src="script/jquery-ui-1.8.1.custom.min.js"></script> <script type="text/javascript" src="script/jquery-ui.dialog.js"></script> <script type="text/javascript" src="script/jquery.bgiframe-2.1.1.js"></script> <script type="text/javaScript"> $(function(){ $('#dialog').dialog({ autoOpen: false, width: 600, buttons: { "Ok": function() { $(this).dialog("close"); } } }); $('#dialog').dialog('open'); }); </script> Please help.

    Read the article

  • Java Swing GUI exception - Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException:

    - by rgksugan
    I get this exception when i run my application. I dont have any idea what is going wrong here. Can someone help please. Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException: Vector Enumeration at java.util.Vector$1.nextElement(Vector.java:305) at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:778) at javax.swing.JComponent.getPreferredSize(JComponent.java:1634) at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78) at java.awt.Container.preferredSize(Container.java:1599) at java.awt.Container.getPreferredSize(Container.java:1584) at javax.swing.JComponent.getPreferredSize(JComponent.java:1636) at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:702) at java.awt.Container.layout(Container.java:1421) at java.awt.Container.doLayout(Container.java:1410) at java.awt.Container.validateTree(Container.java:1507) at java.awt.Container.validate(Container.java:1480) at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:669) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Read the article

  • My JVM crahes when i run my program.

    - by rgksugan
    I have written a program to process packets. The program runs well if its run alone but when i integrate it to my main project the jvm crashes and shows the below result. What is the problem? # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7dcf6e, pid=4328, tid=4068 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_16-b02 mixed mode, sharing) # Problematic frame: # V [jvm.dll+0x9cf6e] # # An error report file with more information is saved as hs_err_pid4328.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #

    Read the article

  • capturing dns packets using java

    - by rgksugan
    I want to log the websites visited in a system. So i decided to record the packets send by the system. I am using Jpcap API. I am able to record a lot of packets. Now what i want to do is i want to filter only DNS packets. I think that will be able to log the websites. I want a way to filter the DNS packets. How can I do it?

    Read the article

  • KeyListener problem

    - by rgksugan
    In my apllication i am using a jpanel in which i want to add a key listener. I did it. But it doesnot work. Is it because i am using a swingworker to update the contents of the panel every second. Here is my code to update the panel RenderedImage image = ImageIO.read(new ByteArrayInputStream((byte[]) get())); Graphics graphics = remote.rdpanel.getGraphics(); if (graphics != null) { Image readyImage = new ImageIcon(UtilityFunctions.convertRenderedImage(image)).getImage(); graphics.drawImage(readyImage, 0, 0, remote.rdpanel.getWidth(), remote.rdpanel.getHeight(), null); }

    Read the article

  • NetBeans open project problem.

    - by rgksugan
    I created a NetBeans project. I took the project folders zipped to another machine and tried opening it in NetBeans. NetBeans didn't identify it as a NetBeans project. I have transfered projects in this way before but why is it not working now? Are any of my project files corrupted. Is there any way to retrieve my files from this?

    Read the article

  • Why does Java Logging API create so many files?

    - by rgksugan
    I am using java logging api to log errors in my exception. I am writing these errors to a log file. When i run my program i find a lot of files created.There are around 50 files created. Is there any mistake in my code or is it normal? Here goes the code try { logger = Logger.getLogger(Reciever.class.getName()); fileHandler = new FileHandler("Applicationlog.log", true); logger.addHandler(fileHandler); logger.setLevel(Level.ALL); SimpleFormatter formatter = new SimpleFormatter(); fileHandler.setFormatter(formatter); } catch (IOException ex) { logger.log(Level.SEVERE, null, ex); } catch (SecurityException ex) { logger.log(Level.SEVERE, null, ex); }

    Read the article

  • how to store passwords in database?

    - by rgksugan
    I use jsp and servlets in my web application. i need to store passwords in the database. I found that hashing will be the best way to do that. I used this code to do it. java.security.MessageDigest d = null; d = java.security.MessageDigest.getInstance("SHA-1"); d.reset(); d.update(pass.getBytes("UTF-8")); byte b[] = d.digest(); String tmp = (new BASE64Encoder()).encode(b); When i tried to print the value of tmp, i get some other value.i guess its the hash value of the password. But when i persist this data to the database the original password gets saved there other than the value in tmp.. What is the problem???

    Read the article

  • KeybListener problem

    - by rgksugan
    In my apllication i am using a jpanel in which i want to add a key listener. I did it. But it doesnot work. Is it because i am using a swingworker to update the contents of the panel every second. Here is my code to update the panel RenderedImage image = ImageIO.read(new ByteArrayInputStream((byte[]) get())); Graphics graphics = remote.rdpanel.getGraphics(); if (graphics != null) { Image readyImage = new ImageIcon(UtilityFunctions.convertRenderedImage(image)).getImage(); graphics.drawImage(readyImage, 0, 0, remote.rdpanel.getWidth(), remote.rdpanel.getHeight(), null); }

    Read the article

  • Write a SQL to meet my requirement.

    - by rgksugan
    I have been trying to solve this problem for a lot of days. But wouldn't. Please help me. I need a SQL to list product_code, product_name, qty_sold, last_order_date for all the products that have been sold within a date range sorted by the number of quantity sold. My Table structure: tbl_product(product_id,product_code,product_name) tbl_order_detail(order_item_id,order_id,product_id,quantity) tbl_order(order_id,order_date)

    Read the article

  • couldn't start a java application as a windows service

    - by rgksugan
    I have written a java application which is a RMI server. I need to start rmiregistry to run this application and i also want my apllication to start automatically when the system starts. I have converted my application into a windows servise. When i try to start my service it shows this error Error 1067: The process terminated unexpectedly Is it because my program throws an exception when my application is started before the rmiregistry is started.

    Read the article

  • Formatting a byte array to string in java

    - by rgksugan
    I am using this code to find the MAC address of a machine.This code prints directly the MAC address, but i want to return it as a string.I am completely confused. please help. try { InetAddress add = InetAddress.getByName("10.123.96.102"); NetworkInterface ni1 = NetworkInterface.getByInetAddress(add); if (ni1 != null) { byte[] mac1 = ni1.getHardwareAddress(); if (mac1 != null) { for (int k = 0; k < mac1.length; k++) { System.out.format("%02X%s", mac1[k], (k < mac1.length - 1) ? "-" : ""); } } else { System.out.println("Address doesn't exist "); } System.out.println(); } else { System.out.println("address is not found."); } } catch (UnknownHostException e) { e.printStackTrace(); } catch (SocketException e) { e.printStackTrace(); }

    Read the article

  • How to sort data in a table data structure in Java?

    - by rgksugan
    I need to sort data based on the third column of the table data structure. I tried based on the answers for the following question. But my sorting does not work. Please help me in this. Here goes my code. Object[] data = new Object[y]; rst.beforeFirst(); while (rst.next()) { int p_id = Integer.parseInt(rst.getString(1)); String sw2 = "select sum(quantity) from tbl_order_detail where product_id=" + p_id; rst1 = stmt1.executeQuery(sw2); rst1.next(); String sw3 = "select max(order_date) from tbl_order where tbl_order.`Order_ID` in (select tbl_order_detail.`Order_ID` from tbl_order_detail where product_id=" + p_id + ")"; rst2 = stmt2.executeQuery(sw3); rst2.next(); data[i] = new Object[]{new String(rst.getString(2)), new String(rst.getString(3)), new Integer(rst1.getString(1)), new String(rst2.getString(1))}; i++; } ColumnComparator cc = new ColumnComparator(2); Arrays.sort(data, cc); if (i == 0) { table.addCell(""); table.addCell(""); table.addCell(""); table.addCell(""); } else { for (int j = 0; j < y; j++) { Object[] theRow = (Object[]) data[j]; table.addCell((String) theRow[0]); table.addCell((String) theRow[1]); table.addCell((String) theRow[2]); table.addCell((String) theRow[3]); }

    Read the article

1