15,892,480 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Mark (Top 95 by date)
Mark
29-Jul-18 12:18pm
View
Oh I didn't see that. But where did those wrong numbers came from ? Shouldn't they be 00000 after 7th position in float?
Mark
29-Jul-18 11:38am
View
I have read it and it doesn't answer my question. Even the answer in that question says float has ~7 digits and double has ~16 digits. But in the code given above both float and double turned out to have 16 digits.
Mark
5-Mar-15 10:50am
View
iphlpapi.h
windows.h
winsock2.h
Mark
15-Feb-15 5:56am
View
Thanks :)
Can u please post this as a solution so I can accept it. :)
Mark
14-Feb-15 23:08pm
View
Its because Parameters.Add function uses DbType enum.
Mark
13-Feb-15 23:39pm
View
I dont see a real in DbType enum. :(
https://msdn.microsoft.com/en-us/library/system.data.dbtype(v=vs.110).aspx
Mark
7-Jan-15 3:47am
View
thanks. :) it was the problem and Ive solved it. :)
Mark
7-Jan-15 3:28am
View
:( It didnt solve the problem.
Mark
6-Jan-15 11:18am
View
you mean sqs ??
Invalidate all the rectangles in sqs[] array ? Like this ?
void MainWindow::OnLButtonDown(UINT flags, CPoint cp)
{
for (int i=0; i < 9; i++)
{
if (PtInRect(sqs[i], cp))
vals[i] = X;
}
for (int i{}; i < 9; i++)
InvalidateRect(sqs[i], FALSE);
}
Mark
6-Jan-15 11:05am
View
I couldnt find a MS reference for that. But still you can check it. i{} assigns 0 ti the i. Anyway I changed it into i = 0. It didnt solve the problem though. :(
Mark
6-Jan-15 10:53am
View
for what ? o_O
Mark
6-Jan-15 10:49am
View
I did. No change. It still stops like before.
Mark
6-Jan-15 10:45am
View
But it works.
I mean if you use i{} instead of i=0 withing a for loop, it considers i as 0. isnt it ?
Mark
6-Jan-15 10:38am
View
i{} means i = 0
Mark
18-Oct-14 10:23am
View
Actually I hasn't assigned the command text..
Mark
18-Oct-14 10:04am
View
conString is okay and latestCustomerID is 0..
btw what do you mean by check those variables with debugger ? Im using visual studio.. I use watch. And it says "The name 'str_latestCustomerID' does not exist in the current context"
Mark
18-Oct-14 10:00am
View
So shouldn't it throws the exception again instead of showing the error in the class ?
Mark
18-Oct-14 5:52am
View
Oh.. Never knew about that.. By the way is there anyway to check what would be the next primary key of the table ? My primary key filed is auto increment integer.. How can I know what would be the next value ?
Cant do that with max value of the column. In case of user deleted a row, it would show a wrong value..
Thanks..
Mark
27-Sep-14 8:18am
View
I read that. It's not descriptive enough :(
Any reference with some good examples ?
Mark
27-Sep-14 6:16am
View
well. thanks..
and how can I create some columns inside that virtual table ?
And do all the tables in sqlite memory database must be virtual tables ?
Mark
21-Sep-14 5:33am
View
Sorry. But I still dont get that completely.. Just answer me to this...
if I change my code to this >>
using(SQLiteConnection con = new SQLiteConnection(conString))
{
con.Open();
using(SQLiteCommand commandToChangeName = new SQLiteCommand(sql1, con))
{
commandToChangeName.ExecuteNonQuery();
}
using (SQLiteCommand commandToChangeAddress = new SQLiteCommand(sql2, con))
{
commandToChangeAddress.ExecuteNonQuery();
}
}
1. Would it make sure that the second sqlite command (which changes the address) executes after the first one executed and it's editings has completed ?
Mark
21-Sep-14 3:51am
View
u say, if I use a single connection for all of my commands, it's okay to execute multiple commands at once and change the Address while another command is changing the name ?
Mark
20-Sep-14 5:04am
View
Thanks Griff
Mark
16-Sep-14 6:46am
View
Form1 is the main form and Form2 is the secondary form.
With these methods, I have to close the opened Form1 and create a new instance of it instead of closed Form1 and show it as the Form2 loads. But with this method all the user inputs that were stored in textboxes will lose.
Storing them in somewhere else and assigning them back would ruin the performance of the program.
:(
Mark
28-Aug-14 10:03am
View
well.. thanks.. Ill give it a try..
Mark
28-Aug-14 8:19am
View
No.. I couldn't find anything
Mark
17-Aug-14 3:28am
View
Oh.. try implementing a static method to retrieve the checkBox status !
Mark
16-Jul-14 12:05pm
View
I added.. But I still dont receive any WM_COMMAND messages....
Mark
16-Jul-14 10:30am
View
i changed as u said.. But I still dont receive the WM_COMMAND message
Mark
16-Jul-14 10:29am
View
It doesn't change it..
I still dont receive the WM_COMMAND message
Mark
20-Jun-14 4:16am
View
oh... thanks :)
Mark
30-May-14 10:20am
View
Well. I want to make ++ a postfix with operator overloading
Mark
26-May-14 6:49am
View
Thanks.. :)
Mark
25-May-14 9:49am
View
oh.. Thanks. Didn't know that..
Mark
25-May-14 9:03am
View
Im using the compiler that came with visual studio 2013
Mark
25-May-14 8:57am
View
ok
Mark
25-May-14 8:03am
View
OK Thanks..
Mark
25-May-14 6:24am
View
And what's the meaning of those strange characters ?
Why would they turn up ?
Mark
20-May-14 12:35pm
View
It is.. :/ Everything we see are just illusions :/ I thought they are real :/
Mark
20-May-14 12:12pm
View
Thanks.. I didn't know that elements from multidimensional arrays can be retrieved as from single dimensional arrays.. :)
Mark
20-May-14 12:12pm
View
Thanks.. I didn't know that elements from multidimensional arrays can be retrieved as from single dimensional arrays.. :)
Mark
20-May-14 12:12pm
View
Thanks.. I didn't know that elements from multidimensional arrays can be retrieved as from single dimensional arrays.. :)
Mark
20-May-14 12:12pm
View
Thanks.. I didn't know that elements from multidimensional arrays can be retrieved as from single dimensional arrays.. :)
Mark
20-May-14 12:10pm
View
Oh. I got it.. Thanks :) I didn't knew that elements of multi dimensional arrays can be retrieved like from a single dimensional array...
Mark
20-May-14 11:45am
View
How the "*(arr + (i * 3) + j);" retrieve the elements of the second dimension..
Mark
20-May-14 11:42am
View
"sum += *(arr+i*seconLength+j);"
This solved the problem.. Thanks... But I still dont get what part i*seconlength+j takes in this code.
As I understand, in the first round of the first loop and, the first round of the second loop..
arr+i = arr[0] element
arr+i*seconLength = arr[0] element
arr+i*seconLength+j = arr[0] element..
As I see, this line doesn't care about the 2nd dimension of the array..
Can u please explain some further how this retrieve values from the arr[0] and arr[1] array ?
Thanks..
Mark
20-May-14 11:38am
View
Deleted
"sum += *(arr+i*seconLength+j);"
This solved the problem.. Thanks... But I still dont get what part i*seconlength+j takes in this code.
As I understand, in the first round of the first loop and, the first round of the second loop..
arr+i = arr[0] element
arr+i*seconLength = arr[0] element
arr+i*seconLength+j = arr[0] element..
As I see, this line doesn't care about the 2nd dimension of the array..
Can u please explain some further how this retrieve values from the arr[0] and arr[1] array ?
Thanks..
Mark
20-May-14 11:18am
View
Of course the confidence is misplaced :/ I still don't get that.
Mark
20-May-14 10:46am
View
Sorry :/ it returns 84 not the correct summary..
Mark
20-May-14 10:41am
View
It debugs without any errors.. So how am I suppose to find the mistake ? o_O
Mark
18-May-14 8:10am
View
Oh dear.. strlen returns the length of the string.. not the size.. what if I use utf-8 characters in the string ? would strlen returns the size as if utf-8 characters doesn't consume more bytes ?
Mark
18-May-14 8:08am
View
That's why I want to know how to get the size of a char* using sizeof() keyword..
Mark
18-May-14 7:59am
View
that's what I want to know.. How can I retrieve the size of a string using the pointer with keyword sizeof() ?
Mark
18-May-14 7:55am
View
what if I use utf-8 characters ?
Mark
18-May-14 7:50am
View
So u saying std::string::size == sizeof() ??
Mark
18-May-14 7:37am
View
length is the number of character the string contains..
size is the amount in bytes the string use.
Mark
18-May-14 7:26am
View
but strlen is for calc the length o_O
I want to calc the size not the length !
Mark
18-May-14 7:20am
View
So is there anyway to calculate the size of the string using pointers ?
sizeof(*str) doesnt work.
Mark
5-May-14 8:03am
View
Oh. never heard of that.. Thanks.. Ill try !
Mark
5-May-14 7:10am
View
{Note that while some implementations of InputStream will return the total number of bytes in the stream, many will not. It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream.}
U mean this ?
And how am I suppose to keep reading and parsing the content ? Which class should I use do so ?
Mark
5-May-14 2:57am
View
Well, they are input devices as I know either.. But they are just input devices how the platform, the operating system turn on and off those three lights on the key board ?
Mark
28-Apr-14 10:39am
View
Thanks. :)
Mark
28-Apr-14 10:38am
View
Thanks :)
Mark
28-Apr-14 10:01am
View
OK Thanks.. And isnt there any character for "NAND" ?
Mark
28-Apr-14 9:38am
View
Well. I see this method in a messageDigest example.. I thought what it does is something like mixing the numbers or something else like that.. :) Thanks..
Mark
28-Apr-14 9:35am
View
Oh. So the (i & 0xff) converts both i and 0xff integers into a binary manner and match each bits with AND operation !
By the way, can I use other logical operations such as "or, xor, not, nand" with toHexString method ?
If it's so what characters am I suppose to use instead of ampersand ?
Mark
28-Apr-14 9:07am
View
Sorry.. This is not what I expected :/ I think I failed to describe my problem coherently !
I know about 2 8 10 and 16 based numbers..
All I wanna know is the calculation that has been done by "(i & 0xff)"
Thanks
Mark
28-Apr-14 9:01am
View
"extracts the least significative byte from integer number i."
Sorry. I think I dont get this part. Whats the meaning of "extracting least significative byte" ? Can I have a further description please ?
Mark
27-Apr-14 5:52am
View
Sad to hear about that :(
anyway thanks for your concerning!
Mark
27-Apr-14 5:52am
View
Sad to hear about that :(
anyway thanks for your concerning!
Mark
27-Apr-14 5:52am
View
Sad to hear about that :(
anyway thanks for your concerning!
Mark
15-Apr-14 3:21am
View
Thanks.. :) this solved the problem..
Mark
8-Apr-14 11:29am
View
OK Thanks
Mark
8-Apr-14 7:03am
View
Each value-specific class body you write results in the creation of an anonymous
subclass of the enumerated type and makes the enumerated value a singleton
instance of that anonymous subclass. (Enumerated types can not be extended, but
they are not strictly final in the sense that final classes are since they can have
these anonymous subclasses.) Because these subclasses are anonymous, you
cannot refer to them in your code: the compile-time type of each enumerated
value is the enumerated type, not the anonymous subclass specific to that value.
Therefore, the only useful thing you can do in value-specific class bodies is override e methods defined by the type itself. If you define a new public field or method,
you will not be able to refer to or invoke it. (It is perfectly legitimate, of course, to
define helper methods or fields that you invoke or use from the overriding
methods
Mark
8-Apr-14 7:01am
View
Deleted
Value-specific class bodies
In addition to defining a class body for the enumerated type itself, you can also
provide a class body for individual enumerated values within the type. We’ve seen
above that we can add fields to an enumerated type and use a constructor to
initialize those fields. This gives us value-specific data. The ability to define class
bodies for each enumerated value means that we can write methods for each one:
this gives us value-specific behavior. Value-specific behavior is useful when
defining an enumerated type that represents an operator in an expression parser or an opcode in a virtual machine of some sort. The Operator.ADD constant might
have a compute() method that behaves differently than the Operator.SUBTRACT
constant, for example.
To define a class body for an individual enumerated value, simply follow the value name and its constructor arguments with the class body in curly braces. Individual values must still be separated from each other with commas, and the last
value in the list must be separated from the type’s class body with a semicolon: it
can be easy to forget about this required punctuation with the presence of curly
braces for class and method bodies.
Mark
8-Apr-14 6:55am
View
I did read it.. But I couldnt understand what it means..
Here is what the book says about this kind of enums..
"When to use value-specific class bodies. Value-specific class bodies are an extremely
powerful language feature when each enumerated value must perform a unique
computation of some sort. Keep in mind, however, that value-specific class bodies
are an advanced feature that is not commonly used and may be confusing to less
experienced programmers. Before you decide to use this feature, be sure that it is
necessary."
Mark
8-Apr-14 6:47am
View
From a book.. "Java in a nutshell"
Mark
8-Apr-14 6:11am
View
But in my previous question, it used a method outside the enum... But in this example it contains methods inside each enum.. So this is different..
Mark
7-Apr-14 12:52pm
View
Actually this is not a constructor.. And I dont get what u mean by other methods follow the same rules..
Mark
7-Apr-14 12:50pm
View
Who ? me ? Ive delete nothing..
Mark
7-Apr-14 9:30am
View
I have no idea either... :( That's why I asked it in here..
Did u mean the example in my question ?
Yes it compiles with no errors..
Mark
7-Apr-14 4:40am
View
*When to use value-specific class bodies. Value-specific class bodies are an extremely
powerful language feature when each enumerated value must perform a unique
computation of some sort. Keep in mind, however, that value-specific class bodies
are an advanced feature that is not commonly used and may be confusing to less
experienced programmers. Before you decide to use this feature, be sure that it is
necessary.*
It's from the book "Java in a nutshell". So it called value specific class bodies in enums.. Its in the 188th page of that book.. And the author has given a example just looks like my question.. So in his opinion there are such enums with methods..
Mark
7-Apr-14 4:19am
View
Thanks...
Mark
6-Apr-14 13:08pm
View
Nah.. Its about some variables with each enum objects...
This is not the same..
I want to know how am i suppose to use this method with codes !
Thanks..
Mark
6-Apr-14 7:04am
View
public enum ??
Is it necessary to declare an enum as a public enum to use enums with variables inside brackets ??
Mark
31-Mar-14 8:09am
View
But making them private members prevent it being accessed from class B :(
I want them to be accessed from only Class A and Class be....
Mark
18-Mar-14 9:37am
View
Ah. I got it.. And now I wannna know if I can store a number like 10 million light years in nano meters in BigInteger variable ? :)
946080e27
Mark
18-Mar-14 9:37am
View
I see. I really didnt calculate it before I ask.. sorry about that :) I just wanted to know if I can store extremely large numbers with BigInteger.. Thanks..
Mark
18-Mar-14 9:26am
View
goes as close to infinity as 255 does ?? what did u mean by this o_O I don't get it !
Mark
18-Mar-14 9:15am
View
Wow.. Does that mean we can use extremely large numbers like 10 million light years in nano meters with BigInteger ? doesn't it ? has a limit ?
Mark
18-Mar-14 9:15am
View
Nah, Im not talking about integers.. Im talking about all the variables that can store numbers as numbers.. not strings.. :) In my knowledge double is the variable type which supports for the largest number, and no more.. OriginalGriff has commented about something named BigInteger :D Seems like it goes to the infinity..
Mark
20-Jan-14 0:17am
View
Ah never mind.. :)
"https://www.nuget.org/packages/MouseKeyboardActivityMonitor/"
this solved my problem.. By the way thanks for your help.. :)
Mark
19-Jan-14 11:29am
View
1. no. I want to handle all the Function keys (F1 - F12) by hook..
2. Yes its a windows form..
3. I dont get it o_O
Mark
19-Jan-14 4:12am
View
After u said about that, I tried it. But its very complicated and I cant even understand how to use it like the code above. And it does not provide any tutorial in that link. I searched for tutorials and I couldn't find one too. Do you have any link that explain about that hook simply ?
Mark
19-Jan-14 0:41am
View
Key_Up event is empty..
Show More