15,893,381 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 Alexandru Ghiondea (Top 16 by date)
Alexandru Ghiondea
5-Aug-11 14:31pm
View
You are correct! I was not aware of this - thanks! :)
Alex
Alexandru Ghiondea
5-Aug-11 14:00pm
View
The way the current solution is wrote, the same numbers will be generated every-time you run your app.
You should provide a seed to the Random number generator. I usually use (int)DateTime.Now.Ticks.
Thanks,
Alex
Alexandru Ghiondea
5-Aug-11 2:14am
View
That is the because a for loop works like this:
1. Initialize (you are assigning a constant of type int (0) to a variable of type a)
2. Check if condition is valid (you are, again, invoking the > operator with an integer (10) and a variable of type a).
3. Increment -> you have your own increment operator defined for a nybble.
For the first one, you are assigning an integer to a Nybble - so the correct implicit conversion kicks in. (The one from int to Nybble)
For the second one, you are using the < operator. The < operator works on operands of the same type. So it will convert 10 to the Nybble type and the call your < operator (the one defined on Nybble).
Alex
Alexandru Ghiondea
4-Aug-11 21:10pm
View
When the loop "loops" it has to verify that the value of a is smaller than 10. Because 10 is an integer, it will have to apply the implicit conversion from a (which is a Nybble) to int. So your operator gets called.
Does this explain it? If not, could you be more explicit about what your question is? What is it that you find wrong in the output?
Alexandru Ghiondea
3-Aug-11 13:21pm
View
What BobJanova said.
Alex
Alexandru Ghiondea
29-Jul-11 13:13pm
View
Can you explain what is not working?
Saying that it does not work does not really help us figure out what is wrong.
Alex
Alexandru Ghiondea
28-Jul-11 18:16pm
View
How would you go back to the original hex string from the number?
Or this is just a way to "check-sum" the original hex string?
Alexandru Ghiondea
28-Jul-11 14:36pm
View
Well - this won't work for 50+ digits :|. This is because the long type cannot hold a value bigger than 2^64.
This is the reason why the BigInt type was created - so you can have an arbitrarily large number. What is the reason why BigInt is not acceptable?
But now I go back to my first solution - Why don't you want to generate smaller numbers - basically partitioning your number into chunks? Why is that not an acceptable solution?
Alex
Alexandru Ghiondea
28-Jul-11 13:21pm
View
So you want to convert the hex string into its the decimal representation?
Alex
Alexandru Ghiondea
28-Jul-11 13:11pm
View
My understanding was that you wanted to get to this type of string from your byte array:
45434-59685-45565-59685-56923-49565
Could you walk me through an example?
Alex
Alexandru Ghiondea
22-Jul-11 12:51pm
View
It depends :). You can use it like this:
int a = 10;
while (a --> 10)
{
//...
}
Alex
Alexandru Ghiondea
8-Jul-11 13:32pm
View
But this will write the original stream into the file, and not the XML that is generated by serialization.
Alexandru Ghiondea
7-Jul-11 21:07pm
View
I would add that you have to save the file to disk anyway before you open it.
Alexandru Ghiondea
7-Jul-11 20:02pm
View
The OP was describing the situation when the user is presented with that choice on many web sites - which means browsers.
As I have already said, there is no built-in dialog window that the OP can use. You have to build your own.
Please don't lash out at people if you did not read the full question or reply.
Alexandru Ghiondea
7-Jul-11 15:26pm
View
I am not sure if there is such a dialog built in. I belive the open/save/cancel is a dialog built into the browser.
Alexandru Ghiondea
7-Jul-11 14:29pm
View
No worries! :)
Alex
Show More