|
Did you actually read the explanation that OriginalGriff posted, or the previous message that I wrote? A string is not a value type so its data will be stored on the heap. Its reference pointer s will be on the stack. If you want a simple explanation then read Charles Petzold's excellent .NET Book Zero[^].
|
|
|
|
|
|
And in response to the message you sent and then deleted: unless you actually read the book you are not likely to learn anything.
|
|
|
|
|
i read many write up like how data reader fetch data. here are few links
http://stackoverflow.com/questions/1696128/sqldatareader-a-firehose-cursor-no-buffering?lq=1
http://stackoverflow.com/questions/23467482/how-does-sqldatareader-handle-really-large-queries?lq=1
http://stackoverflow.com/questions/1383920/how-datareader-works
http://stackoverflow.com/questions/22554158/how-much-data-can-be-stored-in-network-buffer-when-datareader-is-used
people are saying that data reader fetch data in chunk and store in network buffer and display from there. when all data read completed from buffer then again database round trip occur. that why people say data reader is efficient for data reading purpose because it minimize the db round trip but still many things are not clear to me
suppose i issue a sql query like Select empid,Name from employee table there are 10,000 rows then what will happen. how much data sql server will send to client?
suppose network buffer could store 8kb data then sql server may send more than 8kb data or sql server know the client pc network buffer size in advance?
suppose first 100 data is stored in network buffer so when again db trip will occur for next 100 data then same query will executed so how sql server will know that that time sql server has to send data from 101 to 200 etc?
i like to know the above internal process in details regarding interaction between sql server and data reader. so please share the know if some one knows it in details.
one bit different question. how we can determine each row size in byte or kb programmatically by c#. if possible give me direction with sample code. thanks
tbhattacharjee
|
|
|
|
|
I wouldn't trust stackoverflow for accurate details like that. Though I don't know either, and it's not something I think the average developer really needs to know about.
Bear in mind also that each ADO.net Provider may implement different strategies to improve performance.
Tridip Bhattacharjee wrote: database round trip occur
That seems untrue, particularly for a query.
Tridip Bhattacharjee wrote: how we can determine each row size in byte
Call the GetSchemaTable method of the DataReader (https://msdn.microsoft.com/en-us/library/system.data.idatareader.getschematable(v=vs.110).aspx[^]), it will give you a DataTable describing the content of the data, including a ColumnSize column, sum up those values. Note: MAX -sized character columns may cause confusion.
modified 26-Feb-15 9:43am.
|
|
|
|
|
Hi
Dears i want to design a project in c#. i need a class library in c# who read sms from gsm modem and auto respond to that sms, auto reply sms and sms sender want to apply for leave in his company. my system read sms and apply for leave to already designed database in oracle.
please guide me with example and some comand strings for sending sms
thanks
|
|
|
|
|
|
say i hard many people like started in interview face question like to find out palindrome word writing program. so is there any web site which show basic question asked for various algo during interview.
i like similar question like palindrome word or number which many people learn during programming with c and c++ for developing logic sense.
anyone can redirect me to those web site from where i can acquire many also like palindrome which people learn during programming and also asked during interview. thanks
tbhattacharjee
|
|
|
|
|
Are you asking for questions to ask people, or for questions that you might be asked in an interview?
|
|
|
|
|
Sorry probably i could not explain properly. i search Google but may be could put right keyword so i am not getting a web site which help peole to learn programming by c,c++ or c# with many logical program like Fibonacci series or palindrome word or number and various kind of sorting etc.
so if anyone know about any web site from where we can see many program is there for learning purpose then please share the url. thanks
tbhattacharjee
|
|
|
|
|
I suggest that you first learn how to communicate in English before trying to program in any other language!
|
|
|
|
|
No, I'm afraid there isn't.
Interviewers can ask the candidate to do anything (within reason, it will be related to the job function in some way) so there is no "set of algorithms" that interviewers have to pick from.
It's not to check if you remember algorithms, to to find out how you think - when you don;t have Google to do it for you!
What the interviewer is looking for is to see how well you handle simple problems (and palindromes are indeed a very simple problem) to see if the way you think fits in to how his company works. Memorizing algorithms won't help you there because the chances are the task will be unrelated to any particular algorithm, but how you implement the things do you know.
So relax, be confident, and think about the task they set - rather than trying to use the thinking of others to get you a job! (Because if you rely on others to pass the interview, you won't last long once in the job - everyone can spot the "dead wood" who can't actually do the work)
You'll be fine!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Sorry probably i could not explain properly. i search Google but may be could not put right keyword so i am not getting a web site which help peole to learn programming by c,c++ or c# with many logical program like Fibonacci series or palindrome word or number and various kind of sorting etc.
so if anyone know about any web site from where we can see many program is there for learning purpose then please share the url. thanks
tbhattacharjee
|
|
|
|
|
Don't focus on tasks: instead learn by doing. Get a book, or a course and do the exercises - they introduce the concepts in a logical sequence, and (hopefully) mean that you understand fully what you are doing before moving on to the next subject.
Trying to find existing programs doesn't help at all in that: you don't learn as much (or as well) by "looking" as you do by "doing".
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: What the interviewer is looking for is to see how well you handle simple problems (and palindromes are indeed a very simple problem) to see if the way you think fits in to how his company works.
To be fair and clear that is what the interviewer thinks that they are doing.
Statistically most of the time such skill tests would work just as well if they handed the interviewee a bag of Legos and ask them to build a car.
|
|
|
|
|
A random array of elements is given. Your program needs to find all the sections(sequences) in the array that are in ascending order, find the sum of those sequences, then find the largest sum and print the largest sum along with the sequence of numbers. For example if the array is like
4, 5, 6, 2, 1, 2, 3, 4, 12, 6, 4, 2, 1, 5, 8, 9
Then ascending sequences in the given array are
· 4,5,6 with sum 15
· 1,2,3,4,12 with sum 22
· 1,5,8,9 with sum 23
So your program should print the sequence 1 5 8 9 and the sum 23, as it’s the largest sum of ascending sequences.
|
|
|
|
|
Your homework is set to test what YOU know. If you can't do it, then talk to your teacher.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Sure, I'll help you. The key to solving this issue is to break it down into logical chunks from your requirements.
1. Find all ascending order sequences.
2. For each result from step 1, sum the values
3. Identify the largest out of step 2.
So, you see that you have three logical areas. You know that you have an array and that you start at element 0, so all you need to do to complete step 1 is to check to see if the next value is 1 greater than the current value or if you have reached the end of the list. Store your value in an appropriate data structure and move onto the next. Once you have completed this stage, proceed to break the other stages down into a logical set of steps and solve.
|
|
|
|
|
|
Pete O'Hanlon wrote: see if the next value is 1 greater than the current value It doesn't have to be 1 greater, just greater.
OP said that 1,2,3,4,12 was an example of a correct sequence.
(Ascending vs. sequential)
A positive attitude may not solve every problem, but it will annoy enough people to be worth the effort.
|
|
|
|
|
An excellent point. This is the problem with making assumptions.
|
|
|
|
|
And?
What have you tried?
Where are you stuck?
Why do you think we want to do your homework?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I'd like to see a solution using LINQ!
Regards,
Rob Philpott.
|
|
|
|
|
DataSet ds = new DataSet();
string f = dateTimePicker1.Text.ToString().Trim();
string t = dateTimePicker2.Text.ToString().Trim();
ds = bl.Totall(f,t);
dataGridView1.DataSource = ds.Tables[0];
but there is error :"Cannot find table 0".
plz help me.
|
|
|
|
|
Member 11479040 wrote: ds = bl.Totall(f,t); ..and what's that supposed to be / to do?
|
|
|
|