HELP: Appending new records to File containing 1 Record
Hi, im transferring records to a file, the first line of the file contains the headers (used 'NO END OF LINE'). The problem is that when I write the data records to the file, the first record continues from the end of the Headers line, hence i have a record missing in my statement. I want to append the records below the Headers line. I tried opening the dataset 'for appending' instead of 'for output' but I get the same result.
lv_ds_name_ex = Filename
Code:
Getting field descriptions to use as headers and tranferring to file
open the dataset
OPEN DATASET lv_ds_name_ex FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
CLEAR: lt_dfies.
" Get field descriptions from settlement table
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'zrl_generic_record'
TABLES
dfies_tab = lt_dfies.
write column headers to the file
LOOP AT lt_dfies.
IF lt_dfies-scrtext_m = 'Char15'.
IF lv_counter < 1.
lt_dfies-scrtext_m = 'Remuneration Amount'.
lv_counter = lv_counter + 1.
ELSE.
lt_dfies-scrtext_m = 'Commission Amount'.
ENDIF.
ENDIF.
TRANSFER lt_dfies-scrtext_m TO lv_ds_name_ex NO END OF LINE.
TRANSFER ';' TO lv_ds_name_ex NO END OF LINE.
ENDLOOP.
Close DATASET lv_ds_name_ex.
Transferring data records to file
open the dataset
OPEN DATASET lv_ds_name_ex FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
write records to the file
LOOP AT lt_generic_record_csv INTO ls_generic_record_csv.
TRANSFER ls_generic_record_csv TO lv_ds_name_ex.
ENDLOOP.
"close the dataset
CLOSE DATASET lv_ds_name_ex.
Solution: TRANSFER " " TO lv_ds_name_ex. (This simply adds an empty line/record with an end of line) see code before closing the dataset
open the dataset
OPEN DATASET lv_ds_name_ex FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
CLEAR: lt_dfies.
" Get field descriptions from settlement table
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'zrl_generic_record'
TABLES
dfies_tab = lt_dfies.
write column headers to the file
LOOP AT lt_dfies.
IF lt_dfies-scrtext_m = 'Char15'.
IF lv_counter < 1.
lt_dfies-scrtext_m = 'Remuneration Amount'.
lv_counter = lv_counter + 1.
ELSE.
lt_dfies-scrtext_m = 'Commission Amount'.
ENDIF.
ENDIF.
TRANSFER lt_dfies-scrtext_m TO lv_ds_name_ex NO END OF LINE.
TRANSFER ';' TO lv_ds_name_ex NO END OF LINE.
ENDLOOP.
TRANSFER " " TO lv_ds_name_ex.
Close DATASET lv_ds_name_ex.
open the dataset
OPEN DATASET lv_ds_name_ex FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
write records to the file
LOOP AT lt_generic_record_csv INTO ls_generic_record_csv.
TRANSFER ls_generic_record_csv TO lv_ds_name_ex.
ENDLOOP.
"close the dataset
CLOSE DATASET lv_ds_name_ex.
Edited by: Daniel Lebotse on May 15, 2008 5:42 PM
Similar Messages
-
Recorded FLV files contain corrupt timestamps
Howdy -
I'm running FMS 4.5.3 r2005 on standard AWS Linux box. I'm recording the streams using NetStream.publish("appendWithGap") from a small custom Flash app running on IE+Windows.
Usually, the generated .flv file is fine. However, I've found a number of cases where the .flv file generated was corrupt. By using ffprobe -show_packets I'm able to see that the presentation timestamp (PTS) of sequential packets occasionally remain the same. This happens for both audio and video at times. For example, consider the output of the command:
$ ffprobe -show_packets saved.flv | egrep -e '(pts=|codec)'
codec_type=video
pts=0
codec_type=video
pts=0
codec_type=video
pts=0
codec_type=video
pts=0
codec_type=video
pts=0
codec_type=video
pts=0
codec_type=video
pts=3912
codec_type=video
pts=3944
codec_type=video
pts=3944
codec_type=video
pts=3944
codec_type=video
pts=3944
codec_type=video
pts=3944
codec_type=video
pts=3944
codec_type=video
pts=3944
codec_type=video
pts=3944
I really don't know much about the internals of the FLV format, but I assume that invalid timestamps like these make for a non-playable (corrupt) video.
Any idea what may cause FMS to record such a video?
What kind of information would be helpful to debug this?
Obviously, my client expects every video recorded to be one that an be played back, and so these corrupt videos are alarming to say the least.
FYI, due to privacy restrictions I can't share the recorded video without a signed NDA. If it would help, I can provide the entire output of ffprobe.
Thanks,
BenFlvcheck has validated the format of file, and it is correct. The logs "Adding Silence message" indicates that audio message was expected and is not recieved after a particular time check, because of which video may appear stalled.
Flvcheck may claim the file is valid, but event after running flvcheck -s the video is corrupt. According to ffprobe, many of the timestamps are still the same. When I attempt to play the file in an flv player, the entire video is run through up front in sort of a fast-forward view, and then the audio plays out more or less normally.
This makes sense, as the video player is probably playing all these frames with the same timestamp sequentially, which makes for the fast-forward effect.
To debug this issue, a good starting point would be, validating the input to FMS. FMS records what is published to it.
Does FMS tinker with the video frame timestamps, or are they just passed through to the file system?
Since you are able to reproduce this issue, can you please enable livestream logging and check if input stream to FMS is different from what it is recording.
Unfortunately I can't regularly reproduce it - though it does happen on a somewhat regular basis (it was happening a couple times a week).
Is it safe to turn live stream logging on for a few days to see if I can catch this issue happening? Or, will live logging chew up resources and cause issues?
Thanks for the assistance!
-Ben -
UDF - Removing Header Record from File
Hi Team,
In my file(File Content Conversion) to ABAP server proxy scenario...
The source File structure is like this...
KUNNR|Matnr|Description----->(This is Hearder Record.Each File contains this header record.)
1001|0077321|Special Materials
1002|0077323|Raw Material
File adapter will picks the file , In Message Mapping The first record is the Header Record from the above file structure.So I need to remove the Header Record.
Can we handle this requirement with any FCC parameter ;I think we can do it with the help of UDF in MessageMapping?
Can anybody ghelp me the sample code for this.
Thanks.
DrumiHi,
You can use Document Offset in FCC to specify the number of lines that are to be ignored at the beginning of the document.
Regards,
Priyanka -
Send emails from a csv file (grouping records with the same email addresses)
Writing a script to send emails from a csv which contains record details and email addresses using the Send-Mailmessage cmdlet.
That part is no trouble, however, the csv file contain records that can have the same email address.
Is there a way/method I could send the records with the same email address once instead of sending individual email messages?
Thanks
Data in the csv file
Record number, description, email
1234, Test 1, [email protected]
5678, Test 2, [email protected]
1245, Test 3, [email protected]
4578, Test 4, [email protected]
$data = Import-csv c:\records.csv
ForEach($address in $data)
Send-mailmessage -To $address.emails -from [email protected] -subject "List of records" -Body $data -SmtpServer 192.168.1.1The following code does what you are looking for:
$data = Import-csv c:\records.csv$mx = "192.168.1.1"
$subject = "List of records"
$from = "[email protected]"
$data| Group-Object email|Select-Object Name, @{n='msg'; e={$_.Group| Select-Object -Property "record number", description|ConvertTo-Csv -notypeinformation|Out-String}}|
ForEach-Object {Send-MailMessage -to $_.Name -Body $_.msg -SmtpServer $mx -Subject $subject -From $from}
I also recommend no forcing everything into one line. "One-liner" means "one pipeline" not putting all code on one unreadable line.
Your code should look like this:
$data|
Group-Object email|
Select-Object Name, @{
n='msg'; e={
$_.Group| Select-Object -Property "record number", description|
ConvertTo-Csv -notypeinformation|Out-String
}|
ForEach-Object {
Send-MailMessage -to $_.Name -Body $_.msg -SmtpServer $mx -Subject $subject -From $from
Now we can see the code and see that you are still unnecessarily converting back and forth.
To get the group look at how I did it.
$body=$_.Group | Format-Table |Out-String
Isn't that much easier?
Once you master the pipeline these things will become second nature. In PowerShell it is not necessary to write lots of code most of the time.
¯\_(ツ)_/¯ -
Conversion of PDF to WORD (a problem with a file containing Persian text)
Converting/copying a PDF file containing a persian text to WORD (.doc) gives a distorted WORD document! Could any one please tell me what I must do to have a sound and neat WORD (.doc) version of a PDF file containg a Persian text? I use Adobe Acrobat8 Professional and MS Office WORD 2007. So many thanks in advance for your help.
Converting/copying a PDF file containing a persian text to WORD (.doc) gives a distorted WORD document! Could any one please tell me what I must do to have a sound and neat WORD (.doc) version of a PDF file containg a Persian text? I use Adobe Acrobat8 Professional and MS Office WORD 2007. So many thanks in advance for your help.
-
Need Help With File Matching Records
I need help with my file matching program.
Here is how it suppose to work: FileMatch class should contain methods to read oldmast.txt and trans.txt. When a match occurs (i.e., records with the same account number appear in both the master file and the transaction file), add the dollar amount in the transaction record to the current balance in the master record, and write the "newmast.txt" record. (Assume that purchases are indicated by positive amounts in the transaction file and payments by negative amounts.)
When there is a master record for a particular account, but no corresponding transaction record, merely write the master record to "newmast.txt". When there is a transaction record, but no corresponding master record, print to a log file the message "Unmatched transaction record for account number ..." (fill in the account number from the transaction record). The log file should be a text file named "log.txt".
Here is my following program code:
// Exercise 14.8: CreateTextFile.java
// creates a text file
import java.io.FileNotFoundException;
import java.lang.SecurityException;
import java.util.Formatter;
import java.util.FormatterClosedException;
import java.util.NoSuchElementException;
import java.util.Scanner;
import org.egan.AccountRecord;
import org.egan.TransactionRecord;
public class CreateTextFile
private Formatter output1; // object used to output text to file
private Formatter output2; // object used to output text to file
// enable user to open file
public void openTransFile()
try
output1 = new Formatter("trans.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openTransFile
// enable user to open file
public void openOldMastFile()
try
output2 = new Formatter("oldmast.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openOldMastFile
// add transaction records to file
public void addTransactionRecords()
// object to be written to file
TransactionRecord record1 = new TransactionRecord();
Scanner input1 = new Scanner(System.in);
System.out.printf("%s\n%s\n%s\n%s\n\n",
"To terminate input, type the end-of-file indicator",
"when you are prompted to enter input.",
"On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
"On Windows type <ctrl> z then press Enter");
System.out.printf("%s\n%s",
"Enter account number (> 0) and amount.","? ");
while (input1.hasNext()) // loop until end-of-file indicator
try // output values to file
// retrieve data to be output
record1.setAccount(input1.nextInt()); // read account number
record1.setAmount(input1.nextDouble()); // read amount
if (record1.getAccount() > 0)
// write new record
output1.format("%d %.2f\n", record1.getAccount(), record1.getAmount());
} // end if
else
System.out.println("Account number must be greater than 0.");
} // end else
} // end try
catch (FormatterClosedException formatterClosedException)
System.err.println("Error writing to file.");
return;
} // end catch
catch (NoSuchElementException elementException)
System.err.println("Invalid input. Please try again.");
input1.nextLine(); // discard input so user can try again
} // end catch
System.out.printf("%s %s\n%s", "Enter account number (> 0) ",
"and amount.","? ");
} // end while
} // end method addTransactionRecords
// add account records to file
public void addAccountRecords()
// object to be written to file
AccountRecord record2 = new AccountRecord();
Scanner input2 = new Scanner(System.in);
System.out.printf("%s\n%s\n%s\n%s\n\n",
"To terminate input, type the end-of-file indicator",
"when you are prompted to enter input.",
"On UNIX/Linux/Mac OS X type <ctrl> d then press Enter",
"On Windows type <ctrl> z then press Enter");
System.out.printf("%s\n%s",
"Enter account number (> 0), first name, last name and balance.","? ");
while (input2.hasNext()) // loop until end-of-file indicator
try // output values to file
// retrieve data to be output
record2.setAccount(input2.nextInt()); // read account number
record2.setFirstName(input2.next()); // read first name
record2.setLastName(input2.next()); // read last name
record2.setBalance(input2.nextDouble()); // read balance
if (record2.getAccount() > 0)
// write new record
output2.format("%d %s %s %.2f\n", record2.getAccount(), record2.getFirstName(),
record2.getLastName(), record2.getBalance());
} // end if
else
System.out.println("Account number must be greater than 0.");
} // end else
} // end try
catch (FormatterClosedException formatterClosedException)
System.err.println("Error writing to file.");
return;
} // end catch
catch (NoSuchElementException elementException)
System.err.println("Invalid input. Please try again.");
input2.nextLine(); // discard input so user can try again
} // end catch
System.out.printf("%s %s\n%s", "Enter account number (> 0),",
"first name, last name and balance.","? ");
} // end while
} // end method addAccountRecords
// close file
public void closeTransFile()
if (output1 != null)
output1.close();
} // end method closeTransFile
// close file
public void closeOldMastFile()
if (output2 != null)
output2.close();
} // end method closeOldMastFile
} // end class CreateTextFile--------------------------------------------------------------------------------------------------
// Exercise 14.8: CreateTextFileTest.java
// Testing class CreateTextFile
public class CreateTextFileTest
// main method begins program execution
public static void main( String args[] )
CreateTextFile application = new CreateTextFile();
application.openTransFile();
application.addTransactionRecords();
application.closeTransFile();
application.openOldMastFile();
application.addAccountRecords();
application.closeOldMastFile();
} // end main
} // end class CreateTextFileTest-------------------------------------------------------------------------------------------------
// Exercise 14.8: TransactionRecord.java
// A class that represents on record of information
package org.egan; // packaged for reuse
public class TransactionRecord
private int account;
private double amount;
// no-argument constructor calls other constructor with default values
public TransactionRecord()
this(0,0.0); // call two-argument constructor
} // end no-argument AccountRecord constructor
// initialize a record
public TransactionRecord(int acct, double amt)
setAccount(acct);
setAmount(amt);
} // end two-argument TransactionRecord constructor
// set account number
public void setAccount(int acct)
account = acct;
} // end method setAccount
// get account number
public int getAccount()
return account;
} // end method getAccount
// set amount
public void setAmount(double amt)
amount = amt;
} // end method setAmount
// get amount
public double getAmount()
return amount;
} // end method getAmount
} // end class TransactionRecord -------------------------------------------------------------------------------------------------
// Exercise 14.8: AccountRecord.java
// A class that represents on record of information
package org.egan; // packaged for reuse
import org.egan.TransactionRecord;
public class AccountRecord
private int account;
private String firstName;
private String lastName;
private double balance;
// no-argument constructor calls other constructor with default values
public AccountRecord()
this(0,"","",0.0); // call four-argument constructor
} // end no-argument AccountRecord constructor
// initialize a record
public AccountRecord(int acct, String first, String last, double bal)
setAccount(acct);
setFirstName(first);
setLastName(last);
setBalance(bal);
} // end four-argument AccountRecord constructor
// set account number
public void setAccount(int acct)
account = acct;
} // end method setAccount
// get account number
public int getAccount()
return account;
} // end method getAccount
// set first name
public void setFirstName(String first)
firstName = first;
} // end method setFirstName
// get first name
public String getFirstName()
return firstName;
} // end method getFirstName
// set last name
public void setLastName(String last)
lastName = last;
} // end method setLastName
// get last name
public String getLastName()
return lastName;
} // end method getLastName
// set balance
public void setBalance(double bal)
balance = bal;
} // end method setBalance
// get balance
public double getBalance()
return balance;
} // end method getBalance
// combine balance and amount
public void combine(TransactionRecord record)
balance = (getBalance() + record.getAmount());
} // end method combine
} // end class AccountRecord -------------------------------------------------------------------------------------------------
// Exercise 14.8: FileMatch.java
import java.io.File;
import java.io.FileNotFoundException;
import java.lang.IllegalStateException;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.Formatter;
import java.util.FormatterClosedException;
import org.egan.AccountRecord;
import org.egan.TransactionRecord;
public class FileMatch
private Scanner inTransaction;
private Scanner inOldMaster;
private Formatter outNewMaster;
private Formatter theLog;
// enable user to open file
public void openTransFile()
try
inTransaction = new Scanner(new File("trans.txt"));
} // end try
catch (FileNotFoundException fileNotFoundException)
System.err.println("Error opening file.");
System.exit(1);
} // end catch
} // end method openTransFile
// enable user to open file
public void openOldMastFile()
try
inOldMaster = new Scanner(new File("oldmast.txt"));
} // end try
catch (FileNotFoundException fileNotFoundException)
System.err.println("Error opening file.");
System.exit(1);
} // end catch
} // end method openOldMastFile
// enable user to open file
public void openNewMastFile()
try
outNewMaster = new Formatter("newmast.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openNewMastFile
// enable user to open file
public void openLogFile()
try
theLog = new Formatter("log.txt");
catch (SecurityException securityException)
System.err.println("You do not have write access to this file.");
System.exit(1);
} // end catch
catch (FileNotFoundException filesNotFoundException)
System.err.println("Error creating file.");
System.exit(1);
} // end method openLogFile
// update records
public void updateRecords()
TransactionRecord transaction = new TransactionRecord();
AccountRecord account = new AccountRecord();
try // read records from file using Scanner object
System.out.println("Start file matching.");
while (inTransaction.hasNext() && inOldMaster.hasNext())
transaction.setAccount(inTransaction.nextInt()); // read account number
transaction.setAmount(inTransaction.nextDouble()); // read amount
account.setAccount(inOldMaster.nextInt()); // read account number
account.setFirstName(inOldMaster.next()); // read first name
account.setLastName(inOldMaster.next()); // read last name
account.setBalance(inOldMaster.nextDouble()); // read balance
if (transaction.getAccount() == account.getAccount())
while (inTransaction.hasNext() && transaction.getAccount() == account.getAccount())
account.combine(transaction);
outNewMaster.format("%d %s %s %.2f\n",
account.getAccount(), account.getFirstName(), account.getLastName(),
account.getBalance());
transaction.setAccount(inTransaction.nextInt()); // read account number
transaction.setAmount(inTransaction.nextDouble()); // read amount
else if (transaction.getAccount() != account.getAccount())
outNewMaster.format("%d %s %s %.2f\n",
account.getAccount(), account.getFirstName(), account.getLastName(),
account.getBalance());
theLog.format("%s%d","Unmatched transaction record for account number ",transaction.getAccount());
} // end while
System.out.println("Finish file matching.");
} // end try
catch (NoSuchElementException elementException)
System.err.println("File improperly formed.");
inTransaction.close();
inOldMaster.close();
System.exit(1);
} // end catch
catch (IllegalStateException stateException)
System.err.println("Error reading from file.");
System.exit(1);
} // end catch
} // end method updateRecords
// close file and terminate application
public void closeTransFile()
if (inTransaction != null)
inTransaction.close();
} // end method closeTransFile
// close file and terminate application
public void closeOldMastFile()
if (inOldMaster != null)
inOldMaster.close();
} // end method closeOldMastFile
// close file
public void closeNewMastFile()
if (outNewMaster != null)
outNewMaster.close();
} // end method closeNewMastFile
// close file
public void closeLogFile()
if (theLog != null)
theLog.close();
} // end method closeLogFile
} // end class FileMatch-------------------------------------------------------------------------------------------------
// Exercise 14.8: FileMatchTest.java
// Testing class FileMatch
public class FileMatchTest
// main method begins program execution
public static void main( String args[] )
FileMatch application = new FileMatch();
application.openTransFile();
application.openOldMastFile();
application.openNewMastFile();
application.openLogFile();
application.updateRecords();
application.closeLogFile();
application.closeNewMastFile();
application.closeOldMastFile();
application.closeTransFile();
} // end main
} // end class FileMatchTest-------------------------------------------------------------------------------------------------
Sample data for master file:
Master file
Account Number Name Balance
100 Alan Jones 348.17
300 Mary Smith 27.19
500 Sam Sharp 0.00
700 Suzy Green -14.22Sample data for transaction file:
Transaction file Transaction
Account Number Amount
100 27.14
300 62.11
300 83.89
400 100.56
700 80.78
700 1.53
900 82.17 -------------------------------------------------------------------------------------------------
My FileMatch class program above has bugs in it.
The correct results for the newmast.txt:
100 Alan Jones 375.31
300 Mary Smith 173.19
500 Sam Sharp 0.00
700 Suzy Green 68.09The correct results for the log.txt:
Unmatched transaction record for account number 400Unmatched transaction record for account number 900------------------------------------------------------------------------------------------------
My results for the newmast.txt:
100 Alan Jones 375.31
300 Mary Smith 111.08
500 Sam Sharp 0.00
700 Suzy Green -12.69My results for the log.txt
Unmatched transaction record for account number 700-------------------------------------------------------------------------------------------------
I am not sure what is wrong with my code above to make my results different from the correct results.
Much help is appreciated. Please help.From the output, it looks like one problem is just formatting -- apparently you're including a newline in log entries and not using tabs for the newmast output file.
As to why the numbers are off -- just from glancing over it, it appears that the problem is when you add multiple transaction values. Since account.combine() is so simple, I suspect that you're either adding creating transaction objects incorrectly or not creating them when you should be.
Create test input data that isolates a single case of this (e.g., just the Mary Smith case), and then running your program in a debugger or adding debugging code to the add/combine method, so you can see what's happening in detail.
Also I'd recommend reconsidering your design. It's a red flag if a class has a name with "Create" in it. Classes represent bundles of independant state and transformations on that state, not things to do. -
How to append new records to already existing BDB file. I am using BDB 4.5 version.
Example:
i have created 1.bdb and inserted 10 records and closed the environment.
now i have to append few more records into 1.bdb.Open the environment again, the db again and go about inserting records following the usual path in the code. Hope I understood the question right.
-
Hi
I Need VDS script in order to change domain client local administrator password in my domain ,and put this script in startup script via group policy, but for security purpose I want to randomize local administrator password and log new password
set for each computer on a text file, I want to over write the old password of eachcomputer in log file with new one in order to have the update log file ,my support team some times need administrator password for troubleshooting.
I need a script for generate randomize administrator password which make log file to recorded new administrator password with associated computer name on it and each time new administrator password set it over write the old record on
the log file and update the content of log file automatically.
RegardsHi
I need a script for generate randomize administrator password which record new password on a log file with associated computer name and each time new administrator password set for a computer it over write the old record
on the log file and update the content of log file automatically.
Regards -
I have some my violin recorded audio files and want them to be converted to printable notation throw "audio to score"from Factory. But do not have a normal result. Could someone help me, please. .
seeren wrote:
Normal result is on the sloppy side of inaccurate.
Wish I'd started this topic so I could give you a green star!
Great description. -
Recorded old files access in UCCX using Calabrio recording server
Hi
Any help or idea appreciated.
We are using UCCX 7.1.5 and QM calabrio server to have agents calls and their screen shots recorded. The files are being backed up by netbackup to a network cluster. Lately the disk started to be full and no new recorded files are being accepted anymore in the calabrio recording server. The recorded files are all backed up and I need to free some space the disk of the server so that it accpets new recorded files.
Supervisors are accessing the historical recorded files which are sotred also on the calabrio server. I need to know how could I access and let the supervisor access the network cluster to retreive the old recorded files as I need to delete them from the server and have the supervisors to access them from their backed up locations.
Can I have any suggestion here please
Right now I am getting the following errors on the calabrio server due to space limitation on the disk
of Error QM2000 which means that the server reached his HDD space threshold and does not take any calls from Desktop PCs until space is cleared up.
Abdul
Thank youI probably have asked a stupid question.
My recorded streams are still saved in the applications/appName/streams folder.
And I redirect the www.mydomain.com/streams to point to the applications/appName/streams folder.
And the rmtp recorded streams are abled to connect through http now. -
Questions about the content of download meeting recording .zip file
I tried posting this on the resurrected Connect forum, but my Adobe ID wasn't recognized there....
Concerning the files that are included in the .zip file of the meeting recording that can be downloaded:
1) Is there any documentation describing the files and their contents (i.e. what each file represents, what each XML element and attribute in those files represent)
2) Are there any files that capture mouse movement on a shared desktop?
Thank you!Hi Sean,
Regarding your first post:
Thanks Jorma! I don't have access to an FMS build at the moment but I'm quite certain it's there. As for contacting Jaydeep, I am 90% sure he authorized us to broadcast his email on here if folks had questions about the tool, but, in the case that I'm wrong and he didn't - I'm going to double-check first.
Regarding your most recent post..
"To be clear, the most critical goal I'm trying to accomplish is to create an automated process that will download the recording meeting at its highest quality in a consistent and reliable manner".
I personally believe this is possible; unfortunately, I haven't seen it done yet. If your recording contains:
- audio
- a camera feed
- screensharing
Then I think you might be able to get this going. If it contains shared content, like a shared PPT, this gets trickier.
"To do this, of course, I have to reproduce some of the functionality that Connect provides, starting and combining video and audio streams according to the instructions in the control files."
Exactly right. If your recording didn't contain shared content, then all you've got on your hands are a bunch of audio/video files that you could edit together as you wanted with your favourite video editing tool. If it contains shared content, here's (at a high level) what's happening.
For shared PPTs or FTContent files:
First (for version 9 recordings only), Connect reads the information on the Shared Content's location and SCO within mainstream and indexstream and validates it before loading it. I don't recall this happening to the same extent with version 8 or earlier, but maybe it was. Now, if the content is validated (ie. Connect can find it) the share pod will display as black, if it doesn't, you get an empty pod with an message like "No content is being shared" or something like that.
Connect then looks at the actual FTContent file, and loads the content that is to be shared using the file path and sco ID listed in here. It's important to note that the SCO ID and file path in here will likely not be the same as the original file you uploaded to your room, it's a new SCO id (I believe SCOs of this type are called referenced scos) and new path.
Now...if I was going to build some sort of player which would play all these files in one screen to make a recording...I might not want to use Connect's code here. If you know the file path to the shared content (from FTContent), you could easily view it with the content URL (conveniently also in FtContent). I'm not a coder, but I'm envisioning something like Presenter's GUI where you've got the presentation's content in the main area, and a video file (if there is one) playing back on the side.
Anyways, food for thought if you want to try to go about this. Connect recordings are incredibly complex and they come with a big learning curve, but if you can make sense of them the knowledge is quite valuable. -
How to read an ascii file and record data in a 2d array
HI everyone,
I have an experimental data file in ascii format. It contains 10 data sets.
I'm trying to read the ascii file and record data in a 2d array for further analysis,
but I still could not figure it out how to do it.
Please help me to get this done.
Here I have attaced the ascii file.
-Sam
Attachments:
data.asc 123 KB
2015-01-27_18-01-31_fourier_A2-F-abs.zip 728 KBGot it!
Thank you very much !
-Pamsath -
Hi,
I am using 8i version and SQL*Plus 8.1.
When spooling a SQL statement to a file the number of records in
the file is doubled (the statement returns 27800, for example,
while the file contains 55600).
Why? How can I prevent it?
By the way, I am very new to oracle, so please be gentle...
Thanks.Are you using both a semi-colon ';' and a slash '/' to terminate
your SQL statement?
In SQL*Plus a SELECT statement can be terminated with either one.
If you subsequently use a '/', then the statement will be run a
second time.
E.g. do:
select * from dept;
and don't do:
select * from dept;
If this is not your problem, can you confirm that the records are
repeated? Or is each record wrapped over two lines?
- CJ -
HELP!! I am trying to record a presentation on Adobe Presenter 10, I have had no problems in the past, I added motion to some of the boxes in my presentation, now when I try to record I get this error message!!!
Adobe Presenter
Adobe Presenter has encountered an unexpected problem while
working with this presentation. Try saving your work to a new file and
restarting PowerPoint. If the problem persists, consult the Help menu
item, or contact support at http://www.adobe.com/support/presenter.Please provide your system specification. Also is it happening on a specific presentation or every presentation.
Regards,
Rajeev. -
Recording audio files in PCM_FLOAT format
Hello!
I'm trying to record voice sample and I've got a problem with my .wav format. With:
AudioFormat format = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 44100.0F, 16, 1, 2, 44100.0F, false);everything works fine. But what I need (because of further analysis of this audio file in Matlab) is PCM_FLOAT format:
AudioFormat format = new AudioFormat(AudioFormat.Encoding.PCM_FLOAT, 8000.0F, 32, 1, 4, 8000.0F, true);which unfortunately returns an error:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException:
No line matching interface TargetDataLine supporting format PCM_FLOAT 8000.0 Hz, 32 bit, mono, 4 bytes/frame, is supported.I've tried a lot of different combinations with PCM_FLOAT but every one of them returns same exception. I'm probably missing something but the question is: what? How can I find what audio formats could work with my sound card? If I can only use PCM_SIGNED or UNSIGNED how can I convert recorded .wav file to PCMFLOAT?I've finally been able to try what you suggested. As server received from the client an array of bytes I tried to convert it to an array of floats:
IntBuffer sbuf = ByteBuffer.wrap(myAudioBytes).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer();
int[] audioInts = new int[sbuf.capacity()];
sbuf.get(audioInts);
float[][] audioFloats = new float[audioInts.length][1];
for (int k = 0; k < audioInts.length; k++)
audioFloats[k][0] = ((float)audioInts[k])/0x8000; // Two dimensions in audioFloats because Utils.floatsToWav needs to know whether it's mono or not.
}and then save it to file using http://code.google.com/p/j-simple-wav-io/ :
Utils.floatsToWAV(audioFloats,new File("output.wav"),8000);Unfortunately it didn't work. I checked the .wav files with AudioFileInfo from jsresources.org and it recognizes the format of output.wav as:
Type: WAVE
AudioFormat: PCM_SIGNED, 8000.0 Hz, 16 bit, mono, 2 bits/frame, little-endian
Lenght of audio data: 22050 frames, 44100 bytes, 2,75625 seconds
Total lenght of file (including headers): 44144 byteswhile valid audio file (I mean the one that actually works with my Matlab script) is:
Type: WAVE
AudioFormat: PCM_FLOAT, 8000.0 Hz, 32 bit, mono, 4 bits/frame
Lenght of audio data: unknown
Total lenght of file (including headers): unknownBefore that I tried to do it another way:
- getTargetEncodings(originalFormat) --> returned PCM_FLOAT (amongst others);
- isConversionSupported(targetFormat, originalFormat) --> returned true;
(where originalFormat is "PCM_SIGNED, 8000.0F, 16, 1, 2, 8000.0F, false" and targetFormat is "PCM_FLOAT, 8000.0F, 32, 1, 4, 8000.0F, false" - as you can see above I don't really know if Matlab wants little or big endian).
so I thought sth like this will do the trick:
ByteArrayInputStream bais = new ByteArrayInputStream(myAudioBytes);
AudioInputStream AIS = new AudioInputStream(bais, originalFormat, myAudioBytes.length / originalFormat.getFrameSize());
if(AudioSystem.isConversionSupported(targetFormat, originalFormat))
AIS = AudioSystem.getAudioInputStream(targetFormat, AIS);
File file = new File(fileName);
int nWrittenBytes = 0;
try
nWrittenBytes = AudioSystem.write(AIS, AudioFileFormat.Type.WAVE, file);
}It didn't work either (but it seems that this bit can help switching from 16 to 32 bits and from 2 to 4 bits/frame).
So - clearly I've done something wrong but again have no idea what. I'm sort of new to Java and an absolute novice to processing audio files so thanks for all the advices :-).
Maybe you are looking for
-
How do I get the Web Console on top, in FireFox 21 Mac?
In Firefox 21, the Web Developer Web Console seems to be fixed to the bottom with no option to change it. In previous version of FF, there was an option to put it on the top of the window. The bottom is a bad place for the Web Console, especially for
-
Moving to the USA from the UK with an unlocked iPhone - what options?
I currently have a UK iPhone 3GS on O2. The phone has been unlocked legitimately by O2 (i.e. Not jail broken). I am now relocating to the USA with my employer and want to obviously take and use my iPhone. Since my phone is unlocked to any network I'm
-
Dropship - PO Diagnostics error
Hi All, I ran PO Diagnostics report for Requisition import issue then i got below two errors, 1.ERROR - Deliver to location Id is not valid ACTION - Ensure deliver to location id is valid and 2.ERROR - The Item Id is not purchasing enabled in the pur
-
Hi Gurus, I have few questions about connecting Xcelsius directly to BW. 1] Is there any downside of directly creating connection between Xcelsius and SAP? 2] For how long QaaWS would be available? 3] If given an option which way we should go QaaWS o
-
Lenovo B570e brightness not working
i have bought lenovo B570e nine months ago. everything was going fine. now i have reinstalled the win 7 but brightness control is not working. other Fn keys are working correctly except brightness. laptop brightness is stuck to maximum. kindly help m