|
You can't screw up... unless you're testing a hard-disk-wiper-outer or something.
|
|
|
|
|
PIEBALDconsult wrote: unless you're testing a hard-disk-wiper-outer or something.
well, you know I started out with my first computer project to be a disk operating system... but then I smartly decided to start with drawing user interfaces. So far, in the last 27 years of computer programmng, I have crashed many computers, but I have never managed to crash a user. :->
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
PIEBALDconsult wrote: Well, next time... TRY IT!!
Programming is like pinball. The reward for doing it well is the
opportunity of doing it again.
- programmers' saying
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
But my wife is better at pinball than I am... oh, wait a minute...
Programming Sex is like pinball. The reward for doing it well is the opportunity of doing it again.
|
|
|
|
|
Keep my thread clean and PG. Kid, here.
|
|
|
|
|
"ERROR: You've mortally wounded the compiler, please refrain from using Visual Studio again. FOREVER!"
|
|
|
|
|
Seriously, you will never learn anything if you don't try basic stuff like this before asking others to explain it to you.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OK, I got it, stop jumping on me!
|
|
|
|
|
Stop asking to be jumped upon.
|
|
|
|
|
Hello
If i have a string how i can split it into character
Ex:
200134 i want to have 2;0;0;1;3;4
Thanks a lot
Assaf
|
|
|
|
|
you can access individual characters in a string by indexing string[index] ;
you can convert the entire string to a char array String.ToCharArray()
and you can look that up in the documentation; I think you best start studying C# in a book !
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
Does anyone know how I can load a png or a jpg, change it's DPI ( so change the metadata that represents the DPI settng, NOT resize the image ) and then save that change ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Great - thanks.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Christian,
AFAIK a PNG just holds pixels, it does not know resolution or physical dimensions.
JPEG supports "properties", they populate what gets handled by
Image.PropertyItems, Image.GetPropertyItem(), Image.SetPropertyItem()
IIRC you can not add properties to an image, but you can modify the existing ones;
and they are indexed by number, so you need to figure out the index for each property.
Here are some of them I once found on the web:
propNames.Add(0x010E, "ImageDescription");
propNames.Add(0x010F, "EquipMake");
propNames.Add(0x0110, "EquipModel");
propNames.Add(0x0112, "Orientation");
propNames.Add(0x011A, "XResolution");
propNames.Add(0x011B, "YResolution");
propNames.Add(0x0132, "DateTime");
propNames.Add(0x0128, "ResolutionUnit");
propNames.Add(0x0131, "SoftwareUsed");
propNames.Add(0x0201, "JPEGInterFormat");
propNames.Add(0x0202, "JPEGInterLength");
propNames.Add(0x0213, "YCbCrPositioning");
propNames.Add(0x501B, "ThumbnailData");
propNames.Add(0x502D, "ThumbnailResolutionX");
propNames.Add(0x502E, "ThumbnailResolutionY");
propNames.Add(0x5090, "LuminanceTable");
propNames.Add(0x5091, "ChrominanceTable");
propNames.Add(0x829A, "ExifExposureTime");
propNames.Add(0x9003, "ExifDTOrig");
propNames.Add(0x9004, "ExifDTDigitized");
propNames.Add(0x9204, "ExifExposureBias");
propNames.Add(0x9209, "ExifFlash");
propNames.Add(0x927C, "ExifMakerNote");
propNames.Add(0x9286, "ExifUserComment");
propNames.Add(0xA002, "ExifPixXDim");
propNames.Add(0xA003, "ExifPixYDim");
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Awesome - I'll try that if need be. Thanks.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how can i leave the for when i found what seach about
i put an if condition in a for loop if this condition is true i want leave the for?
thanks in advance
Assaf
|
|
|
|
|
You can use the "break" keyword like so:
for (Int32 i = 0; i < 10; i++) {
if (i == 8)
break;
}
There is also the "continue" keyword, so continue the loop with the next item.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
If you don't intend the loop to finish, consider using a while loop instead.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Please don't do this. It's really bad practice because it indicates that you haven't really thought about what you are trying to do. There are other constructs that are better suited to this:
bool found = false;
int counter = 0;
do
{
if (loop[counter] == 1)
found = true;
} (while !found || ++counter == loop.Count); This doesn't rely on any "hacks". Seriously, if you find that your design implements the for (...)break; pattern then consider using a different loop.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Does anyone have any tips or helpful pieces of info for a newbie programmer? Any piece of info is welcome, such as recommended sites, any tips, or even some basic knowledge of C#. Thankyou anyone who reads this and replys, an thanks in advance. -M.S.
|
|
|
|
|
Practice : And practice. And then some more. You can't beat it. Write lots of code - when it works, look at it and understand why it works. When it doesn't, post it here. There are hundreds of people on this forum who enjoy helping the newbies, but only if it seems they have had ago themselves.
Read : Browse the articles here, pick one that is interesting, download the source, and understand it. Don't just cut and paste into your own app - understand what you are cutting and pasting.
Program : Pick a very simple app to write (winform or web ) - such as a CD library. You will have to work on UI design, data access layers etc.
Enjoy : If you don't enjoy what you are doing, don't do it.
Share : If you flick through the articles, they all tackle a specific element. YOu could write an article of how you wrote your first app - ie the CD Library. The problems you hit, how you solved them. Or Blog about it. Link the blog to your sig - you could become a cult coder and we all follow your trials and tribulations as you make your first listbox populate from an access database!
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
1 - buy some good books and work through them. There's no substitute early on for having everything presented in one place, so nothing is missed
2 - set yourself realistic goals. Look for ways to take bite sized chunks so that you continuously learn new things, and learn to do them well. Trying to go too far at once, you get a basic idea and end up cutting and pasting lots of forum code
3 - when you ask for help on a forum and you're given a code snippet, look for any code you don't understand and use google/MSDN to find out exactly what it does. Try changing it and see what other options you have within that sort of code.
Above all, just keep going. We're all still learning, it's just that the longer you've been going, the quicker you learn and the more you already know ( obviously )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, i'm building a solution that has plenty of forms interacting with each other, based on MDI Parent - child model.
I created instances of them, never closing, just hiding those. I've also got some other forms that perform some analysis that might take a while. What i'm wondering is if it would be a good approach to make this calls to modalform on a different thread, or to only perform the long tasks on these forms on different thread in order to prevent the app to hold.
Thanks for your time. I appreciate all suggestions.
daniel sovino
|
|
|
|