horace's Profile User Rating: *****

Reputation: 371 Architect
Group:
Expert
Active Posts:
2,218 (0.69 per day)
Joined:
25-October 06
Profile Views:
10,354
Last Active:
User is offline Jul 26 2015 11:00 AM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
50

Latest Visitors

Icon   horace has not set their status

Posts I've Made

  1. In Topic: Send a message from my android phone to all my computers in my wi-fi n

    Posted 26 Jul 2015

    View PostTheRookie, on 25 July 2015 - 04:14 PM, said:

    It's me again :D/> How can I send a message (UDP message/TCP/IP or something similar) from my android phone to all my computers in the same wi-fi network?

    you could use UDP multicast
    http://www.tldp.org/...st-HOWTO-2.html

    in Java
    https://docs.oracle....oadcasting.html
  2. In Topic: Read the textfile

    Posted 21 Jul 2015

    you can read the file contents in a loop
    e.g. if the scanf() conversion is sucessful readnext line
       int size=0;
        while(fscanf(f,"%g",&xn[size])==1) size++;
    
    

    size then gives you number of elements read
    note for %g conversion specification xn should be float*
  3. In Topic: Get Total Price for Items

    Posted 21 Jul 2015

    define a member total type double and in actionPerformed() line 134 do a calculaion for the total cost, e.g.
               double a = (Double.valueOf(price));
               double b = (Double.valueOf(quantity));
              total=total+a*b;
               totalJTextField.setText(new Double(total).toString());
               priceJTextField.setText(price);
    
    
  4. In Topic: creating ArrayList of objects to access via user input vending machine

    Posted 21 Jul 2015

    have a look at the java tutorials
    https://docs.oracle....avase/tutorial/
  5. In Topic: creating ArrayList of objects to access via user input vending machine

    Posted 21 Jul 2015

    for a start your Drink class requires some members to hold the drink information and a constructor
    Drink(1, "Cola", 1.00)
    

    get that working than add your ArrayList

My Information

Member Title:
D.I.C Lover
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Norwich UK
Interests:
C/C++ including embedded code for dsPIC, PIC24, PIC32 and TMS320C6711
C#, VB.NET, Java
client/server applications using TCP, UDP, RMI, etc
Computer hardware, microcontrollers, interfacing, e.g. I2C, SPI, CANBUS, etc
Years Programming:
30
Programming Languages:
C,C++,Java,C#,VB.NET

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Comments

Page 1 of 1
  1. Photo

    R@HUL Icon

    18 Jul 2015 - 00:13
    hey can you check your inbox please...
  2. Photo

    roosh.t3 Icon

    19 Jun 2015 - 23:42
    Hey, I need a help in C++, if you're willing to give a help :)
  3. Photo

    macosxnerd101 Icon

    31 May 2015 - 21:22
    Welcome back, horace! It's great to see you around DIC again. :-)
Page 1 of 1