|
Ah, I love being reminded of Jet. Now we know where they DataSet team got there start.
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|
|
This is more of a theoretical question that anything else. There is no way to simulate it(All results will differ from implementation to implementation) so here goes. What will be faster (The least amout of bytes). To download (Save) a file from a website or to open the file directly in the browser
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Well if you download an image or open directly in browser you would still need to stream the image, so the byte count for the image atleast will always be the same. As far as i know whenever an image is viewed in the browser it is downloaded to computer anyway. So surely its the same process.... just my thoughts, i may be wrong
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
You're right.
If you save it, the byte stream will go to a place you have to assign. If you open it, you will save the picture in your cache. But if you want to open it I guess you also put it in your RAM, so I guess saving would be slightly quicker.
|
|
|
|
|
Thanks... its good to know i get things right sometimes
I was thinking there would be extra work in the loading but as the OP asked about displaying in a browser i assumed the intent was to show it to the end user in which case he would be displaying after download anyway... but as, like in most cases, the OP is AWOL we shall prob never know their aim lol
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Deresen wrote: But if you want to open it I guess you also put it in your RAM
No, it won't, since there is no telling how big the file is and it could run the system out of memory, the file is written directly to disk, then the file is launched using the Shell.
...and the OP didn't say anything about a picture, but listed generically, "file".
|
|
|
|
|
That's true.
And we assume it is a file.
The file has to be downloaded, always, if you save it or if you show it.
But if you show the file, the computer has to write the bits to the screen. This will cost time and possible more data which will stream to the ram.
|
|
|
|
|
There's no difference between the two processes. The file is downloaded into the browser cache either way.
|
|
|
|
|
Hi,
save=download+writeToFile
open=download+writeToScreen
Now what is faster depends on the complexity of the data. If it is simple HTML and a modern PC, showing it would typically be faster than writing it to disk; OTOH if it is a complex Excel file with lots of start-up macro's clearly writing to file would be faster since it does not require launching the app nor interpreting/executing the data.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:01 AM
|
|
|
|
|
Ok I get what your saying. But I did an experement with eathereal and saw that if you copy the file from a file server there is more chater on the network than if you open the file. I'm just wondering if the same applies to a download or open over the net.
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Hello,
I managed to read a text file and read the text line by line by doing this:
using (StreamReader sr = File.OpenText(fullName))<br />
{<br />
string s = "";<br />
while ((s = sr.ReadLine()) != null)<br />
{<br />
Matrice de données<br />
}<br />
}<br />
the text is a matrix separated by a semicolon, such :
NOM;PRENOM;ADRESSE;TELEPHONE
FONEY;julien;14 rue grifuelhes;0123679470
.
.
How can separate each field?, With the result matrix can be accessed later, thank you very much.
|
|
|
|
|
ArrayList listOfLines = new ArrayList();
in loop...
string[] values = s.split(';');
listOfLines.Add(values);
then you will have a list of 'rows' where you can access the 'columns'
many ways to handle this, hope this gives an idea
... your prob best stroing in a dataTable actually
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
We don't use ArrayList anymore.
|
|
|
|
|
I didnt what to type System.Collections.ObjectModel.Collection<string[]>... but guess i have now
plus i did 'edit' to say a dataTable would be a good alternative
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
musefan wrote: System.Collections.ObjectModel.Collection<string[]>.
IMO List<string> will do. A simple generics give you a typed ArrayList,
no explicit casting required any more.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:02 AM
|
|
|
|
|
Good to know, thanks
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
You can Split the strings on the semi-colons to get the individual values.
From there you could populate a DataTable or a two dimensional array, whatever you like.
|
|
|
|
|
Hi,
i added an eventhandler to the ItemSend event of the outlook outfolder. It fires regular but when i use following code
1 void Out_Items_ItemAdd(object Item) {
2 log4.Debug("new item in outfolder added");
3 Outlook.MailItem mail = Item as Outlook.MailItem;
4 if (mail == null) {
5 log4.Debug("not a mail item");
6 return;
7 }
8 try {
9 moveMailItem();
10 return;
11 }
12 mail.Send();
13 } catch (Exception ex) {
14 log4.Debug("error sending item", ex);
15 }
16 }
when i now send a new mail it works and it calls moveMailItem().
My problem is when i send an meetingRequestItem it logs that this is no mailitem and exits the eventhandler. But then the item never sends. Its hanging in the outfolder forever.
I tried to explicitely call send on that item but i found no way to call send to it.
I tried to add Item = null after line 5 and called the Garbage Collection. It thens sends all Appointments that where hanging before on 3 PCs but on one PC there where not all items send out that where no emails and they sent where still in outfolder.
Can someone please give me an hint how this could be fixed?
|
|
|
|
|
Hello,
i have some label, and i would write them on pdf file, this pdf contain table wicht i must respect the posistion of every label, how i can di this?? "Edit a pdf file or edit a pdf word and transforme it on pdf", please help me ti do this, thank you verry mutch.
modified on Thursday, February 12, 2009 8:47 AM
|
|
|
|
|
Well, you're going to have to find a way to interpret whats on the page, determine its boundries and then figure out how to place your text so you don't disturb what's already there.
Seriously, there's no way anyone can answer this question in a forum environment since there are so many different ways to put a table in a PDF or a Word doc.
|
|
|
|
|
how can i use multiple progress bars in single update panel
and while in progress mode update panel should be disabled like the message should be "plz wait loading..."
|
|
|
|
|
huh?
From what i can gather you have a progress bar in a panel, right?
Well to answer your question you just put more progress bars there
Is it something else you mean?
venu656 wrote: like the message should be "plz wait loading..."
plz dont use plz in message
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
I wouldn't run an application that said "plz wait loading.."
|
|
|
|
|
EliottA wrote: I wouldn't run an application that said "plz wait loading.."
Isnt that a paradox? (I hope im not needing a definition search for using that word )
well i did one anyway just to make sure lol...
A paradox is a statement or group of statements that leads to a contradiction or a situation which defies intuition; or, it can be an apparent contradiction that actually expresses a non-dual truth
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Hello,
i would open a directory like openFileDialog, i try openFileDialog, but he open the file, i would get a path of directory to save, thank you verry mutch.
|
|
|
|