Click here to Skip to main content
Page 1 of 354
Page Size: 10 · 25 · 50


Author filtered by: CPallini [x]
txt.file remove lines by CPallini
Answer 14 May 2013   license: CPOL
There is no direct way for removing a line from a file. However you might read the input file line by line, copying to a new file only the lines you want to maintain. At the end of the process discard the original file and rename the freshly written one.
Answer 14 May 2013   license: CPOL
Your recording device already produces binary streams, I suppose. You should read the device documentation for finding out what is the format used, study it and then develop an algorithm able to extract the needed data.
C++
Answer 14 May 2013   license: CPOL
When overriding virtual methods you have to make sure that the method signatures exactly match. Change fromQuote:float virtual area() { return 3.14*fRadius*fRadius; }tovirtual float area() const { return 3.14*fRadius*fRadius; }
C++
Answer 13 May 2013   license: CPOL
Did you try Google[^] yet?
Answer 13 May 2013   license: CPOL
Did you try Google[^]?
Answer 13 May 2013   license: CPOL
Suppose, for generality:const int N = 500;a = new char[N];char b[N];You access bit bitno of either a or b in the same way (note: not tested):int getbit(int bitno, int x[], int size){ if ( bitno = (size*8) ) { // throw an exception here } int...
Answer 12 May 2013   license: CPOL
As already suggested, write a method, say executeMyQuery taking, as single parameter, the query string, put in such method all the required code for executing the query. Then call it from the different button click handlers (each handler should pass its own query string).
Answer 12 May 2013   license: CPOL
Since you tagged your question (also) with MFC, I am assuming you are asking about CFile::GetFileName[^]. Such method, as the documentation states, returns the name of the file associated to the CFile object.[Update]GetFileName does NOT provide the info you are requiring. You may use the...
Answer 12 May 2013   license: CPOL
Probably Google[^] helps (the very first entry is a CodeProject article!).
Answer 11 May 2013   license: CPOL
It smell like homework. You should try hard to code it yourself and ask here specific questions when you get stuck.
Answer 11 May 2013   license: CPOL
As alaready suggested, you use the debugger for checking that all the references ( t3, t5, t6 and conn) in the statement are set to valid objects (for instance did you use new on conn?).
Answer 10 May 2013   license: CPOL
Did you try Google[^], yet?
C++
Answer 10 May 2013   license: CPOL
The documentation[^] states:RequirementsMinimum supported clientWindows Vista, Windows XP with SP2 [desktop apps | Windows Store apps]Hence your version of Windows XP does not satisfy such requirements (that is you probably have to update it with, at least, Service Pack 2).
Answer 10 May 2013   license: CPOL
I fixed some bugs (uninitialized variables). Please note: you should handle the digit 0 (zero) too. #include #include void show_number(int number){ int counter = 0; int i, temp, digit, x, ten; if (number > 9) { temp = number; while...
Answer 9 May 2013   license: CPOL
On Windows system newline is "\r\n" (see, for instance Wikipedia[^]). Hence it should work (you should see proper output on notepad, other applications are able to render text file with other newline conventions).Please check (with the help of an hex editor) the actual file content.
Answer 9 May 2013   license: CPOL
You must pass either two characters or two strings to the Replace method. Currently you're passing just one string (the comma is embedded in the string, due to the escaping rules).
C#
Answer 9 May 2013   license: CPOL
It looks you should double them, see, for instance "How to insert string containing single or double quotes" at Stack Overflow[^].
C#
Answer 9 May 2013   license: CPOL
Your while condition is uninfluential (always true). According to the documentation[^]:Return ValueThe total number of elements successfully read is returned.If this number differs from the count parameter, either a reading error occurred or the end-of-file was reached while reading....
Answer 9 May 2013   license: CPOL
You should create a method, say, public int TotalMilliseconds(string s), accepting one string and returning total milliseconds. Once you have it you may easily compute max and min values with a simple single iteration on the array items.
Answer 9 May 2013   license: CPOL
Probably multithreading is useless in your case. It would be usefulif (at least) one task takes a lot of time (that is user noticeable) to complete: often threads are used to prevent the GUI freeze while a long time operation is occurring.
Answer 9 May 2013   license: CPOL
See , for instance: Runtime C# Expression Evaluator[^].
Answer 9 May 2013   license: CPOL
Yes, your program can evaluate (static) expressions, e.g.#inclde using namespace std;int main(){ int x; cin >> x; cout
C++
Answer 9 May 2013   license: CPOL
You may find many articles about, here at CodeProject[^]
Answer 8 May 2013   license: CPOL
You may put your exectuable in one of the folders included in the Windows executable search path[^], or you may modify the latter to include your application's folder.
Answer 8 May 2013   license: CPOL
Such code, albeit valid, make no sense.It checks ten times if x is different from y and if the condition is satisfied (actually it is NOT satisfied) does NOTHING (due to the semicolon after the if statement: such a semicolon is the 'empty statement').
C
Answer 8 May 2013   license: CPOL
While do you want to use such an obsolete development environment? Let me suggest you a more modern alternative to turbo C, like Visual C++ 2010 Express[^].Anyway, for building a (very) simple game (let's say a 2D one) you need to learn how to draw graphics primitives on the screen (BGI with...
C
Answer 8 May 2013   license: CPOL
I suppose nobody have ever had a similar requirement, so you wouldn't be able to find anything just using Google[^].
Answer 8 May 2013   license: CPOL
Nope. A process reads its arguments at startup.However, if you can modify it, then you may use some sort of IPC[^] for passing it parameters at runtime.
Answer 8 May 2013   license: CPOL
Quote:,i want to diaply those data into xml fileI assume you meant: "I want to store them into a XML file".It is very easy to create yourself an a XML file, directly using its Write method. Or you may follow a more 'sophisticated' approach using the XmlSerializer[^] class.
Answer 8 May 2013   license: CPOL
You didn't bother to close the file, did you?Call fclose(fpSend); when you've done with it (before returning from the WndProc).
Answer 8 May 2013   license: CPOL
Did anyone suggest you multithreading yet? :-)"Safe, Simple Multithreading in Windows Forms, Part 1"[^].
Answer 8 May 2013   license: CPOL
There are several ways to accomplish this task. For example you may pass all the required info (even a reference to Form3 itself) to the Form5 constructor (of course you have to define an appropriate constructor).
Answer 8 May 2013   license: CPOL
What about documentation[^]?
Answer 7 May 2013   license: CPOL
Quote:now i installed this application in server so that i need to open this application from client computers without installing and it want to run from the server communicating through LANUnless your application has a client/server architecture you cannot do that.Quote:if possible also...
C#
Answer 7 May 2013   license: CPOL
Quote:But the classes are too different to create a base class to store the function.This is not a valid objection, in my opinion.Quote:So we decided to write "FileExists" as a global function and put it intostdafx.cpp which is now our global function storage.You don't need that (albeit...
Answer 7 May 2013   license: CPOL
A simple approach would be providing a contructor for your struct accepting an array of bytes. Such a conctructor would use repeatedly the BitConverter class[^] (for instance you may use data1 = BitConverter.ToDouble( ba, 0); where ba is your byte array).
C#
Answer 7 May 2013   license: CPOL
The DirectoryInfo[^] class provides all you need, namely the GetFiles, GetDirectories methods and the Parent property.
Answer 7 May 2013   license: CPOL
This code is NOT fine: file_size is not initialized and you should never call fread before being sure that the count (in your case file_size itself) argument is less than (or equal to) the size of the provided buffer.
Answer 7 May 2013   license: CPOL
Console applications are not suited for such tasks.You may easily satisfy points 2 and 3 using Windows Forms (see, for instance "Drawing with Graphics in WinForms using C#"[^]).For point 4 (3D shapes) you may consider using XNA (see, for instance, "Drawing 3D Primitives using Lists or...
C#
You cheater! by CPallini
Forum Message 7 May 2013  
Nothing to leak there. :rolleyes: Veni, vidi, vici.
Answer 7 May 2013   license: CPOL
See this question at Stack Overflow: How do I draw lines using XNA?[^].
Answer 7 May 2013   license: CPOL
That is a problem you probably cannot solve: an explanation here[^].
Answer 7 May 2013   license: CPOL
All your problems are solved using dynamic memory allocation: you shouldn't allocate a static array but a bit more complex data structure (emulating CString or std::string, behaviour). e.g.typedef struct _MyString{ char * str; int len; int capacity;} MyString;Then you...
Answer 7 May 2013   license: CPOL
The database is not the only place where you may store the password: you may use as well a file. However make sure to store NOT the passwords themselves but their hashes. See the following article OriginalGriff's tip for a guideline: Password Storage: How to do it.[^].
Answer 7 May 2013   license: CPOL
You should wisely use the debugger to locate the offending line (possibly one of the doSomething calls) and eventually report such info here.
C++
Answer 7 May 2013   license: CPOL
You should remove the return statement.
ASP
Answer 6 May 2013   license: CPOL
Did you try Google[^]?
Answer 6 May 2013   license: CPOL
Of course it is possible.At each (periodic) 'parse and insert operation' you have to:Check if current file size is bigger than a certain amount with respect 'last operation' file size (abort operation if it is smaller or equal).Parse only the augmented part of the input file, inserting in...
Answer 6 May 2013   license: CPOL
'this' is a reference to the object that is calling the GetType() method. In your case it is not needed.

Page 1 of 354
1 2 3 4 5 6 7 8 9 10


Advertise | Privacy | Mobile
Web02 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid