Output On NI_9211_TC.vi THERMO READ
Hi,
we are using NI 9211_TC.vi module (THERMO READ), its inputs are cluster
type containing (TC0,TC1,TC2,TC3, CJC & Autozero) and selectable
type of thermocouple (type K in our case). ¿What about the outputs of
this vi? if we read and placed a indicator of the array output, they
are 8 elements. The first 4 of them seem to be temperatures 0 to 4 but
we do not know what the last four are.....
Thanks everybody
Hi Mallue
Actually the real size of that array is 4. Although you can see an eight position array indicator only the first four positions are filled.Those positions are for the four channels of 9211, besides you can see that the last four positions are disabled. This is normal . don't worry about it.
Thanks
Belens
Similar Messages
-
Xorg.conf is deleted. When computer boots output is too small to read
I was experienceing another error with xorg and noticed that my xorg.conf wasnt configured fully so I was going to go and reconfigure it.
Long story short, I have deleted my xorg.conf and need to regen a new one.
Problem:
My output is to small to read.
I have tried the "Arch Fallback" Grub option. it still goes to runlevel 5. If anybody knows how to get the thing into runlevel 3 that would allow me to not format and save lots of time.
Also i tried sshing into it and I get "connection refused" So i must not have ssh on. ... its not really important for this box as it is only a desktop box.
Last edited by chmoder (2009-02-27 03:40:20)chmoder wrote:
[tcross@Tom-Arch ~]$ scrot -cd5
Taking shot in 5.. 4.. 3.. 2.. 1.. 0.
Xlib: extension "Generic Event Extension" missing on display ":0.0".
[tcross@Tom-Arch ~]$
This is why i deleted my config file. am a wrong in thinking this is a misconfigured xorg.conf?
I looked arround and it sounds like i need to manually compile X. that sounds like it wont work to me. but maybe. I have an ATI 4650 using the proprietary driver. buying and ATI card was the worst choice i think.
Yes, you're wrong. That error means nothing, and can safetly be ignored (as annoying as it is).
And no, you shouldn't need to compile X. -
DVDXDV output file can't be read by FCp or Quicktime
I rip DVD's using DVDxDV pro, which delivers .mov files directly usable in FCP (or QT).
Recently i ripped 4 DVD,s, and the output files could not be read by FCP/QT.
The system gives two different messages: 'This is not a video file'
or: The movie cannot be opened.
The end of the file is reached
I need to start editing these files, has anybody a solution??
Thanx iaThanks guys, for the quick replies, I appreciate!.
1 The DVD's are not copyright protected.
2 I ripped about 16 files from 5 different DVD's, 5 can be read, 11 not. There is another strange thing, first i tried to rip the whole DVD's (45" to 1'30") that did not work (i assume files too big). Than I selected parts, that I ripped, and could be played the day of ripping... But not today (the day of editing)
And, VLC I already tried, did not play the ****... The files are more tham 1 Gb, so it is not a frame.
I played with the settings, but ended up with the FCP presets of DVDxDV pro -
Output Preview Not Saving to Reader
I'm assembling PDF files of a bulletin we publish into archives by year for web viewing using Adobe Acrobat X 10.1.7 (Mac). The files were originally created in PageMaker and the printer sent us PDF files for this project.
Everything is working fine except 3 of the files from one year (August, September, October) seemed to be missing the graphics. I found that by going to Output Preview and checking Simulate Overprinting they showed up.
I then saved it to another file, but when I opened it with Adobe Reader X 10.1.7 (PC) on another computer, the graphics were again missing for those 3 issues, though they showed up fine for the other issues in the PDF.
Under Preferences in Acrobat X I have Use Overprint Preview set to Always.
How to fix this?I really don't know much about overprint, but you haven't gotten any other replies. So let me try to give some thoughts.
I am wondering if this an issue of graphics and such in layers that might be resolved by doing a flattening of the PDF. That would hopefully put everything on one layer and avoid the overprint (OK, that is a guess). Maybe this at least gives you something to consider and may spark others to chime in who actually know more about the issue. -
Can a Didital output task be used to read a line
I have a digital output task, but I would like to be able to read the value of the line as well (to save me having to store the last value I wrote to it). I have tried, and it appears to work fine, but I can't find any hint that it is supported in the documentation. Intuitively I might expect that it would work.
Is it a legal operation (will it ever stop working in a future release!)?
Am I reading the actual value on the physical line, or some internally buffered version of the value I wrote?
My DO task is using programmed IO, on demand modes - and I am using DAQmxWriteDigitalScalarU32 to write values, and DAQmxReadDigitalScalarU32 to read them. These are some of the DO properties
**Task: Write Laser On
Task - Name: LASER
Task - Channels: Vestibular/port0/line31
Timing - Sample Mode: 10123 DAQmx_Val_ContSamps
Timing - Sample Timing Type: 10390 DAQmx_Val_OnDemand
Write - Wait Mode: 12547 DAQmx_Val_Sleep
Write - Sleep Time: 0.0010
Buffer - Output Buffer Size: 0
Channel - Output Data Transfer Mechanism: 10264 DAQmx_Val_ProgrammedIO
Thanks,
PaulHi Paul,
This is a legal operation on the NI-DAQMX, you can read the digital port lines current state and as far as I'm aware it's not expected to change in future releases. You are reading the actual current state of the line, I hope this answers your question.
Thanks,
Rob W
National Instruments
Application Engineer
Message Edited by rsw on 11-16-2007 03:48 AM
Message Edited by rsw on 11-16-2007 03:48 AM
Applications Engineer -
Hi, since updatig to Lion my iMac internet sharing is not working i have renamed to a shorter name as advised in other threads but this still does't work I wish to share my ethernet connection wirelessly but after turning it on i can never get the arrow symbol on the top bar. Also i can only play audio through the built in speakers but no headphones/external speakers even after playing with the audio midi settings as seen in other posts but no such luck.
First, see if you can change the "Play audio using:" selection in Edit > Preferences > Playback - if you select Direct Audio rather than Windows Audio Session this may address the issue. Note, however, that the Direct Audio option seems to be unavailable in some cases for Windows 8.1.
Otherwise, there is an alternative downloader for 64-bit editions of Windows here:
iTunes 12.1 for Windows (64-bit — for older video cards)
that seems to address the playback issues that some users have been reporting with the full 64-bit version (the alternative installer here is the same architecture as most previous "64-bit" versions of iTunes, i.e., a 32-bit application with a 64-bit installer). The "for older video cards" label appears to be something of a misnomer as some people have reported that this corrects problems found on current / high-spec systems.
After installing this alternative version it may still be necessary to adjust the "Play audio using:" selection in Edit > Preferences > Playback to restore glitch-free audio. -
High user input output (I/O) and physical reads
Hi guys
Recently we have noticed that our database performance degraded significantly. as we looked around in grid control we noticed that the user IO and Physical reads are really high which cause the database to be laggy.
at first we thought it was memory problem, so we added 2gb to sga. we have set sga to be automatic and it's been like this for the past 2 years.
how do i trouble shoot this problem. i haven't found any troubleshooting guide for it yet.
please instruct me on how to solve it
database: 10.2.0.4 sparc
regards
SinaTop 5 Timed events
db file sequential read 23,582 679 29 46.3 User I/O
CPU time 626 42.7
db file scattered read 3,089 70 23 4.8 User I/O
db file parallel write 3,478 28 8 1.9 System I/O
log file parallel write 4,201 24 6 1.7 System I/O
SGA Memory Summary
SGA regions Begin Size (Bytes) End Size (Bytes) (if different)
Database Buffers 2,768,240,640 2,835,349,504
Fixed Size 2,050,240
Redo Buffers 14,721,024
Variable Size 3,657,439,040 3,590,330,176
Process Memory Summary
Category Alloc (MB) Used (MB) Avg Alloc (MB) Std Dev Alloc (MB) Max Alloc (MB) Hist Max Alloc (MB) Num Proc Num Alloc
B Other 569.22 0 2.62 3.14 22 24 217 217
Freeable 101.63 0.00 0.77 0.45 3 132 132
SQL 91.51 45.35 0.44 0.76 4 78 209 192
PL/SQL 12.50 5.57 0.06 0.07 0 4 217 217
JAVA 5.40 5.38 1.08 0.09 1 2 5 5
E Other 603.20 3.03 3.62 22 24 199 199
SQL 115.21 64.78 0.60 1.67 21 78 191 182
Freeable 112.31 0.00 0.83 0.43 3 135 135
PL/SQL 13.89 5.94 0.07 0.12 1 4 199 199
JAVA 8.93 8.89 1.12 0.23 2 2
for some reason i can't paste a table into this post but if you want i can email you above tables -
How to read list output into itab? - URGENT
hai experts,
how to read current report output for further validation i need all data which is showing in output.
my req is,
to read list output all data put into itab.
reward avail for useful answer....
regards,
jai.mHi kumar,
you said your using second one.
it's good. then use the below part.but check the syntax because it is there in other programs what i have already phased.
INCLUDE <%_list>.
DATA %_LIST TYPE SLIST_LIST_TAB ." WITH HEADER LINE.
DATA %_LIST_WA TYPE SLIST_LISTLINE.
DATA: BEGIN OF data_tab OCCURS 0,
line(255),
END OF data_tab.
& Then use:-
LOOP AT %_list into %_list_wa.
data_tab-line = %_list-line.
data_tab-line = %_list_wa-line.
APPEND data_tab.
Clear data_tab.
Clear %_list_wa.
ENDLOOP.
kindly reward me if it's ok -
It was working fine until now, and now suddenly, the sound is gone. I've tried PRAM and SMC reset. Nothing works.
Using the same cable with my airport express, through airplay, the sound comes out fine.
It wasn't working when on Mavericks, nor now, on Yosemite.Hey marcalc,
Thanks for the question. I understand that you are experiencing issues with the digital output of your MacBook Pro. The following resource may provide a solution:
OS X Mavericks: If you can’t hear sound from your speakers
http://support.apple.com/kb/PH13841
If you’re trying to listen through a digital receiver
If you’re using your computer’s digital output port (not available on all computers), choose Apple menu > System Preferences, click Sound, then click Output. Make sure Digital Output is selected.
Make sure your computer is connected to a digital-ready receiver using an optical digital cable, and that your receiver is set up for digital input (see the information that came with your receiver).
Try adjusting the volume on your receiver. You can’t use the computer’s volume controls to adjust the volume while using digital output.
Thanks,
Matt M. -
Getting the Output Stream of a Process without exec()ing it first.
Hi there,
I am writing a java application which needs to open another application "gnuplot". Now my operating system is windows and I open pgnuplot .
Also I want to send input to the above gnuplot (say plot sin(x) ) via the outputStream. The following is what I do :-
String gnuplot_cmd = "plot sin(x)\n" ;
Process p = Runtime.getRuntime().exec("C:/gnuplot/gnuplot4/bin/pgnuplot.exe");
PrintWriter gp = new PrintWriter(p.getOutputStream());
gp.print(gnuplot_cmd);
gp.close();
But the above doesn't work fully , in that only the blank wgnuplot terminal window pops up however I am unable to direct input to the gnuplot application.
The reason being that , pgnuplot checks for
its stdin being redirected the moment it's started. If, at that time,
the "PrintWriter" is not yet connected to the OutputStream of the
process, that check will fail, and pgnuplot will revert to just executing
wgnuplot, without any command line redirection.
I am facing a problem of how to attach a OutputStream to the process, without getting exec()ing the process.
Is there anyway at all, i can get a process without starting it, so that I can attach an output Stream to it before it gets executed?
I am open to work arounds, anything that will automate the process of writing to the gnuplot terminal.
thanks!
nandita.The reason being that , pgnuplot checks for
its stdin being redirected the moment it's started.
If, at that time,
the "PrintWriter" is not yet connected to the
OutputStream of the
process, that check will fail, and pgnuplot will
revert to just executing
wgnuplot, without any command line redirection. I'm not convinced this analysis is correct. gnuplot doesn't need to know that there's a PrintWriter there, and it probably can't know. It just needs to know whether its standard input is coming from console or not. The Java library code that can invoke processes probably handles the redirect right away, and that's why there's the OutputStream available even before you create the PrintWriter.
exec can be tricky. I think the problem may be that you're not dealing with standard output or standard error. Read this:
When Runtime Exec Won't
If that still doesn't help, there may be options to gnuplot to tell it exactly where its input is coming from. -
Is it my Mac? Is there software I need? An app perhaps? This seems way too complicated to set up spkrs. I'm attempting to use 2 hdmi and 1 headphone outputs w/ control and varying levels (ie hdmi's quieter than desk spkrs) thanks for suggestions! -Tim
Hi Tim,
Not sure since I'm deaf,but if possible I'd think...
Open Audio Midi Setup in Applications>Utilities, see the input & output options & KHz setting there. -
December update fixes AJA output
I just got updates to CC this morning.
Kona3 now outputs to my broadcast monitor.I just got updates to CC this morning.
Kona3 now outputs to my broadcast monitor. -
Why can't i read lin slave response in xnet
Hello,
we have developed a small lin application that starts xnet schedulle and sends master frames and headers.
I am trying to read all the frames on the bus and unfortunately i only see the master frames. The slave headers from master are not filled by the slave.
We are using single point frame approach.
Also, i have observed that when i disconnect the slave from the network, the slave headers are send very fast(as it should be). But when i
connect the slave, the headers are sent more rare and the payload is not completed by the slave.
The slave is working ok! because we send frames manually without the schedulle and the slave always responded good.
Which seems to be the problem?It's hard to say, can you post your source? I've had success with LIN and XNet with signals, but haven't had a need to try frames yet. My setup is similar to what you described. I create two sessions for Signals Out Single-Point, and Signals In XY. Then I have a write LIN Schedule on the Signal Out session selecting a schedule from the database. Then I write Signal Single-Point on the Signal Output. Then periodically I read Signal XY using the Signal Input session. After doing this my read then returns all my signals once every 200ms or so, which is based on the schedule selected. I've never done frame on LIN but I assume it is similar.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously. -
Issuing two outputs at a time.
For a given invoice,we have to issue ouput(Smartform) to Bill-to-party with BP Address.
Also we need to check the buying group(KNB1-EKVBD) of sold-to-party with that of Bill-to-party. If the buying group of SP and BP is different,then we need to issue output also to Payer with PY Address(instead of BP Address).So in this case we need to issue two outputs : one for SP and another for PY with different addresses.
How can we achieve this? All suggestions are welcome.Hi Nikhil,
You will need some steps. First create an additional output type with exactly the same settings as RD00.
This output type should have a requirement that should only be processed in case the buying group differs.
Then in the smartform you should copy the address-node and both adress nodes should have a Condition: one to be processed in case of output type RD00 (regular invoice) and one with the condition to be processed in case of your newly defined output type.
Regards,
John. -
Why does this class not read and write at same time???
I had another thread where i was trying to combine two class files together
http://forum.java.sun.com/thread.jspa?threadID=5146796
I managed to do it myself but when i run the file it does not work right. If i write a file then try and open the file it says there are no records in the file, but if i close the gui down and open the file everything get read in as normal can anybody tell me why?
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import bank.BankUI;
import bank.*;
public class testing extends JFrame {
private ObjectOutputStream output;
private BankUI userInterface;
private JButton SaveToFile, SaveAs, Exit; //////////savetofile also saves to store need to split up and have 2 buttons
//private Store store; MIGHT BE SOMETHING TO DO WITH THIS AS I HAD TO COMMENT THIS STORE OUT TO GET IT WORKING AS STORE IS USED BELOW
private Employee record;
//////////////////////////////////////from read
private ObjectInputStream input;
private JButton nextButton, openButton, nextRecordButton ;
private Store store = new Store(100);
private Employee employeeList[] = new Employee[100];
private int count = 0, next = 0;
/////////////////////////////////////////////from read end
// set up GUI
public testing()
super( "Employee Data" ); // appears in top of gui
// create instance of reusable user interface
userInterface = new BankUI( 9 ); // nine textfields
getContentPane().add( userInterface, BorderLayout.CENTER );
// configure button doTask1 for use in this program
SaveAs = userInterface.getSaveAsButton();
SaveAs.setText( "Save as.." );
//////////////////from read
openButton = userInterface.getOpenFileButton();
openButton.setText( "Open File" );
openButton.addActionListener(
// anonymous inner class to handle openButton event
new ActionListener() {
// close file and terminate application
public void actionPerformed( ActionEvent event )
openFile();
} // end anonymous inner class
); // end call to addActionListener
// register window listener for window closing event
addWindowListener(
// anonymous inner class to handle windowClosing event
new WindowAdapter() {
// close file and terminate application
public void windowClosing( WindowEvent event )
if ( input != null )
closeFile();
System.exit( 0 );
} // end anonymous inner class
); // end call to addWindowListener
// get reference to generic task button doTask2 from BankUI
nextButton = userInterface.getDoTask2Button();
nextButton.setText( "Next Record" );
nextButton.setEnabled( false );
// register listener to call readRecord when button pressed
nextButton.addActionListener(
// anonymous inner class to handle nextRecord event
new ActionListener() {
// call readRecord when user clicks nextRecord
public void actionPerformed( ActionEvent event )
readRecord();
} // end anonymous inner class
); // end call to addActionListener
//get reference to generic task button do Task3 from BankUI
// get reference to generic task button doTask3 from BankUI
nextRecordButton = userInterface.getDoTask3Button();
nextRecordButton.setText( "Get Next Record" );
nextRecordButton.setEnabled( false );
// register listener to call readRecord when button pressed
nextRecordButton.addActionListener(
// anonymous inner class to handle nextRecord event
new ActionListener() {
// call readRecord when user clicks nextRecord
public void actionPerformed( ActionEvent event )
getNextRecord();
} // end anonymous inner class
); // end call to addActionListener
///////////from read end
// register listener to call openFile when button pressed
SaveAs.addActionListener(
// anonymous inner class to handle openButton event
new ActionListener() {
// call openFile when button pressed
public void actionPerformed( ActionEvent event )
SaveLocation();
} // end anonymous inner class
); // end call to addActionListener
// configure button doTask2 for use in this program
SaveToFile = userInterface.getSaveStoreToFileButton();
SaveToFile.setText( "Save to store and to file need to split this task up" );
SaveToFile.setEnabled( false ); // disable button
// register listener to call addRecord when button pressed
SaveToFile.addActionListener(
// anonymous inner class to handle enterButton event
new ActionListener() {
// call addRecord when button pressed
public void actionPerformed( ActionEvent event )
addRecord(); // NEED TO SPLIT UP SO DONT DO BOTH
} // end anonymous inner class
); // end call to addActionListener
Exit = userInterface.getExitAndSaveButton();
Exit.setText( "Exit " );
Exit.setEnabled( false ); // disable button
// register listener to call addRecord when button pressed
Exit.addActionListener(
// anonymous inner class to handle enterButton event
new ActionListener() {
// call addRecord when button pressed
public void actionPerformed( ActionEvent event )
addRecord(); // adds record to to file
closeFile(); // closes everything
} // end anonymous inner class
); // end call to addActionListener
// register window listener to handle window closing event
addWindowListener(
// anonymous inner class to handle windowClosing event
new WindowAdapter() {
// add current record in GUI to file, then close file
public void windowClosing( WindowEvent event )
if ( output != null )
addRecord();
closeFile();
} // end anonymous inner class
); // end call to addWindowListener
setSize( 600, 500 );
setVisible( true );
store = new Store(100);
} // end CreateSequentialFile constructor
// allow user to specify file name
////////////////from read
// enable user to select file to open
private void openFile()
// display file dialog so user can select file to open
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode( JFileChooser.FILES_ONLY );
int result = fileChooser.showOpenDialog( this );
// if user clicked Cancel button on dialog, return
if ( result == JFileChooser.CANCEL_OPTION )
return;
// obtain selected file
File fileName = fileChooser.getSelectedFile();
// display error if file name invalid
if ( fileName == null || fileName.getName().equals( "" ) )
JOptionPane.showMessageDialog( this, "Invalid File Name",
"Invalid File Name", JOptionPane.ERROR_MESSAGE );
else {
// open file
try {
input = new ObjectInputStream(
new FileInputStream( fileName ) );
openButton.setEnabled( false );
nextButton.setEnabled( true );
// process exceptions opening file
catch ( IOException ioException ) {
JOptionPane.showMessageDialog( this, "Error Opening File",
"Error", JOptionPane.ERROR_MESSAGE );
} // end else
} // end method openFile
public void readRecord() // need to merger with next record
Employee record;
// input the values from the file
try {
record = ( Employee ) input.readObject();
employeeList[count++]= record;
store.add(record);/////////ADDS record to Store
store.displayAll();
System.out.println("Count is " + store.getCount());
// create array of Strings to display in GUI
String values[] = {
String.valueOf(record.getName()),
String.valueOf(record.getGender()),
String.valueOf( record.getDateOfBirth()),
String.valueOf( record.getID()),
String.valueOf( record.getStartDate()),
String.valueOf( record.getSalary()),
String.valueOf( record.getAddress()),
String.valueOf( record.getNatInsNo()),
String.valueOf( record.getPhone())
// i added all those bits above split onto one line to look neater
// display record contents
userInterface.setFieldValues( values );
// display message when end-of-file reached
catch ( EOFException endOfFileException ) {
nextButton.setEnabled( false );
nextRecordButton.setEnabled( true );
JOptionPane.showMessageDialog( this, "No more records in file",
"End of File", JOptionPane.ERROR_MESSAGE );
// display error message if class is not found
catch ( ClassNotFoundException classNotFoundException ) {
JOptionPane.showMessageDialog( this, "Unable to create object",
"Class Not Found", JOptionPane.ERROR_MESSAGE );
// display error message if cannot read due to problem with file
catch ( IOException ioException ) {
JOptionPane.showMessageDialog( this,
"Error during read from file",
"Read Error", JOptionPane.ERROR_MESSAGE );
} // end method readRecord
private void getNextRecord()
Employee record = employeeList[next++%count];//cycles throught accounts
//create aray of string to display in GUI
String values[] = {String.valueOf(record.getName()),
String.valueOf(record.getGender()),
String.valueOf( record.getStartDate() ), String.valueOf( record.getAddress()),
String.valueOf( record.getNatInsNo()),
String.valueOf( record.getPhone()),
String.valueOf( record.getID() ),
String.valueOf( record.getDateOfBirth() ),
String.valueOf( record.getSalary() ) };
//display record contents
userInterface.setFieldValues(values);
//display record content
///////////////////////////////////from read end
private void SaveLocation()
// display file dialog, so user can choose file to open
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode( JFileChooser.FILES_ONLY );
int result = fileChooser.showSaveDialog( this );
// if user clicked Cancel button on dialog, return
if ( result == JFileChooser.CANCEL_OPTION )
return;
File fileName = fileChooser.getSelectedFile(); // get selected file
// display error if invalid
if ( fileName == null || fileName.getName().equals( "" ) )
JOptionPane.showMessageDialog( this, "Invalid File Name",
"Invalid File Name", JOptionPane.ERROR_MESSAGE );
else {
// open file
try {
output = new ObjectOutputStream(
new FileOutputStream( fileName ) );
SaveAs.setEnabled( false );
SaveToFile.setEnabled( true );
Exit.setEnabled( true );
// process exceptions from opening file
catch ( IOException ioException ) {
JOptionPane.showMessageDialog( this, "Error Opening File",
"Error", JOptionPane.ERROR_MESSAGE );
} // end else
} // end method openFile
// close file and terminate application
private void closeFile()
// close file
try {
//you want to cycle through each recordand add them to store here.
int storeSize = store.getCount();
for (int i = 0; i<storeSize;i++)
output.writeObject(store.elementAt(i));
output.close();
input.close();// from read!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
System.exit( 0 );
// process exceptions from closing file
catch( IOException ioException ) {
JOptionPane.showMessageDialog( this, "Error closing file",
"Error", JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
} // end method closeFile
// add record to file
public void addRecord()
int employeeNumber = 0;
String fieldValues[] = userInterface.getFieldValues();
// if account field value is not empty
if ( ! fieldValues[ BankUI.IDNUMBER ].equals( "" ) ) {
// output values to file
try {
employeeNumber = Integer.parseInt(
fieldValues[ BankUI.IDNUMBER ] );
String dob = fieldValues[ BankUI.DOB ];
String[] dateofBirth = dob.split ("-"); // what used to put between number chnage to /
String sDate = fieldValues[ BankUI.START ];
String[] startDate = sDate.split ("-");
String sex = fieldValues[ BankUI.GENDER ];
char gender = (sex.charAt(0)); // check if m or f prob check in employee
if ( employeeNumber >= 0 ) {
/* create new record =String name, char gender, Date dob, String add, String nin, String phone, String id, Date start, float salary*/
record = new Employee(
fieldValues[ BankUI.NAME ],
gender,
new Date( Integer.parseInt(dateofBirth[0]),
Integer.parseInt(dateofBirth[1]),
Integer.parseInt(dateofBirth[2])),
fieldValues[ BankUI.ADDRESS ],
fieldValues[ BankUI.NATINTNO ],
fieldValues[ BankUI.PHONE ],
fieldValues[ BankUI.IDNUMBER ],
new Date( Integer.parseInt(startDate[0]),
Integer.parseInt(startDate[1]),
Integer.parseInt(startDate[2])),
Float.parseFloat( fieldValues[ BankUI.SALARY ] ));
if (!store.isFull())
store.add(record);
else
JOptionPane.showMessageDialog( this, "The Store is full you cannot add\n"+
"anymore employees. \nPlease Save Current File and Create a New File." );
System.out.println("Store full");
store.displayAll();
System.out.println("Count is " + store.getCount());
// output record and flush buffer
//output.writeObject( record );
output.flush();
else
JOptionPane.showMessageDialog( this,
"Account number must be greater than 0",
"Bad account number", JOptionPane.ERROR_MESSAGE );
// clear textfields
userInterface.clearFields();
} // end try
// process invalid account number or balance format
catch ( NumberFormatException formatException ) {
JOptionPane.showMessageDialog( this,
"Bad ID number, Date or Salary", "Invalid Number Format",
JOptionPane.ERROR_MESSAGE );
// process exceptions from file output
catch ( ArrayIndexOutOfBoundsException ArrayException ) {
JOptionPane.showMessageDialog( this, "Error with Start Date or Date of Birth\nPlease enter like: 01-01-2001",
"IO Exception", JOptionPane.ERROR_MESSAGE );
// process exceptions from file output
catch ( IOException ioException ) {
JOptionPane.showMessageDialog( this, "Error writing to file",
"IO Exception", JOptionPane.ERROR_MESSAGE );
closeFile();
} // end if
} // end method addRecord
public static void main( String args[] )
new testing();
} // end class CreateSequentialFileSure you can read and write at the same time. But normally you would be reading from one place and writing to another place.
I rather regret avoiding the OP's earlier post asking how to combine two classes. I looked at the two classes posted and realized the best thing to do was actually to break them into more classes. But I also realized it was going to be a big job explaining why and how, and I just don't have the patience for that sort of thing.
So now we have a Big Ball Of Tar™ and I feel partly responsible.
Maybe you are looking for
-
AirTunes with AirportExpress cut or drop out problems - my solution...
I buyed 2 of the Airport Extreme one month ago (Firmware 6.3, Itunes 7.1.1), never got them working fine, till yesterday... I have A Zyxel ADSL WLAN Router Switch. WPA-PSK as I wanted a secure Network. Both of the AX were connected with static IPs. W
-
External purchase for Service order
Hi Experts, In service order(IW31), i can add an operation/ material as external. This allows me to create service PR. Since the parts and operations will be delivered by third party to the customer site, How to do confirmations in customer site. Ca
-
Spotlight results window too small
When I do a Spotlight search and then click on "Show All", it opens a small Finder window. Too small to read full file names. If I click on the green plus button in the upper left, it makes it taller, but not wider. So I have to drag the lower right
-
Replacement hard drive on Macbook Pro 13in early 2011 advice needed!
Hi! I am replacing the hard drive in my MacBook Pro 13in from early 2011. The choices I can afford are either the Seagate 500GB 7200 rpm or the WD Scorpio Blue 500GB 5400rpm drive. I heard that the faster spinning drive causes reduced battery life an
-
Save to Earlier Version (FLV)?
I created a movie in Flash CS3, and uploaded the swf/flv files to my server. Everything plays fine in all my test browsers, but the client says she is seeing a 'flashing red icon' where the movie should be. She's viewing on Mac Safari (Flash version