|
A .ram file is a RealVideo file. Download the RealProducer encoding tool from RealNetworks. From what I remember, the basic encoder is free.
How low can you go ? (MS rant)
|
|
|
|
|
Almost forgot, but that was obvious in my mind, you just need to download the Real Encoder SDK to get samples to do just that.
How low can you go ? (MS rant)
|
|
|
|
|
Hi everyone,
My name is Sidney and I need some advise regarding a search and retrieve problem. I am currenly studying and still learning C++. My problem is this, I am doing a search on a large flat file, this flat file is like my database with the following format
(Note this is a Fixed Length Flat File)
OriginalText L35
Punctuated L35
Code L5
===================
Total Length 75 (Each Record)
This is what my flat file looks like:
A A.
A A. 0
AB A.B. 0
AB AB 1
ACAD Acad. 4
ACR Acr. 4
ADJ Adj. 0
ADM Adm. 0
AGCY Agcy. 4
AK AK 1
AL AL 1
ALC Alc. 0
ALD Ald. 0
ALTA AB 1
AM A.M. 0
AMB Amb. 0
AND And
ANX Anx. 4
APT Apt. 4
APTS Apts. 4
AR AR 1
ARC Arc. 4
ARPT Arpt. 4
ASSISTANT Assistant 5
The main function of my program is to accept a parameter(text) search it in the the flat file (OriginalText Field in particular) if its found I will return the Punctuated Text on the calling program.
If i where to ask you what will you recommend to be the fastest way to make my search and return the value in the calling program? Here's my current program's code... and it runs very slow that's why i am seeking some advise from a guru like you to make my program run faster. This code is messy i'm telling you
int pos,Length;
FILE *stream;
//FILE *pFile;
int LastPos,ssfpos,sslpos,i,wordnum,storageIndx,sympos,TempOutPos;
unsigned int nbytes = 999999;
char p;
char *tblCode;
char tblCodeChar[] = "XX";
char test1[2];
char FoundGlobal;
int result,len;
//pFile = fopen ("Output.txt","at");
if( (stream = fopen( "prspunct32.ctb", "r" )) == NULL ){ /*Open my Flat File for input
strcpy(lpAlpha2, "The file 'data' was not opened\n" );
return(TRUE);
}
else{
fread( buffer, sizeof( char ), 999999 , stream );
}
if((int)*lpNumeric == 0 || (int)*lpNumeric == 1 || (int)*lpNumeric == 4){ /* Get the Text to be search
tblCode = _itoa((int)*lpNumeric,tblCodeChar,10);
}
Length = (int)*(lpNumeric+1);
_itoa((int)Length,test1,10);
memcpy(Storage1,lpAlpha1,Length);
Storage1[Length] = ' ';
Storage1[Length+1] = '\0';
string OutStr;
string TempOut;
string GlobalFoundStr;
string str1 = buffer;
string ss;
string sstblCode;
string firstchar;
string ssTempStr;
vector<string> storage;
string str2 = Storage1;
sslpos = 0;
wordnum = 0;
while(true){
ssfpos = str2.find(" ",sslpos);
if (ssfpos < 0){
break;
}
ss = str2.substr(sslpos,ssfpos - sslpos);
storage.push_back(ss);
sslpos = ssfpos + 1;
wordnum = wordnum + 1;
while(true){
ssTempStr = str2.substr(sslpos,1);
if (ssTempStr == " "){
sslpos = sslpos + 1;
}
else{
break;
}
}
}
//sort(storage.begin(),storage.end()); //For Sorting
//string::size_type len;
storageIndx = 0;
while (true){
if (storageIndx == wordnum){
break;
}
ss = storage[storageIndx];
sympos = ss.find_first_of(".");
if (sympos >= 0){
ss[sympos] = ' ';
}
storageIndx = storageIndx + 1;
len = ss.length();
LastPos = 0;
while (true){
pos = str1.find (ss,LastPos);
if (pos >= 0){
if (pos == 0){
string lastchar = str1.substr(pos + len,1);
if (lastchar == " "){
//string found = str1.substr(pos,35);
//std::cout << found << "\n";
TempOut = str1.substr(pos + 36,35);
TempOutPos = TempOut.find(" ",0);
TempOut = TempOut.substr(0,TempOutPos);
OutStr = OutStr + TempOut + " ";
LastPos = pos + 1;
break;
}
}
else{
firstchar = str1.substr(pos - 1,1);
}
if (firstchar != "\n"){ //Miss Match
//cout << "hindi ito" << "\n";
LastPos = pos + 1;
}
else{
string lastchar = str1.substr(pos + len,1);
if (lastchar == " "){
//if ((isspace(tblCodeChar[0])) == 0){
if (tblCodeChar[0] != 'X'){ //Table Codes with Value
sstblCode = str1.substr(pos + 75,1);
if (sstblCode == tblCodeChar){
//string found = str1.substr(pos,35);
//std::cout << found << "\n";
TempOut = str1.substr(pos + 36,35);
TempOutPos = TempOut.find(" ",0);
TempOut = TempOut.substr(0,TempOutPos);
OutStr = OutStr + TempOut + " ";
LastPos = pos + 1;
FoundGlobal = 'N';
break;
}
else{ // tble Codes does not Match data
FoundGlobal = 'Y';
GlobalFoundStr = str1.substr(pos + 36,35);
TempOutPos = GlobalFoundStr.find(" ",0);
GlobalFoundStr = GlobalFoundStr.substr(0,TempOutPos);
LastPos = pos + 1;
}
}
else{
if (tblCodeChar[0] == 'X'){ //Table Coodes for Global (space)
sstblCode = str1.substr(pos + 75,1);
if (sstblCode == " "){
//string found = str1.substr(pos,35);
//std::cout << found << "\n";
TempOut = str1.substr(pos + 36,35);
TempOutPos = TempOut.find(" ",0);
TempOut = TempOut.substr(0,TempOutPos);
OutStr = OutStr + TempOut + " ";
LastPos = pos + 1;
break;
}
else{ // tble Codes does not Match data
LastPos = pos + 1;
}
}
}
}
else{ //Miss Match
//cout << "hindi ito" << "\n";
LastPos = pos + 1;
}
}
}
else{ //Not Found
//cout << "WALA" << endl;
if (FoundGlobal == 'Y'){
OutStr = OutStr + GlobalFoundStr + " ";
FoundGlobal = 'N';
}
else{
for(i=0;i<len;i++){
if(i!="0){
" p="ss[i];
" result="isalpha(p);
" if="" (result=""> 0){
ss[i] = (char)tolower(p);
}
}
}
OutStr = OutStr + ss + " ";
}
break;
}
}
}
len = OutStr.length();
lpNumeric[1] = char(len);
OutStr.copy(lpAlpha2,len);
fclose(stream);
//fclose(pFile);
return(TRUE);
Thanks/Regards
Sidney
|
|
|
|
|
Oppss sorry about the Format of my data.. it did not came out right, here's the correct format of my flat file:
A A.
A A. 0
AB A.B. 0
AB AB 1
ACAD Acad. 4
ACR Acr. 4
ADJ Adj. 0
ADM Adm. 0
AGCY Agcy. 4
AK AK 1
AL AL 1
ALC Alc. 0
ALD Ald. 0
ALTA AB 1
AM A.M. 0
AMB Amb. 0
AND And
ANX Anx. 4
APT Apt. 4
APTS Apts. 4
AR AR 1
ARC Arc. 4
ARPT Arpt. 4
ASSISTANT Assistant 5
Thanks/Regards
Sidney
|
|
|
|
|
Dear everyone,
This is my first question in this message board.I am not sure
whether the title is suitable for my question or not but by reading
my message, I guess that you can understand my problems.
I have created a simple program which retrives data written in
an .ini file(actually any text file will do).The data retrieved from the file
will be displayed at the combo box.I have created this part.
The problem here is that I want to hide the information written in the .ini
file from the users(Sometimes, there are information which we don't want the users to know).The user can update the application by downloading a new .ini file from a web side.In short,the update of the software only deals with the .ini file.
I think that most people will encrypt the .ini file and decrypt it
before loading the data into the combo box.I would like to do it in this
way but I don't have enough knowledge.I want to decrypt the encrypted .ini file into a buffer because if I decrypt the encrypted .ini into a file,
the user might see it.
Is there any other ways to do this?I just want to
1)Hide the .ini file content from the user and at the same time, I need to retrieve data from the file and display it at the combo box.
2)I want to update the .ini file.
Helps are needed.
Thanks alot.
From Joji.
|
|
|
|
|
|
I am writing a small tool to export registry sections in Xml to make it much easier whenever it comes to do a registry diff.
If anybody is willing to see a feature along with that, just let me know.;)
How low can you go ? (MS rant)
|
|
|
|
|
hello sir
i need help on c# API for converting XSL-FO to PDF and other formats.
can u help me out
Asim
|
|
|
|
|
Hi all. I've been reading code project for a long time, but I've never posted anything here (well, not yet!) I'm currently working on a big C++ application and as part of that I decided it would be fun to write something to add shadows to all the popup windows in my app. Anyway, I came up with a library I'm calling Z'Ha'Dum, would anybody be interested in an article on that or has it already been done (I searched but couldn't find anything)?
You can get Z'Ha'Dum here:
http://homepage.ntlworld.com/mark.lord/zhadum/
It's under a zlib-like license (i.e., use freely just don't pretend you wrote it and credit would be nice).
|
|
|
|
|
Only article I know of thats even close is AlphaBlend() for flicker free window fad in and fade out effects....or something to that extent...
Go for it!!!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
It looks good. Go for it. A shame it doesn't work with other than W2K or XP.
|
|
|
|
|
Great name BTW
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
If yo go to Z'Ha'Dum you will die!
Always nice to find another B5 fan
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
Unfortunately I never saw the end of season 4 or any of season 5 (when it moved to cable). I am so getting the series on DVDs whenever it comes out.
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I think you should go for it. It will make an interesting article. However, I would recommend that you add some more information about the technique used, why it does not work on Windows 9x/Me, ...etc.
Regards,
Victor
|
|
|
|
|
Hello,
Does anybody know if there is a tool which will take a Dialog resource and display the names of the controls it contains rather than drawing the control itself.
I'm thinking about creating such a tool and write an article on it. I'd currently maintaining an application with dozens of hefty dialogs I want to tidy up and I'd find such a utility very useful.
John
|
|
|
|
|
Just to clarify this, I want to display a dialog which draws the name of each contained control at the position where that particular control would appear.
|
|
|
|
|
Where the name of the control is the ID that you gave it?
I don't know of a specific tool for this. But it sounds useful, as I never can remember the ID's I give to controls.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
I manually enter any DDX mapping because my Class Wizard doesn't like my code since I map my controls to data members of pointers to CDocument classes:
DDX_Text(pDX, IDC_COLL_PRES_EDIT, m_WallData->m_CollapsePressure);
So it's always handy to have a list of Control names.
|
|
|
|
|
Hello, the codegurus around the world.;)
You can do this by C#.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|
|
Hi,
Could you send me a printscreen of what it looks like in c# maybe? I presume you still can't do it in VC7?
It's unlikely that I'll be able to persuade my bosses to allow me to convert the mountain of code to C# just yet, it's already well overdue, so I'll just create a quick version for Windows resource files. It won't be an addin, just a separate tool where you browse for a resource file, select a dialog and you get a static image.
Maybe later I could change it to a VS AddIn. Anybody have anymore ideas?
I'm currently away at a client site in Aberdeen in Scotland, with bugger all to do in the evenings so I've decided to work on my own project.
|
|
|
|
|
What about some addin that autochanges for example:
[space][l][b][space] to [{]
and so on, so that one could more easily have a natural flow of writing, code without having to move the hands to the numbers.
all this shouldn't be too hard to implement, but VERY usefull.
|
|
|
|
|
I found a couple of macros here that do some autoformatting, but am not sure if it does what you mention. Shouldn't a macro be easier? And if an addin were to be written, I think I wrote a VS addin some time back, that basically shows how to extract ActiveDocument text and replace stuff here.
I'd be interested to work with you.
'My capacity for happiness', he added, 'you could fit into a matchbox without taking out the matches first'.
- Marvin, the robot.
Amit Dey
sonork: 100:18407
msn: visualcdev
|
|
|
|
|
Hi Hugo,
sounds like a good idea(esp. the CP part). I'm not one of those guys who extensively use VS.NET at work. But I have written a few articles on Office addins and as far addins still use IDTExtensibility2 and stuff.
I'd be interested to know what language you are thinking of implementing it? I'd like to write a VS.NET addin as an ATL/C++ project, that also is updatable etc i.e. as per CP guidelines.
Hush,hush...
thought I heard you call my name now.
Kula Shaker.
Amit Dey
Latest articles at CP - Writing Word addins
Office addin
|
|
|
|
|
im trying to to do a language module to get synonyms of an input string.
And have decided upon using the dictionary provided by word.as creating an efficient dictionary itself seems like reinventingthe wheel.
i came upon the msth_am.lex and msth32.ll files
along with couple others too
which i believe is used by the word application for its thesaurus /spell check and other lex functions.[this too is only an assumption]
there seem to be functions exposed like
ThesaurusCheck
and
ThesaurusGetString
could anyone provide me inputs on -
1.how to use these functions?
2.is there any more efficient/simpler method to acces the word thesraus function
though i dont sem to be getting much inputs from else where including microsoft
open to any suggestions
fordge
|
|
|
|
|