Writing BitSet variable to a file
Hi..can anyone please tell me how to write a BitSet variable to a file? I tried using FileOutputStream...but no success.
Thanks,
Faisal
Thanks a lot for the reply...Please find below my code, and the error that I'm getting :
public static void toHex(BitSet v) throws IOException
static FileOutputStream outFile;
File f = new File( System.getProperty( "Programs" ), "cdr6.txt" );
outFile = new FileOutputStream(f, true);
outFile.write(v.toString());
--------------------Configuration: j2sdk1.4.1_03 <Default>--------------------
D:\Java\Programs\fileinputstream_bitset.java:25: cannot resolve symbol
symbol : method write (java.lang.String)
location: class java.io.FileOutputStream
outFile.write(v.toString());
^
1 error
Similar Messages
-
Writing complex variables in a file
Hi Dhaval,
could you explain me why i cannot write in a file my complex variable? Could i send again my files?
I can't solve my problem with Bo.
Thanks,
EmaHi Emanuele,
I tried to reproduce your scenario and observed the following.
1. the Response I got was a multiRef SOAP Message as follows from the Axis Webservice.
1 The response that I get is in the following multiRef format from the Axis Webservice.
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getStatusResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<getStatusReturn href="#id0" />
</getStatusResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
123
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
2. The Response that the BPEL Process Gets is just the following and not the actual value which is 123
<getStatusReturn href="#id0" />
Can you please confirm if this is correct in your case?
If so the values are never reaching the input variable for the file adapter.
Can you please see in the debug if the variable you are passing actually does get the values?
Thanks
Dhaval -
Writing HTML data in TEXT File
I am writing HTML content in TEXT file ...I read it in a string and then write using PrintStream...
But it writes all content on one line ..I want to write it as it was in source HTML file...Perchance, the OP is referring to the lack of carriage returns in his outputted data, and querying where they have absconded to? An analysis of his posts to date reveals that he has read the contents of a File into a String variable, and wants to write the (presumably modified) String back to a file (uncertain as to whether this is the same file or a different one) In the process of outputting to said file, carriage returns previously contained in the original input file are not present in the output. I would hazard a guess that the OP does not want said carriage returns in the String to disappear.
Is my analysis of the situation correct?
An example of the code that you have written to date would be of extreme usefulness to us in aiding you in your noble quest.
Without such a resource, I must rely on my intuition instead.
Possible places that the carriage returns are being "dropped"
1 - On reading in. Are you discarding carriage returns while building up your variable?
2 - On manipulating. Are you processing this line by line, or reading it all into one large variable?
3 - On output - are you using "print" or "println" in the output?
I look forward to further correspondence with you sir
kind regards,
evnafets -
Most elegant way to accept a variable number of files?
I am writing a program where I would like to accept a variable number of files to process. In my inexperience with LabVIEW I can think of several ways to do this, which aren't as user friendly as I'd like it to be.
I tried an array of file path controls. This will be the easiest to implement, but what I don't like is that you can't really see all the files you've inputted at once and if you select a file and want to erase it, it will query you for a file.
I tried a while loop with an empty file path to my Read Characters from File.vi, but I would like it so that the user can just specify which files they'd like to load without having to wait inbetween. Also, as I mentioned before, I would prefer it if the use
r could see which files they've decided to load and have the option of taking a file out if they should so choose.
I could try just fixing the number of files and have like 5 or so file path controls and do it like that. That seems like it would be clumsy and obviously has the problem of not being variable.
I'm just wondering if there is something that I haven't thought of, or if I have and which avenue would be the best. I feel fine about using an array of file path indicators, but wonder how I can remove indicies that are empty.Dan, use the special path constant called "Temporary Directory".
Another problem is the fact that you hardwire the path as a string ("c:\temp\...") instead of a path constant. This will make the code useless on any platform except windows.
LabVIEW Champion . Do more with less code and in less time . -
Problem on reading and writing from from a *.txt file
I get Problem on reading and writing from from a *.txt file. The following is the read() method...
The software said the DataInputStream is depreciated. Can anyone help me please?
public void read()
File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
FileInputStream in = null;
String str = "";
try
in = new BufferedReader(file);
//in = new FileInputStream(file);
for(;;)
str = new BufferedReader(in).readLine();
//str = new DataInputStream(in).readLine();
if(str == null)
break;
System.out.print(str);
in.close();
catch(IOException e)
System.err.println("execution error: " +e);
}Thank you for your reply. I have made some change. However, there is an incompetable type found error.
in = new BufferedReader(new InputStreamReader(in));The following are all of the code.
public void read()
File file = new File("C://Documents and Settings//Charles//My Documents//Brunel//EE2065//Assignment and Lab//Assignment 4 and Lab 4//data.txt");
FileInputStream in = null;
//BufferedReader in = null;
String str = "";
try
in = new BufferedReader(new InputStreamReader(in));
//in = new FileInputStream(file);
for(;;)
BufferedReader Bstr = new BufferedReader(new InputStreamReader(in));
//str = new BufferedReader(in).readLine();
//str = new DataInputStream(in).readLine();
if(str == null)
break;
System.out.print(str);
in.close();
catch(IOException e)
System.err.println("execution error: " +e); -
Error while writing the data into the file . can u please help in this.
The following error i am getting while writing the data into the file.
<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="code">
<code>null</code>
</part>
<part name="summary">
<summary>file:/C:/oracle/OraBPELPM_1/integration/orabpel/domains/default/tmp/
.bpel_MainDispatchProcess_1.0.jar/IntermediateOutputFile.wsdl
[ Write_ptt::Write(Root-Element) ] - WSIF JCA Execute of operation
'Write' failed due to: Error in opening
file for writing. Cannot open file:
C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\
BPEL_Import_with_Dynamic_Transformation\WORKDIRS\SampleImportProcess1\input for writing. ;
nested exception is: ORABPEL-11058 Error in opening file for writing.
Cannot open file: C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\
BPEL_Import_with_Dynamic_Transformation
\WORKDIRS\SampleImportProcess1\input for writing. Please ensure 1.
Specified output Dir has write permission 2.
Output filename has not exceeded the max chararters allowed by the
OS and 3. Local File System has enough space
.</summary>
</part>
<part name="detail">
<detail>null</detail>
</part>
</bindingFault>Hi there,
Have you verified the suggestions in the error message?
Cannot open file: C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\BPEL_Import_with_Dynamic_Transformation\WORKDIRS\SampleImportProcess1\input for writing.
Please ensure
1. Specified output Dir has write permission
2. Output filename has not exceeded the max chararters allowed by the OS and
3. Local File System has enough space
I am also curious why you are writing to a directory with the name "..\SampleImportProcess1\input" ? -
Reading and writing to and from a file to a form
Hi there
I would like somebody to send me a code example,
showing me how to reading records from a file to a form,
and writing records to the same file from the same form.
I know that I have to use sycronize, but I just have not been
successful. I can constract forms, go from form to a form,
do buttons, do text fields. I can even read and write from and
to files. However I cannot do is write from a file to a form and
from a form to a file.
could somebody please explain how this done, and could you
please give me a code example. All the books seem to either
deal with forms or with files. None seem to combine both.
I am sure it is very ease to do if ONLY I knew how!!!
thank you very much in advance for you help.I understand that code and I have used it before, however thanks for
trying to help me, it is really appreciated. However, that is not my
problem. I can read and write from a file to the console and vice versa.
what I cannot do, no matter how hard I try, is to write from a file, and
output it in.
I will tell you how far I have got.
I have a MenuFrame class, this is the code for it:
package WorkflowApp;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class MenuFrame extends JFrame {
JMenuBar menuBar1 = new JMenuBar();
JMenu menuFile = new JMenu();
JMenuItem menuFileExit = new JMenuItem();
JMenu menuHelp = new JMenu();
JMenuItem menuHelpAbout = new JMenuItem();
JToolBar toolBar = new JToolBar();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
JButton jButton3 = new JButton();
ImageIcon image1;
ImageIcon image2;
ImageIcon image3;
JLabel statusBar = new JLabel();
Button button2 = new Button();
Button button3 = new Button();
Button button4 = new Button();
Button button5 = new Button();
Button button6 = new Button();
Button button7 = new Button();
Button button1 = new Button();
//Construct the frame
public MenuFrame() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception {
image1 = new ImageIcon(WorkflowApp.MenuFrame.class.getResource("openFile.gif"));
image2 = new ImageIcon(WorkflowApp.MenuFrame.class.getResource("closeFile.gif"));
image3 = new ImageIcon(WorkflowApp.MenuFrame.class.getResource("help.gif"));
this.getContentPane().setLayout(null);
this.setSize(new Dimension(400, 492));
this.setTitle("MenuFrame");
statusBar.setText(" ");
statusBar.setBounds(new Rectangle(0, 0, 3, 17));
menuFile.setText("File");
menuFileExit.setText("Exit");
menuFileExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fileExit_actionPerformed(e);
menuHelp.setText("Help");
menuHelpAbout.setText("About");
menuHelpAbout.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
helpAbout_actionPerformed(e);
jButton1.setIcon(image1);
jButton1.setToolTipText("Open File");
jButton2.setIcon(image2);
jButton2.setToolTipText("Close File");
jButton3.setIcon(image3);
jButton3.setToolTipText("Help");
toolBar.setBorder(null);
toolBar.setBounds(new Rectangle(2, 2, 389, 30));
button2.setBounds(new Rectangle(217, 62, 135, 44));
button2.setLabel("Staff Details");
button2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
button2_actionPerformed(e);
button3.setBounds(new Rectangle(26, 127, 135, 44));
button3.setLabel("Arange Viewing");
button3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
button3_actionPerformed(e);
button4.setBounds(new Rectangle(218, 127, 136, 41));
button4.setLabel("Valuation");
button4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
button4_actionPerformed(e);
button5.setBounds(new Rectangle(28, 196, 135, 41));
button5.setLabel("Schedule");
button6.setBounds(new Rectangle(221, 194, 133, 40));
button6.setName("button6");
button6.setLabel("Register Interest");
button7.setBounds(new Rectangle(31, 266, 133, 42));
button7.setLabel("Register Offers");
button1.setBounds(new Rectangle(27, 62, 131, 42));
button1.setLabel("New Client");
button1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
button1_actionPerformed(e);
menuFile.add(menuFileExit);
menuHelp.add(menuHelpAbout);
menuBar1.add(menuFile);
menuBar1.add(menuHelp);
this.setJMenuBar(menuBar1);
this.getContentPane().add(statusBar, null);
this.getContentPane().add(toolBar, null);
toolBar.add(jButton1);
toolBar.add(jButton2, null);
toolBar.add(jButton3, null);
this.getContentPane().add(button3, null);
this.getContentPane().add(button5, null);
this.getContentPane().add(button7, null);
this.getContentPane().add(button2, null);
this.getContentPane().add(button4, null);
this.getContentPane().add(button6, null);
this.getContentPane().add(button1, null);
//File | Exit action performed
public void fileExit_actionPerformed(ActionEvent e) {
System.exit(0);
//Help | About action performed
public void helpAbout_actionPerformed(ActionEvent e) {
MenuFrame_AboutBox dlg = new MenuFrame_AboutBox(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.show();
//Overridden so we can exit on System Close
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if(e.getID() == WindowEvent.WINDOW_CLOSING) {
fileExit_actionPerformed(null);
void button2_actionPerformed(ActionEvent e) {
StaffDetails myFrame = new StaffDetails();
myFrame.show();
void button3_actionPerformed(ActionEvent e) {
ArrangeViewing myFrame = new ArrangeViewing();
myFrame.show();
void button1_actionPerformed(ActionEvent e) {
NewClientFrame myFrame = new NewClientFrame();
myFrame.show();
// System.exit(1);
void button4_actionPerformed(ActionEvent e) {
Valuation myFrame = new Valuation();
myFrame.show();
then I have a new form class, this is the code for it
package WorkflowApp;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class NewClientFrame extends JFrame {
Label label1 = new Label();
Label label2 = new Label();
Label label3 = new Label();
Label label4 = new Label();
Label label5 = new Label();
Label label6 = new Label();
Label label7 = new Label();
Label label8 = new Label();
Label label9 = new Label();
Label label10 = new Label();
TextField textField1 = new TextField();
TextField textField2 = new TextField();
TextField textField3 = new TextField();
TextField textField4 = new TextField();
TextField textField5 = new TextField();
TextField textField6 = new TextField();
TextField textField7 = new TextField();
TextField textField8 = new TextField();
TextField textField9 = new TextField();
TextField textField10 = new TextField();
Button button1 = new Button();
Button button2 = new Button();
//Construct the frame
public NewClientFrame() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception {
this.getContentPane().setLayout(null);
this.setSize(new Dimension(411, 488));
this.setTitle("NewClientFrame ");
this.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(WindowEvent e) {
this_windowClosing(e);
label1.setBounds(new Rectangle(21, 23, 110, 23));
label1.setAlignment(2);
label1.setText("Assign Number");
label2.setBounds(new Rectangle(23, 57, 108, 25));
label2.setAlignment(2);
label2.setText("Name");
label3.setBounds(new Rectangle(40, 91, 94, 24));
label3.setAlignment(2);
label3.setText("Address 1");
label4.setBounds(new Rectangle(21, 124, 112, 29));
label4.setAlignment(2);
label4.setText("Address 2");
label5.setBounds(new Rectangle(20, 159, 116, 29));
label5.setAlignment(2);
label5.setText("PoscCode");
label6.setBounds(new Rectangle(18, 197, 119, 26));
label6.setAlignment(2);
label6.setText("Telephone");
label7.setBounds(new Rectangle(25, 228, 112, 26));
label7.setAlignment(2);
label7.setText("Other Telephone");
label8.setBounds(new Rectangle(12, 261, 125, 24));
label8.setAlignment(2);
label8.setText("Email Address");
label9.setBounds(new Rectangle(6, 301, 138, 25));
label9.setAlignment(2);
label9.setText("Staff Assigned (Name)");
label10.setBounds(new Rectangle(22, 341, 124, 23));
label10.setAlignment(2);
label10.setText("Staff Assigned (No.)");
textField1.setBounds(new Rectangle(155, 19, 80, 26));
textField2.setBounds(new Rectangle(155, 58, 193, 24));
textField3.setBounds(new Rectangle(156, 90, 192, 25));
textField4.setBounds(new Rectangle(157, 126, 192, 23));
textField5.setBounds(new Rectangle(157, 159, 195, 25));
textField6.setBounds(new Rectangle(157, 194, 195, 26));
textField7.setBounds(new Rectangle(157, 230, 192, 24));
textField8.setBounds(new Rectangle(157, 263, 193, 25));
textField9.setBounds(new Rectangle(157, 303, 196, 24));
textField10.setBounds(new Rectangle(158, 337, 95, 24));
button1.setBounds(new Rectangle(23, 398, 144, 34));
button1.setLabel("Staff Available");
button2.setBounds(new Rectangle(211, 396, 148, 34));
button2.setLabel("Submit Record");
button2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
button2_actionPerformed(e);
this.getContentPane().add(label1, null);
this.getContentPane().add(label2, null);
this.getContentPane().add(label3, null);
this.getContentPane().add(label4, null);
this.getContentPane().add(label5, null);
this.getContentPane().add(label6, null);
this.getContentPane().add(label7, null);
this.getContentPane().add(label8, null);
this.getContentPane().add(label9, null);
this.getContentPane().add(label10, null);
this.getContentPane().add(textField1, null);
this.getContentPane().add(textField2, null);
this.getContentPane().add(textField3, null);
this.getContentPane().add(textField4, null);
this.getContentPane().add(textField5, null);
this.getContentPane().add(textField6, null);
this.getContentPane().add(textField7, null);
this.getContentPane().add(textField8, null);
this.getContentPane().add(textField9, null);
this.getContentPane().add(textField10, null);
this.getContentPane().add(button1, null);
this.getContentPane().add(button2, null);
public void fileExit_actionPerformed(ActionEvent e) {
System.exit(0);
// exit(this);
// close();
//Overridden so we can exit on System Close
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if(e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
void button2_actionPerformed(ActionEvent e) {
// myFrame.close();
this.dispose();
void this_windowClosing(WindowEvent e) {
this.dispose();
I also have an about box, staff details, and valuation forms.
what I am trying to do is for the New client form to be able to read and write from and to a file, and display the info.
I am working in JBuilder3, a bit out of date I know, but it is the best I can do. Any Ideas how to do this. -
Writing binary data to a file without carriage returns every 512 bytes
Is there a VI for writing binary data to a file without carriage returns being inserted every 512 bytes?
ThanksHi Momolxg,
I could be way off on this. I tried to simulate what you've done by
making a for loop that would run a set number of times. For my example I
used 1025. I wired the iteration terminal to a 'Write to SGL File.vi'
outside the loop with indexing enabled. It wrote the SGL data from 0 to
1024 to the file. I then read the file with a 'Read Characters from
File.vi' and searched the output for a carriage return (0D hex). It was
found five times. The reason why was the SGL number it was reading had a
13 (0D hex) in it. Perhaps you're running into a similar problem?
I tried it again, this time using the 'Write to I16 File.vi'. The
carriage return was found five times: the 28th character the first time
then on the 512th character four consecutive time
s after that. I suppose
that makes sense that you'd find a 0D in the numbers at equal spacings if
they're incrementing this way... In this case the carriage returns you're
seeing are actually numbers from your data.
One big difference is that I'm using a set pattern of numbers. This
doesn't appear to be your case. Is there a better way we can duplicate
your problem? It sounds interesting. Again my simulation could be way
off. (I'm also running this on LV60 for Linux so my results could be
different)
- Kevin
In article <[email protected]>,
"momolxg" wrote:
> Is there a VI for writing binary data to a file without carriage returns
> being inserted every 512 bytes? Thanks -
Problem while writing to fixed length flat file from xml
Hi,
I have a problem in writing data into a flat file of fixed length...
My input is a xml file and i want the output as a flat file. I am successful in converting the xml into flat file... But the main problem is, i am unable to insert spaces in between my fields in the flat file.
The data in the flat file comes without spaces... Any suggestions on writing the schema...
Regards
Surya.Have a look at this doc
http://otndnld.oracle.co.jp/document/products/as10g/101310/doc_cd/integrate.1013/b28994/nfb.htm#BGBBAJFD
your element should be something like this, it pads with a space using the paddedBy expression
<xsd:element name="C1" type="xsd:string" nxsd:style="fixedLength" nxsd:length="4" nxsd:paddedBy=" " nxsd:padStyle="tail" />if having trouble post what you want the file to look like, and the xsd you are using.
cheers
James -
How to use variables in logical file name definition FILE
Hi Friends,
How can I use variables in logical file name definition (tcode FILE). The requirement is to pass value in these variables (based on selection criteria), and use it as part of file name. You quick response will be highly appreciated.
Thanks,
Kuldeep JoshiHi,
Thanks for your reply.
In detail, the scenario is like I have created an Open Hub. Its working fine. Now I am planning to execute this open hub using process chain and for that I have to define the file output on application server along with logical file name (using tcode FILE). The logical file name contains two variables (defined in FILE) i.e. z_dept and z_fiscperiod.
Filter value in DTP ( I will read these values from Ztable using routine )
Dept = R&D
Fisc period = 004/2009
Variables defined in tcode FILE:
z_dept for Dept
z_fiscperiod for Fiscal Period
Logical file name : <z_dept>_<z_fiscperiod>.csv
Now the challenge is to populate filter values in these two variables so that the filter value can be used for naming the output file.
My last option is to read/update SAP standard table used for storing variable values (i.e. PARAMVALUE)
Please let me know if you can help me in this issue OR is there any standard method/FM to populate value in these variables
Thanks,
Kuldeep -
Susbtitution Variables in rules file to replace a member name with another
Hi everybody,
Can I use substitution variables to replace a member name with another name in rules file?
Please let me know if we can use substitution vars.
Essbase version :11.1.2
Thanks,
K.asAre you the same guy?
http://www.network54.com/Forum/58296/thread/1287447433/Susbtitution+Variables+in+rules+file+to+replace+a+member+name+with+another+name
The answer is still, "No".
Regards,
Cameron Lackpour -
Time Stamp problem while writing data into the excel file
Hii, All
I am taking the data from the DAQ card of the TOPSCCC with the 8 ms of scanrate for each channel and there are total 16 no of Analog channels in the Card, now i am acquiring the data from the card, time stamping it and writing it into the excel file, which is tab delimited, now the problem is, the data which are in the excel file have the same timestamp for 4 to 5 continuous records, instead we want each data with the different and continuous time stamp with same difference of time stamp between two records, mean if it is difference of 8 ms then it should be the 8 ms for all, but here it is taking the differnce of 16 ms for two samples and giving same time stamp for four to five records and that shouldn't happen, here i am attaching my vi, drivers for the cards and Excel file with the data, can you please give me any suggestion how to do it?
Please help me i require this suggestion as early as possible, i am requiring it urgently.
Thanks in Advance,
Nishant
Attachments:
2026vi.llb 319 KB
2026_ScanMultAD_Demo_time.vi 80 KB
Data.xls 357 KBHello Nishant,
that's what I meant:
Message Edited by GerdW on 05-16-2006 10:32 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
timestamp-array.png 2 KB -
Faillure writing metadata to some DNG files
I'm having a problem writing metadata to some dng files using Lightroom 2.6.1. When I try to apply a metadata template to a batch of files most of them get changes but a few don't. This only effects DNG files so far JPEG and TIFF seem to be OK. I have tried running the problem files through DNG converter and the new files have the same problem. Lightroom won't write to them.
I can change the metadata of these files from Bridge. The changes then appear properly in Lightroom. Afterwards I can change the metadata again from Lightroom.
I'm working on a MacBook Pro (Late 2008) and running OS 10.6.2.I created a preset to export to same folder as original, same format as original, and stack with (above) original. I used this on the seven files, and it has solved the problem without losing any metadata.
The jpegs had at some point been processed by Photoshop Elements as they were imported/edited using that application in 2010 but the metadata problem didn't show up until recently when I was making some adjustments in Lightroom. I somehow think this may be related to the GPS tag though I don't have sufficient evidence.
The DNG file was strange in that it was straight the camera with no Lightroom adjustments, although I did add GPS info in the Map module. Anway it is now fixed as well as the jpegs.
With this preset it would be possible quickly to fix a large number of image files. Just create a Smart Collection to display the problem files and run the preset on them all in one go. The only things that I am aware of that you would need to look out for are (1) if they are in a collection other than a smart collection, or have been published to a service like Flickr or to the Hard Disk the link will be broken, and (2) If you like to sort photos by date/time added, they will be out of the sequence (capture time is fine).
When you are satisfied that this has worked OK then you can delete the images from the "Metadata Not Up To Date" smart collection. Select all, go to all photos, they should remain selected and press Delete. You could do a thousand in one go if you have the nerve for it
Hope this helps.
Peter -
Using variables on included files?
Can you not use #variable# on a file that is added on an
existing .cfm file
with <cfinclude> ??
I have:
<cfquery name="check_user" datasource="SalleBoise">
select u_id,u_fName,u_lName,u_foil_rating,u_foil_year
from tournfencer
where u_user='#form.Username#'
</cfquery>
<cfinclude template="inc/event_reg.cfm">
- event_reg.cfm is-
<cfform name="form1" method="post"
action="CF/process2.cfm?pmode=a&tid=#url.tid#"
id="FormBorder"
style="margin-top:2px;"><span class="bold">Events
competing in:</span><table
width="98%" border="0">
<cfif #url.f# eq 1>
<tr>
<td width="15%" align="center">Open Foil</td>
<td width="10%" align="center"><input
name="OpenFoil" type="checkbox"
value="1" checked="yes" onClick="optionFoil(this.form)">
</td>
</tr>
</cfif>
<cfif #url.e# eq 1>
<tr>
<td align="center">Open Epee </td>
<td align="center"><input name="OpenEpee"
type="checkbox" value="1"
checked="yes" onClick="optionEpee(this.form)"></td>
</tr>
</cfif>
</table>
<cfset id=createuuid()>
<input type="hidden" name="id"
value="<cfoutput>#id#</cfoutput>">
<input type="hidden" name="fRating"
value="<cfoutput>#check_user.u_foil_rating#</cfoutput>">
<div align="center">
<input name="Submit" type="submit" value="Register"
onClick="return
checkmail(this.form.FencerEmail)">
</div>
</cfform>
But if I dump the variable #fRating#, I get a message that
says Element
U_FOIL_RATING is undefined in CHECK_USERI have the code as:
event_reg.cfm:
<cfform name="form1" method="post"
action="CF/process2.cfm?pmode=a&tid=#url.tid#"
id="FormBorder"
style="margin-top:2px;"><span class="bold">Events
competing in:</span><table
width="98%" border="0">
<cfif #url.f# eq 1>
<tr>
<td width="15%" align="center">Open Foil</td>
<td width="10%" align="center"><input
name="OpenFoil" type="checkbox"
value="1" checked="yes" onClick="optionFoil(this.form)">
</td>
</tr>
</cfif>
<cfif #url.e# eq 1>
<tr>
<td align="center">Open Epee </td>
<td align="center"><input name="OpenEpee"
type="checkbox" value="1"
checked="yes" onClick="optionEpee(this.form)"></td>
</tr>
</cfif>
</table>
<cfset id=createuuid()>
<input type="hidden" name="id"
value="<cfoutput>#id#</cfoutput>">
<cfdump var="#fRating#">
<input type="hidden" name="fRating"
value="<cfoutput>#check_user.u_foil_rating#</cfoutput>">
<div align="center">
<input name="Submit" type="submit" value="Register"
onClick="return
checkmail(this.form.FencerEmail)">
</div>
</cfform>
tournament2.cfm:
<!-- Variables which need to be defined -->
<cfparam name="URL.logout" default="0">
<cfparam name="invalid_login" default="0">
<!-- Code will not be executed unless #FORM.username# IS
NOT "" -->
<cfif structKeyExists(form,"username")>
<!-- Check Username, Password, and Level of
Administration -->
<cfquery name="check_user" datasource="SalleBoise">
select u_id,u_fName,u_lName,u_foil_rating,u_foil_year
from tournfencer
where u_user='#form.Username#'
</cfquery>
<!-- If there is a valid User then Login user -->
<cfif check_user.recordcount is not 0>
<!-- Log them in with a timeout of 30 minutes (1800 sec)
and set
level of Admin-->
<cflogin idletimeout="1800">
<cfloginuser
name = "#FORM.username#"
password ="#FORM.password#"
roles = "1">
</cflogin>
<cfelse>
<!-- If an invalid Login Attemp, Set invalid to 1 for
invalid login
script -->
<cfset invalid_login = 1>
</cfif>
</cfif>
<!-- If index.cfm?logout=1 is clicked then Log The User
Out -->
<cfif URL.logout is 1>
<cflogout>
<cflocation url="index.cfm">
</cfif>
<!--- Simple index.cfm file that logs you in --->
<cfif GetAuthUser() is "">
<form name="form1" method="post"
action="<cfoutput>#cgi.HTTP_REFERER#</cfoutput>">
User: <input name="username" type="text"
id="username"><br>
Pass: <input name="password" type="password"
id="password"><br>
<input type="submit" name="Submit" value="Submit">
</form>
<cfelse>
<cfinclude template="inc/event_reg.cfm">
<!---
<p>User:
<cfoutput>#GetAuthUser()#</cfoutput></p>
<p><cfoutput>#check_user.u_fName# -
#check_user.u_id#</cfoutput><br> --->
<a href="index.cfm?logout=1">Logout</a>
<cfdump var="#check_user#">
</cfif>
"Kronin555" <[email protected]> wrote in
message
news:[email protected]...
> If you did that dump at the very top of
inc/event_reg.cfm, then there must
> be
> code in event_reg.cfm that we don't see. Are you
resetting check_user to
> anything in that file?
>
> > But if I dump the variable #fRating#, I get a
message that says Element
> U_FOIL_RATING is undefined in CHECK_USER
>
> Where are you trying to dump the fRating variable? In
CF/process2.cfm? In
> event_reg.cfm, you are setting the value of a hidden
form variable to
> check_user.u_foil_rating. When this page loads, if you
view source, is the
> value being set correctly?
>
> Your statement about dumping fRating leads me to believe
the error is
> actually
> occurring on a different page, not this page. What page
are you actually
> getting the undefined variable error?
> -
Help With Writing A Vector To A File
hi
i am having trouble writing a vector to a file
Here is my code
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import javax.swing.filechooser.*;
public class Save
JFileChooser fc = new JFileChooser();
public Save(JFrame par, mainCollection col)
try
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream fc.getSelectedFile().getName()));
out.writeObject(col.carCollection);
for(int i = 0; i< col.carCollection.size();i++)
Cars cd = (Cars)col.carCollection.elementAt(i);
Vector v = cd.getModels();
out.writeObject(v);
}catch(FileNotFoundException e){System.out.println("not found");}
catch(IOException e){System.out.println("IO" + e.getMessage());}
Ok now the mainCollection col is from my other class mainCollection which has my main vector in it. This main vector contains car types which contain car models i.e. Ford which contains Falcon. What i need to do is copy the whole contents of vector over in one go to the file.
With the code above i am getting IO Exception errors
here is the errors
�� sr java.util.Vector��}[�;� I capacityIncrementI elementCount[ elementDatat [Ljava/lang/Object;xp ur [Ljava.lang.Object;��X�s)l xp
{sr java.io.NotSerializableException(Vx ��5 xr java.io.ObjectStreamExceptiond��k�9�� xr java.io.IOExceptionl�sde%�� xr java.lang.Exception��>;� xr java.lang.Throwable��5'9w�� L
detailMessaget Ljava/lang/String;xpt Cars
Whatever all that means
Thanks for your help, i'm really confused
DaJavaLodown
Remove the for loop.
If you write the vector, it's content will be written too.
hi
i am having trouble writing a vector to a file
Here is my code
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import javax.swing.filechooser.*;
public class Save
JFileChooser fc = new JFileChooser();
public Save(JFrame par, mainCollection col)
try
ObjectOutputStream out = new
= new ObjectOutputStream(new FileOutputStream
fc.getSelectedFile().getName()));
out.writeObject(col.carCollection);
for(int i = 0; i<
= 0; i< col.carCollection.size();i++)
Cars cd =
Cars cd = (Cars)col.carCollection.elementAt(i);
Vector v = cd.getModels();
out.writeObject(v);
}catch(FileNotFoundException
ion e){System.out.println("not found");}
catch(IOException e){System.out.println("IO" +
" + e.getMessage());}
Ok now the mainCollection col is from my other class
mainCollection which has my main vector in it. This
main vector contains car types which contain car
models i.e. Ford which contains Falcon. What i need to
do is copy the whole contents of vector over in one go
to the file.
With the code above i am getting IO Exception errors
here is the errors
�� sr java.util.Vector��}[�;� I
capacityIncrementI elementCount[ elementDatat
[Ljava/lang/Object;xp ur
r [Ljava.lang.Object;��X�s)l xp
{sr java.io.NotSerializableException(Vx ��5 xr
java.io.ObjectStreamExceptiond��k�9�� xr
java.io.IOExceptionl�sde%�� xr
r java.lang.Exception��>;� xr
java.lang.Throwable��5'9w�� L
detailMessaget Ljava/lang/String;xpt Cars
Whatever all that means
Thanks for your help, i'm really confused
DaJavaLodown
Maybe you are looking for
-
Duplicando registro tabela NAST após chamada J_1BNFE_CALL_RSNAST00
Boa tarde pessoal, estava conversando com o Fernando nesta [Thread|; e resolvi abrir uma nova thread. Estava implementando a badi de impressão do danfe e notei um comportamento estranho. Após gerar uma NFe, é gerado um registro na NAST. Na sequencia,
-
Why do the videos I purchased with version 6 of i tunes play fine, but any video purchased after upgrading to version 7 play choppy. This only happens when I watch the video in itunes, They all play fine on my ipod.
-
Hello I have a big pb : bash-3.00# sconadm register -a -r RegistrationProfile.properties sconadm is running Authenticating user ... Exception in thread "main" java.lang.reflect.UndeclaredThrowableException at $Proxy5.getOfferingInstanceName(Unknown S
-
Shared Vaiable Manager Operation
Hi All, Can somebody please advise me about the operation of the Shared Varaible Manager. I have a project that includes my development pc, a remote pc and several pxi controllers running Labview RT. I have deployed shared variables on all targets.
-
Technical System Not reporting to Master SLD
Hi We have multiple SLDs in our landscape for each landscape. We have a Central SLD in our Solutiion Manager systems. All the SLDs are configured to transfer the data to the master SLD through the Data Bride which reports everyday. One of the SLD re