Visual C++ :: Extracting Time Stamps From PDF?

Apr 26, 2013

I am trying to automatically extract all time stamps in a pdf file. These are typically in a line like:

when="2010-07-30T15:20:30+04:00"

For this I was thinking of using CStdioFile and the ReadString function. Somehow this doesn't work. My example code is below. Is this because pdf is not a true text file, because strings read can be longer than some max,...? Any quick way of reading the file and extracting the desired text between the brackets?

Code:
CStdioFile InputFile;
if (InputFile.Open(FileName,CFile::modeRead)) {

[Code]....

View 14 Replies


ADVERTISEMENT

C++ :: Does Pointer Keep Track Of Time Stamps When It Is Created

Oct 14, 2013

does a pointer keep track of time stamps when it is created? i am trying to use it to create a table that can store the access count and the temporal locality at the same time.

View 5 Replies View Related

C++ :: Extracting From Loops - Run X Number Of Times And Produce A Prize Each Time

Sep 19, 2013

so i have a loop that will run x number of times and each time it will produce a prize which is a certain sum of money. I need to a way to sum all the money earned. I am thinking there should be a way to extract the prize one for each time the loop runs but i am not sure how to do that.

#include <iostream>
#include <string>
#include <cstdlib>
#include <cmath>
using namespace std;

int main() {
cout <<"Option A: Drop one chip into one slot" << endl;

[Code] .....

View 2 Replies View Related

Visual C++ :: Extracting Stuff From IHTMLDocument2?

Feb 20, 2013

I got as far as getting a web page into an IHTMLDocument2 but I don't know what to do from there, all the examples I found are C# or .NET or something else I don't understand.

Any simple example in C++ of getting all the links from an IHTMLDocument2 ?

I was able to do this:

Code:
IHTMLElementCollection* collection;
hResult=document->get_links(&collection);
long nLinks;
collection->get_length(&nLinks); // returns correct number
collection->Release();

How do I loop through the collection and extract the actual links ? Also, if they come out as BSTR do I simple treat them as WCHAR* ? If I can do that I can figure out the rest myself.

View 2 Replies View Related

Visual C++ :: Assigning Values To And Extracting Them From A Vector

Nov 28, 2012

I am writing a program to play rock paper scissors, and I am trying to get a vector to store the result of a given round of play, and output it as a declaration as to who won. I can't figure out how to store the values in the vector properly, and how to use the vector as an argument to output the result of play.

Code:
#include <iostream>
#include <iomanip>
#include <ctime>
#include <vector>
#include <cstdlib>
#include <string>
using namespace std;
const string name[4] = {" ", "rock", "paper", "scissors"};
const string roundResult[3] = {"computer win", "player win", "tie"};

[Code]....

View 1 Replies View Related

C :: Extracting Second Row From Array?

Mar 1, 2015

I'm having trouble trying to extra the second row from the array:

Code: double data[10][10] = {{0,5,10,15,20,25,30,35,40,45},{0,13,22,37,54,62,64,100,112,126}};

When I do this, it posts the entire array:

Code: int x,y;
for(x=0;x<2;x++)
{
for(y=0;y<10;y++)
{
printf("%.0lf ",data[1][y]);
}
}

View 5 Replies View Related

Visual C++ :: Using One Thread At A Time With CSemaphore

Oct 6, 2014

I need using CSemaphore class in MFC C++ application. I have an edit1 box with multil ine and each line has a string. I'm trying to loop through edit1 box and for each string to start a thread that is using the string for specific function. I'm trying to limit the run of only one thread at the same time with semaphores but all treads start at the same time.

So when i click button1 i loop through edit1 box and start threads:

Code:
void CMFCApplication1Dlg::onButton1Click() {
int i, nLineCount = edit1.GetLineCount();
CString strText, strLine, mesaj;
for (i = 0; i < nLineCount; i++) {

[Code] ....

While looping through edit1 box multi line and starting the threads:

Code:
UINT CMFCApplication1Dlg::StartThread(LPVOID param) {
WaitForSingleObject(semafor, INFINITE); // wait for semafor to signal
THREADSTRUCT* ts = (THREADSTRUCT*)param;
// here i'm doing some operations with the string from edit1 box
ReleaseSemaphore(semafor, 1, NULL); //release the semaphore for next thread to begin
}

Instead of running only one thread at a time all threads start. What am i doing wrong ?

View 14 Replies View Related

C++ :: Extracting Numbers From A String

Dec 5, 2014

So, I have a string and I need to extract numbers from it. I've tried different things but they are not working. So, Here is what I have:

int main() {
string myString;
char *strPtr;

cout << "Enter a string to evaluate: " << endl;
getline(cin, myString);

[Code] ....

View 10 Replies View Related

C++ :: Extracting File Name From Path?

May 17, 2013

I have a string like this

const char *filename = "C:/Qt/progetti/worlds/fasr.world";

then I have a string like this

char *pathdir = "C:/Qt/progetti/worlds";

I would get this string: "worlds/fasr.world" how should I do ?

View 6 Replies View Related

C/C++ :: Extracting Strings From Files

Feb 15, 2013

We have an assignment to produce code to gather a string of input from the user in which they are entering a date. We then have to extract parts of that string to make substrings, and display different formats for the date(I will add my code in here so you can see what I have done). It took me a long while plucking away at this to understand this part. You will see that at the end of my code I have opened a file months.txt. We were provided with a file which states months corresponding to dates. I.e. 01January 02February 03March 04April, and so on until December. Exactly how I have typed it is how it is in the file.

I understand how to open and extract what is in the file as a string. I have extracted this as a string called myMonth (as you can see in the code as well) NOW,

I am supposed to have the program search for the month in the file, matching that to the month the user has input earlier, and then use the number infront of that month. I understand the basics of using find(), and making substrings. But how on earth do you get the computer to correlate what the user has input for a month, to finding that in the file, and then using the correct number.

Here is the code I have done so far:

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
string myDate; // Date input from user;
string myMonth; // Input from months.txt

[Code] ....

View 1 Replies View Related

Visual C++ :: 0xC0000005 - Access Violation (Each Time From Different DLL)

Dec 21, 2012

I have been given a task to debug a C++ project. I have not written a single line of code in this project!!

This project executes for about 5 minutes without problem. Then it ends with an exception "Unhandled exception at (some .dll name) in EITos.exe: 0xC0000005: Access violation reading location "

Now every time I execute the program. The error is from a different dll. Sometimes it is a dll created by other programmers, sometimes it is related to QT. So I don't think this is a code problem. Is there any project setting that would affect this?

View 6 Replies View Related

Visual C++ :: Converting Time Into Slandered And Military

Mar 3, 2015

This program is suppose to store input from a user (example 14 15 27) and output it three times. Once to confirm the input using the get function to recall the data, once to look like military time (14:15:27), and once to look like slandered time (2:15:27 p.m.).

The program runs, but this is what I'm getting:

I'm thinking its because I'm using the same integers to store two sets of data. I tried to create different integers for every set of data it didn't seem to fix the problem. The fact that the program is running makes trying to figure out where the problem quite confusing to say the least.

Code:
#include <iostream>
using namespace std;
class time {
private:
int hr, min, sec;

[Code] ....

View 6 Replies View Related

Visual C++ :: How To Convert Time Into CTime Format In MFC

Jun 13, 2013

I have total time in seconds (say 2500 seconds). I want to store this time in CTime or CTimeSpan format.?

How to do this.?

View 2 Replies View Related

C++ :: Extracting Decimal Numbers From A String?

May 16, 2014

Extracting integers from a string is trivial, but I am unable to find a function or code that will extract decimal numbers from a string.

I have a string that looks something like this:
" Asdf 1 1.3825 4.0000 12.0000 1.9133 0.1853 0.9000 1.1359 4.0000 "

Any tips on extracting the numbers (in decimal form) and storing them in a vector?

View 5 Replies View Related

C++ :: Extracting Polynomial Coefficient From String

Nov 30, 2013

I want to extract polynomial coefficient out of a string recieved by input, for example if i enter 4x^3+2x^4+3 , the resulting out put be : 2 , 4 , 0 , 0 , 3

View 10 Replies View Related

C++ :: Extracting String From Text File

Jun 5, 2014

I have a program here that writes employee information into a text file called employee.txt. I don't have a problem writing into the text file.

I'm supposed to enter the employees ID and search for it. Then pull up all they're info.

This is what I have.

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main(){
ifstream inFile;
ofstream outFile;

[Code] ....

This is the text file
Viktor,Luc,552,123 Home,5000
Joe,Luc,553,123 House,7000

View 7 Replies View Related

C/C++ :: Extracting Information From Data File?

Apr 20, 2015

Create a simple data file like the example shown below containing the 4 dates below plus 10 or more additional dates. The file should include 1 date per line and each date should have the form MonthNumber-DayOfTheMonth-Last2DigitsOfTheYear with no extra spaces. All dates should be in this century. No error checking for invalid dates is necessary.

My Output displays like

February -19,1991

How do I get my program to ignore the dash between the dates?

#include <fstream>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main(){
const int M = 13;

[code]....

View 1 Replies View Related

C Sharp :: Show Only Date Not Time In Visual Studio

Feb 1, 2013

How to show only current date not time in webforms in visual studio as for date and time code is

Label1.Text = DateTime.Now.ToString();

What for only date not time

View 3 Replies View Related

Visual C++ :: Compile Time Errors For OpensSSL In Project

Feb 4, 2014

I am trying to build a VC++ project in Visual Studio 2010. [URL] ....

This project has a dependency on openssl libraries. How can I successfully build this project? How to add third party libs/dlls in a project.

View 1 Replies View Related

Visual C++ :: Long Time Button Pressed Event - MFC

Feb 2, 2015

I Like to Open a Dialog When the Button Was Pressed for 5 seconds Continuously.

I'm using Windows 8 HP Tablet, Is MouseUp & MouseDown events suitable for this requirement.

View 12 Replies View Related

Visual C++ :: Showing Time For A User While Entering Some Characters

Dec 26, 2014

Im working on my project for college and i want to know how to add sth similar to a chronometer for user to see how much time have passed while entering some characters using cin.getline function.

View 2 Replies View Related

Visual C++ :: Real Time Plotting Of Latitude And Longitude

Dec 17, 2012

Any application or open source software (vc++ or vb.net or c#.net) that can display a high resolution map and i can input real time latitude and longitude of points through an external file and those points can be displayed on map in real time..... I am all new to this plotting on map stuff....

View 2 Replies View Related

Visual C++ :: Implementing Real Time Graph To Application?

Nov 15, 2013

I was assigned a project to implement a real time graph to an application which continuously outputs data numerically through the GUI. The application that was created to do this is written in C.

I have to turn those numerical numbers into a graphical display that is periodically updated to appear as real time.

My adviser suggested using NTgraph [URL] ...... I had no clue how to implement this to my code and was finally able to understand that the .OCX needs to be registered as a COM and then imported to the application using visual studios. However, I get an error when I try importing it since it is in C (Visual Studios 8) and not an MFC application.

So my question is if it would be possible to implement the ActiveX control to my application even though it is not an MFC application and how to go about it.

View 6 Replies View Related

C :: Decrypting / Extracting Custom File Formats

Sep 25, 2014

So this may be against the rules, not sure, grey area probably? However I just bought the PC game Oil Rush, and was having a look at how the assets are packed. As with most games the textures, scripts, sounds and audio are all free to access.

However the game data such as maps, models and other, are packed into UNG files, i.e a custom encrypted file format, which probably is also compressed. So I googled for an unpacker/extracter and found one which also comes with the C source. You can download here. [URL] ....

So I am trying to figure out how these authors work out this file format, from the source we have,

Code:
static const u8 unigine_mask[] = "xffx7fx3fx1fx0fx07x03x01";
u32 unigine_key = 0xa13cdbde;

Looks like a password of sorts. You then have to work out the complete understanding of the file formats, headers, blocks etc.. How is this done...

View 4 Replies View Related

C++ :: Extracting Nibbles (Number Represented In Binary)

Nov 29, 2013

If I have a number 117, represented in binary as : 01110101 and I wanted to grab the top nibble. What would be the decimal value I would be extracting?

Would it be 0111 or 0101 decimal values 112 or 5 or is my understanding completely wrong?

View 11 Replies View Related

Visual C++ :: Processing Time For PVOID Into Byte Array Conversion

Mar 12, 2013

In my project I'm using PVOID pointer to store real time data. After getting this data I will convert the data into byte array, like below

Code:
byte *bPoint = NULL;
PVOID pvData;
byte TempArr[1024];
bPoint = (byte*) pvData;
for(int i=0;i<1024;i++)
TempArr[i] = (byte) (*bPoint + i);

Processing time for the above code takes 9500 to 9900 microseconds (Used QueryPerformanceCounter).

Code:
TempArr[0] = ((BYTE*) pvData) [0];

This code takes 1100 to 1200 microseconds. My doubt is, The processing time of PVOID data into byte array conversion takes time like above? Or any other easy way(PVOID data into byte array conversion) to reduce the processing time?

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved