I'm working with VB.net 2010. I need an windows form where i can select scanner's connected to my pc and then scan image and save it by a save dialogbox.... Waiting for help.....

Member Avatar
Member Avatar
+0 forum 7

0 down vote favorite I have created a network scanner, that looks for a specific port on a range of IP's. I would like to thread the application but I am getting and error message ERROR: for worker in range(network.hosts): TypeError: 'method' object cannot be interpreted as an integer Now I understand why the error is there it is because the IP Address is not an INT. However, what I would prefer to do is split the subnet into equal parts and run X number of IP's on a per thread bases. Example Thread 1 192.168.1 - 30 Thread 2 …

Member Avatar
Member Avatar
+0 forum 1

What is the mistake in this code, I am able to print the total digits of the input number, but when I try to print the *actual number* from the scanner it always prints zero(0). For example the user enters **123456** as the input, and my program is correctly returning the count in this case it is **6**. Here is my code import java.util.Scanner; public class CountNumbers { public static int count(int number) { int i = 0; while(number > 0 ){ number = number / 10; i ++; } System.out.println("The length of the "+ number +" is : " …

Member Avatar
Member Avatar
+0 forum 3

This class is intended as a small and simple alternative to java.util.Scanner for people in the early stages of learning Java. Unlike Scanner it has built-in error handling and retry, it throws no checked exceptions, is as tolerant as possible of variations in the format of user input, and avoids “gotchas” like Scanner’s nextInt/nextLine. Using it is as simple as UserInput ui = new UserInput(); String name = iu.getString(“Enter name:”); int age = ui.getInt(“Enter age:”); double salary = ui.getDouble(“Enter salary:”); The `isYes(String prompt)` method returns a boolean suitable for yes/no questions, e.g. do { … while (ui.isYes(“enter more data?”)); An …

Member Avatar
Member Avatar
+3 forum 1

I've always been bad with regular expressions syntax. I am converting text into Bezier curves, polygons, etc. Part of that is identifying points in the form `(x,y)` where x and y are coordinates in a graph. I am extracting x and y as doubles and creating Point objects with those two double values. I'm having problems with the white space. I cannot assume that there will be white space and I cannot assume that there won't be white space. Here's my attempt to extract three points from a String with some random white space thrown in. String str = "( …

Member Avatar
Member Avatar
+0 forum 9

Hello everyone, i want to develop a Asset system for my Final Year project using QR Code scanner, the QR Code will be taped at all asset and using this system, user will login and this system will be access via their phone and user will scan the qrcode. from the result after scan, system will send GET id=[result scanner] to show the asset details. the problem is, how can i put the scanner and can get access to the phone camera to scan the QR Code? Thanks Friends.

Member Avatar
Member Avatar
+0 forum 6

How do I display the individual integers from the scanner input stream for example if the user enters 500 I would like to display it as 5, 0, 0. Here is the code guys import java.util.Scanner; public class Digit { public static void main(String[] args) { int number, i = 0, num, digits; int[] digit; Scanner input = new Scanner(System.in); System.out.print("Please enter the digit: "); try{ number = input.nextInt(); num = number; digits = 0; while(num > 0){ digits = num % 10; digit = new int[]{digits}; num = num / 10; i++; } System.out.println("The length of the given: "+number+ …

Member Avatar
Member Avatar
+0 forum 16

I'm running Arch Linux with the LXDE DE, if it matters. I want to be able to plug in my HP Deskjet F4480 All-in-One and be able to scan. I tried following instructions on forums by googleing, but came to no sucessful conclusion. I uninstalled all software I installed and came here for some straight-forward help. Anyone?

Member Avatar
Member Avatar
+0 forum 2

My code is not compile and run Code is Below import java.util.Scanner; class Input { public static void main(String arg[]) { int rno; System.out.print("Enter Your Name = "); System.in.nextInt(rno); } } i think if System.out.println() is run then upper code should have to run but not run please solve this problem

Member Avatar
Member Avatar
+0 forum 10

I was thinking if someone could help me to connect the Bar code scanner with Visual Basic 6.0? Help me please.!

Member Avatar
Member Avatar
+0 forum 8

Hi. My company makes use of Motorola scanners to scan barcodes into the system through a C# application. A driver (Symbol COM Port Emulation Driver v 1.8.5) has been installed on the computers to make the scanner behave as simple COM Port Emulation and when the barcode is scanned, we are able to capture the text serially through the serialPort_DataReceived event. The application works fine on Windows XP and but does not work on Windows 7 64 bits as the Symbol COM Port Emulation Driver is not compatible. I have contacted Motorola for support and the response was to send …

Member Avatar
Member Avatar
+0 forum 1

What I'm attempting to do is read a text document to pass in variables into an arraylist of shape objects that I will use to create shapes. I don't need any help with the actual drawing of the shapes, working with the arraylist, or the initial scanning setup. I thought about doing a while loop to read each word/int using the single whitespace in between as the delimiter. Where I get stuck is what exactly I should do with information I don't need. For example, I would test the line to see if it said start via an if statement. …

Member Avatar
Member Avatar
+0 forum 10

I get an unknown source error when I try to use the Scanner class. fabric is the name of my Scanner ojbect. while(fabric.hasNext()) { fabricID[fabricCounter] = fabric.nextInt(); name[fabricCounter] = fabric.next(); description[fabricCounter] = fabric.next(); price[fabricCounter] = fabric.nextDouble(); qty[fabricCounter] = fabric.nextInt(); vendor[fabricCounter] = fabric.next(); fabricCounter++; System.out.println("made it down here"); }//end while fabric.close(); }//end try catch(IOException e) { System.out.println("Nope on the reader"); }//end catch System.out.println(fabricID[2]); System.out.println(name[2]); System.out.println(description[2]); System.out.println(price[2]); System.out.println(qty[2]); System.out.println(vendor[2]); But if I change my while(fabric.hasNext()) to while(fabric.hasNextInt()) it skips over the whole while section. What am I missing with Scanner? Any help is greatly appreciated.

Member Avatar
Member Avatar
+0 forum 9

Hi Everyone, I am trying to get the program below to work correctly. The line below is where I'm having trouble. (line 33 in PrefixCalc.java) calc = new ExpressionTree(new Scanner(console.nextLine())); When I run the program and enter "4 + 8", the scanner only picks up "4". Apparently this program was developed using the Scanner from Java 5. How do I get the entire line into a Scanner object? *** I found this program online at http://penguin.ewu.edu/cscd300/Topic/ExpressionTree/ExpressionTree.pdf. This is not my program. I am just learning from it. *** /** * Prefix calculator: generate the expression tree, then display it * …

Member Avatar
Member Avatar
+0 forum 4

![IMG_5690_(Small)](/attachments/small/3/IMG_5690_(Small).JPG "align-left") At a whopping 33 pounds, the Laserjet Pro 400 M425dn is certainly nothing compared to the massive printers you'd see in major offices or computer labs, but comes packed with everything you'd need for your small business or home office. While the printer strangely focuses black & white printing only, it comes backed with a wide variety of other features, including HP's brand new web printing, App system (preloaded with tons of gimmicky goodies,) and of course your usual scanner and fax machine. The M425dn seems to be a lot like a step-up, slightly bigger, 65 lbs cousin, …

Member Avatar
Member Avatar
+0 forum 2

I have a simple USB barcode reader which I intend to use to scan COD 39 barcodes. I know that just scanning the barcode while having a text field on focus will get me the text input of the barcode I'm scanning. However my requirement is a bit different. I need to create a C# application where upon reading a barcode it will check the read barcode with a list I have to see whether it exists. The problem is I cannot keep a text box on my app in focus all the time as the app does other things …

Member Avatar
Member Avatar
+0 forum 6

This is the block of data I have to work with: 5 5 5 6 5 8 9 5 6 8 good, very good, excellent, good 7 7 8 7 6 7 8 8 9 7 very good, Good, excellent, very good 8 7 6 7 8 7 5 6 8 7 GOOD, VERY GOOD, GOOD, AVERAGE 9 9 9 8 9 7 9 8 9 9 Excellent, very good, very good, excellent 7 8 8 7 8 7 8 9 6 8 very good, good, excellent, excellent 6 5 6 4 5 6 5 6 6 6 good, average, …

Member Avatar
Member Avatar
+0 forum 1

Hi everyone, I am using this method to read in a collection of ints and strings then converting the strings to numbers using the switch statement(as stated by my lecturer) and save it back into an array for further processing. However, everytime it gets to the line studentResponses[row][column] = scanner2.nextInt(); I get the error: **java.util.InputMismatch exception: null (in java.util.Scanner)**. I have spent so long trying to figure out what could be causing this error to no avail so any guidance at all would be appreciated :) public void readMarksData(String fileName, int numberOfStudents, int responsesPerStudent) throws FileNotFoundException { studentResponses = new …

Member Avatar
Member Avatar
+0 forum 2

This prompt scanner works outside of this program but when i integrate it, it doesn't work: All code work. just no together. Help would be much appreciated. Scanner in = null; Scanner key= new Scanner(System.in); System.out.print("Input file name: "); try { String filename = key.nextLine(); in = new Scanner(new File(filename)); } catch (FileNotFoundException e) { System.out.println ("File not found!"); System.exit (0); } Code that works with set file. import java.util.Scanner; import java.io.*; public class Stringy { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Scanner keyboard = new Scanner(System.in); int action; int word = 1; int line …

Member Avatar
Member Avatar
+0 forum 4

Hi! So i'm trying to code a program that works like an ATM machine. You 'insert a card' and then enter your pin. once the program has verified your pin, you may continue on to the next steps which include making a deposit, withdraw, printing a monthly statement and checking your balance. I'm trying to use the scanner class in my main method to prompt the user to enter the value for their pin. I can get the scanner to say that, and allow me to enter a pin, but then it just stops and doesnt verify that pin and …

Member Avatar
Member Avatar
+0 forum 1

hi what i want is to separate a file in many variables and store it in an arrayList to use it for creating objects and printing. The file is as follows: L1234; Land; 50000 euros; 120 sq.m.; Artemida Attikis; near the sea; for sale FF4234; Flat; 120000 euros; 72 sq.m.; floor 1; 2 bedrooms; Abelokipoi Athens; for sale HC178; House; 250000 euros; 120 sq.m.; 4 bedrooms; Menidi; for sale FL2; Flat; 105000 euros; 70 sq.m.; floor 2; 2 bedrooms; Patisia Athens; sold H12311; House; 310000 euros; 180 sq.m.; 5 bedrooms; Anthoupoli; for sale H12621; House; 280000 euros; 200 sq.m.; 5 …

Member Avatar
Member Avatar
+0 forum 7

Hello, I'm Mirza and I'm in the first semester of an IT university. I like to experiment with Java, and occasionally I run into problems. Now, I've been visiting daniweb for quite a while now, and I've always found solutions to my problem, but this particular problem I just can't seem to solve/find the solution for. The goal: Write a program where the user can specify how many subjects a student has. Input names of subjects. Input grades ofsubjects. Output subject - grade list. Output average score. The problem: The 18th line gets skipped while the rest of the code …

Member Avatar
Member Avatar
+0 forum 10

Hello ! I'm the ultimate beginner in programming. I have some experience in php and vba, doing my own scripts as I need them, especially in excel. Recently, for a project at works, I need to be able to scan **AUTOMATICALLY** (say every 2 minutes) from **multiple scanners** (say 2 for starters) **both connected to the same computer**. I decided to use this project as a start point for me to get a feeling of Visual Basic. So here we go, I installed visual studio express 2010 and started writing my script trying to find here and there bits of …

Member Avatar
Member Avatar
+0 forum 2

I need to write a program that can draw stuff on a frame, let's say, trees. Their IDs, colors, positions etc. are in a **txt file**, line by line, the first word of the line is the name of their type which will be the name of the subclass. These parameters are given by the **"Trees" class**. The **drawing method of the various types of trees** are written in **subclasses**. So I thought I should make a **class for getting the data from the text file** and then pass the scanner as a parameter to the Trees class' constructor, where …

Member Avatar
Member Avatar
+0 forum 8

Hello!!! mmm am learning OOP in Java ... and now I'm facing a prob in reading/writing .txt file here's my code: import java.util.Scanner; import java.util.Formatter; import java.io.File; import java.io.FileNotFoundException; public class Tester { public static void main(String[] args) { Scanner scan = null; Formatter formatter = null; File fileI; File fileO; fileI = new File("/home/amir/workspace/ForExam1/src/Class1/input.txt"); fileO = new File("/home/amir/workspace/ForExam1/src/Class1/output.txt"); try { scan = new Scanner(fileI); formatter = new Formatter(fileO); } catch (FileNotFoundException e) { e.printStackTrace(); } int first = scan.nextInt(); formatter.format("%d", first); } } and here the input.txt file: 123 The code is generating the "output.txt" file put it's empty, …

Member Avatar
Member Avatar
+0 forum 2

Gents as you can see I have done great progress in getting the last line and the line beforelast working and spliting but I am stuck now as I need to the beforethat (3rd) line from last also included and I can't figure it out, everything i do fails to compile or fails to run. Any suggestions? Scanner scanner = new Scanner(new File(resultfile)); String last = null; String beforelast = null; String beforethat = null; while (scanner.hasNextLine()) { beforelast = last; last = scanner.nextLine(); } String arr[] = last.split(","); RecordID1.setText(arr[0]); RecordID2.setText(arr[1]); RecordID3.setText(arr[2]); RecordID4.setText(arr[3]); RecordID5.setText(arr[4]); String arg[] = beforelast.split(","); RecordID6.setText(arg[0]); RecordID7.setText(arg[1]); …

Member Avatar
Member Avatar
+0 forum 1

![IMG_5674016](/attachments/fetch/L2ltYWdlcy9hdHRhY2htZW50cy8zL0lNR181Njc0MDE2LmpwZw%3D%3D/300 "align-left") These days scanners are no longer the flat-bed monstrosities of yesteryear, but have instead evolved into the sheet-fed beasts of today, capable of scanning dozens of pages in a matter of minutes. While some advertise their portability, or ability to easily organize your documents (such as with the [Neatdesk](http://www.daniweb.com/hardware-and-software/pc-hardware/usb-devices-and-other-peripherals/reviews/400825/can-the-neatdesk-really-replace-your-file-cabinet),) the HP Scanjet Enterprise 7000 S2 focuses on really just one thing: Scanning ridiculously fast. While the powerful Scanjet 7000 S2 may carry with it the HP enterprise name, it seems to be having a hard time deciding if it’s for enterprise or [SMB](http://en.wikipedia.org/wiki/Small_and_medium_businesses) (Small / Medium Business) instead.The …

Member Avatar
Member Avatar
+0 forum 2

Hi, I'm doing a study planner in java. I'm doing a simple login system. For every user who registers a text file is created holding all of the information inputted during registration. This is the code of a method which the program uses to login the user: public void loginUser(){ r = new Registration(); r.username = txtUser.getText(); r.password = txtPass.getText(); try{ String line; SubjectFrame subject = new SubjectFrame(); BufferedReader f = new BufferedReader(new FileReader(r.username + ".txt")); while((item = f.readLine()) != null){ if(line.equals(r.password)){ dispose(); subject = new SubjectFrame(); subject.setSize(700,600); subject.setLocation(100,100); subject.setVisible(true); }else{ System.out.println("No"); } } f.close(); }catch(Exception e){ JOptionPane.showMessageDialog(null, "Wrong information!", …

Member Avatar
Member Avatar
+0 forum 3

Hey, Im trying to extract numbers from a scanner, but im having problems extracting them all. Primarily i need it to * read a text file which contains some text and numbers. * go through the file and locate all numbers * differentiate between numbers contained in bracket (3), and those on their own 3. String[] anArray = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; while(scanfile.hasNext()) { /* add counter up on digits 1-9 on each line * so numbers 1-9 are check on each line */ for(int i =0;i<anArray.length;i++) { if(declarations.hasNext(anArray[i]){ System.out.println("number found"); scanfile.next(); …

Member Avatar
Member Avatar
+0 forum 2

Hello, I just needed some help with a code error. When I compile the code below, I keep getting this error: Program2.java:12: error: ';' expected Scanner keyboard = new Scanner(System.in); 1 error Could somebody please let me know what I am doing wrong? Thanks. import java.util.Scanner; // Needed for Scanner class import java.text.DecimalFormat; // Needed for decimal place amounts public class Program2 { public static void main(String[] args) { BankAccount account; // To reference a BankAccount object double balance, // The acounts's starting balance interest rate // Create a Scanner object for keyboard input. Scanner keyboard = new Scanner(System.in); // …

Member Avatar
Member Avatar
+0 forum 4

The End.