|
yes i have added that one with txt
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Ha
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hi all,
i got question here need some information. i'm new in in programming.
could anyone help.
<br />
#include <stdio.h><br />
int main()<br />
{<br />
int a,b,c:<br />
a=5;<br />
b=7;<br />
c=a+b;<br />
printf("%d+%d=%d\n",c,a,b);<br />
return 0;<br />
}<br />
</stdio.h>
Can, anyone help me go through with this. Thanks. in my mind, the answer display on the screen should be "12+5=17". i'm not sure is that correct. Thanks all.
|
|
|
|
|
A good place to start is on the correct message board:
Visual C++[^]
No, the code is not correct. The order of arguments passed to printf()
will yield
12+5=7
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
can you explain why it has to be 12+5=7?
|
|
|
|
|
Looking at your question again, I see what you're getting at...
The printf() function just inserts the variables (converted to
string form) into the formatting placeholder spots. No arithmetic
is done.
So substituting 12, 5, and 7 in "%d+%d=%d" yields "12+5=7".
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Member 4099222 wrote: Thanks. in my mind, the answer display on the screen should be "12+5=17".
This displays 12 + 5 = 7. To get 12+5=17, try printf("%d+%d=%d\n",c,a,c + a);
|
|
|
|
|
Don't you want 5+7=12?
Which would be:
printf("%d+%d=%d\n",a,b,c);
You need to pass the parameters in the order they are in the format.
printf("%d+%d=%d\n",a,b,c);
1 2 3 1 2 3
See it?
[edit] formatting got screwed up [/edit]
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
I need to save orders locally in an XML file and then when connection is available I need to save them to SQL DB. I have built classes for Order and OrderCollection. What is the best way to save them to an XML file so I can later save them to DB? I am thinking of saving them to a DataSet and calling the WriteXml method on it to write to xml file. Afterwards, I can call ReadXml and then write everything to DB. Is this Ok?
Also, do I have to load all orders from file to a DataSet and add a new order and then re-write it or is there another alternative?
|
|
|
|
|
Mark your class as serializable and use XMLSerializer [^] class to serialize it.
|
|
|
|
|
I have used XmlSerializer before. I have one concern though: Do I have to deserialize all objects, add a new one, and then reserialize them? Reason being is because XmlSerializer creates a root node and a few other things so I can not simply append it to the end of the existing file.
|
|
|
|
|
CodingYoshi wrote: Do I have to deserialize all objects, add a new one, and then reserialize them?
Yeah, that's the better option. If you know how XML serializer is creating nodes, you can use normal XML manipulation classes and append new node to it. But the former option is more easy.
|
|
|
|
|
|
I am just starting to learn the FTPWebRequest and using my work server as testing. I can get the files, download the files and everything. What I was wanting to do is get a directory image and a file image. Using a tree view I want to put the directory image next to the name of the "file" if it was a directory and the same thing for a file except a different image..
I do not see anything or have seen anything that specifies rather it is a directory or a file other than just seeing if it has an extension at the end. How exactly would I do this? Or point me to a tutorial that does do this...
Thanks in advanced!
|
|
|
|
|
I ran a quick test and this seemed to work for me.
string path = "c:\\documents and settings\\administrator\\";
bool exists = System.IO.Directory.Exists(path);
MessageBox.Show("This path is a directory: " + exists.ToString());
Using the same code above, but adding a file name to the path variable:
string path = "c:\\documents and settings\\administrator\\somefile.txt";
bool exists = System.IO.Directory.Exists(path);
MessageBox.Show("This path is a directory: " + exists.ToString());
So if you have a string that you are certain contains either a full file name or a directory path, you should be able to determine if it is a directory or not using System.IO.Directory.Exists(path);
|
|
|
|
|
But that won't work on a remote FTP site...
|
|
|
|
|
My mistake, the way you worded it sounded like they had been downloaded already.
|
|
|
|
|
Ohh sorry
When pulling the .ListDirectory I was wondering how to basically seperate the directories from the files.
Thanks for the response though.
|
|
|
|
|
That's a tough one - the FTP protocol isn't very robust.
Jacob Dixon wrote: just seeing if it has an extension at the end
What about files with no extension?
The FTP list commands only give a human readable listing...
Plus AFAIK there's no standard for what should be in the listing.
FWIW, here's an example of parsing a DOS style FTP list:
Here's an example[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for the answer.. although I wish it wasnt that one lol.
So when creating FTP applications I guess most people do them in a different languages. I've been learning C# for a little while now and since started have always used this forum. Very brilliant people on here. I've improved quite a bit, but I am now getting interested in networking with it. I was wanting to create a FTP app and then try a chat app. Maybe I'll just stick with a simple FTP app lol.
Thanks
|
|
|
|
|
It's not the language. C# is just as effective as any other language for FTP.
The problem is the FTP protocol[^], which is a public published "standard".
It's dated and just doesn't provide a more robust directory listing command.
I'd like to see how FireFox does it...FTP directory tree always looks pretty
good there to me
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have created a dynamic crystal report "Generator" where u select the fields you want to see and than generate the report.
the problem im having is when i run the project.. it asks for a servername, database name, userid and password. ive set these in my code like this:
private ConnectionInfo crConnectionInfo = new ConnectionInfo ();
crConnectionInfo.DatabaseName = "DatabaseName";
crConnectionInfo.UserID = "Your UserID";
crConnectionInfo.Password = "Your Password";
the code i found says i must have a for loop where i loop through all the tables and apply the connection to the tables but i use a dataset so i dont know if this will apply.
Can sum1 please help me fix this error..
|
|
|
|
|
Hi everyone,
In some reasons I have an array of labels and its length is 3000!
I fix those Sizes and Locations and add them into a panel (in my form's constructor) but It takes about 10 or 15 seconds to load. Is there any faster way to do this task?
T.I.A
|
|
|
|
|
I believe that the correct forum for this could be Windows Forms!
I advice you to look for some kind of alternative for UI design since having thousands of labels in one panel is going to cause you a real headache.
Could you use grid instead?
The need to optimize rises from a bad design
|
|
|
|
|
Hi,
I'd be searching for a different approach.
I can't think of any problem that would require 3000 labels.
Mark.
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
Click here to view my blog
|
|
|
|