|
i need to convert a string to an array.
ex:
"Code Project"
i want the result to be split and converted to an array
str(0) = "C"
str(1) = "o"
str(2) = "d"
str(3) = "e"
str(4) = " "
str(5) = "P"
str(6) = "r"
str(7) = "o"
...
etc
the problem is how to split the string to make it into an array?
-TheCardinal
|
|
|
|
|
|
Just what i wanted.
thanks Mark
TheCardinal
|
|
|
|
|
Now a days this forum of Code project has disappointed me quiet often. It seems like people on this forum are busy replying some tutorial questions or busy elaborating stupid questions like difference between string and String etc. But when it comes to the question which involes bit of technicality query will remain unanswered eventhough you post it multiple time. I am sure the idea behind floating this forum was definitely not to answer the school project questions.
I feel quiet disappointed....
|
|
|
|
|
I think people have not got into the habit of using the 'view unanswered questions' feature, and things get lost. What was your question ?
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 )
|
|
|
|
|
Christian,
I appreciate your quick reply. I put up this msg not because my questions didn't got any replies. But thing is now people don't even care to google their questions prior posting it here. Most of the time some new fellows post some very basic questions and people put whole lot of efforts in replying those questions. So hard core technical questions asked by other users remain unanswered.
In last 2 week's time i posted few questions which involved bit of technicality but none of them got replied. Before posting my question I always try to find out first using Google and when I don't find anything specific I post it here to get some directions. Hope other fellows also understand this and keep the noble idea behind floating this forum intact.
Thanks...
|
|
|
|
|
We have had a rash of basic newbie questions from people too freaking lazy to google. I try to call them out and flame them so others can igore the questions. Since you have posted this, likely your name will stick out so knowledgable members can take note to read your question.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
leckey wrote: Since you have posted this, likely your name will stick out so knowledgable members can take note to read your question.
Leckey,
Sorry but i couldn't get the meaning of your above line...
|
|
|
|
|
I meant that some names stick out. Some for bad reasons. Since you posted your concerns, when you post a question in the future helpful members will probably try to take extra time to help you.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Christian Graus wrote: I think people have not got into the habit of using the 'view unanswered questions' feature, and things get lost
I agree. I try to look at all of the unanswered questions in all of the forums and try and give some kind of meaningful answer to the question.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Christian,
I have also seen this happen on more than one occassion as well. The "signal to noise ratio" on the C# forum (particularly) but also the .NET Framework and Windows Forms forums has gotten extremely high, to the point that it is sometimes hard to spot the legitimate questions.
Short of implementing some sort of waiting period for new members before they can post questions, I don't know of a solution. The "View unanswered questions" feature isn't really an option here because it will still suffer from the higher percentage of "monkey questions" being asked.
To make matters worse, I see a lot of these same people posting responses to other questions that are completely wrong (but sometimes have an "air of authority" that makes them sound reasonable/correct) and the right answers can then sometimes get lost in the weeds.
Just my 2 cents worth. It certainly won't stop me posting responses or asking questions, even if I do sometimes have to ask them more than once, because there are still a lot of people here that know what they are talking about and provide good responses when they are able.
A while ago you Chris Maunder posted a message in the lounge (http://www.codeproject.com/lounge.asp?Page=2&userid=157870&mode=all&select=2137020&df=100&forumid=1159&fr=12834.5#xx2137020xx[^]) about some possible changes to the forums. What was the end result of that?
Thanks,
Scott.
-- modified at 22:34 Thursday 16th August, 2007
|
|
|
|
|
KrunalC wrote: eventhough you post it multiple time
Perhaps that's why. People who cross post and repeat posts tend to get ignored.
I looked through your message history, and almost every question you asked got replies. Where do you feel that you lack replies?
---
single minded; short sighted; long gone;
|
|
|
|
|
One of my message I had put up yesterday only got deleted automatically. I don't know how. I put the same question again but remain unanswered.
|
|
|
|
|
Guffa wrote: People who cross post and repeat posts tend to get ignored.
While that's generally true, sometimes it becomes necessary to repost a question or move it from one forum to another. I have had at least one occasion where a message posted in one forum didn't get a response, and after waiting a week or more I reposted it to a different forum where it immediately got responses that helped me resolve the problem.
|
|
|
|
|
Scott Dorman wrote: it becomes necessary to repost a question or move it from one forum to another.
I do agree... Sometimes your question remain unanswered as it may not be viewed by person who know about it but if you repost it after sometime, there are chances that it get looked up and replied by person who know about it...
|
|
|
|
|
KrunalC wrote: stupid questions like difference between string and String etc
there is no stupid question. (maybe. stupid post might be like that one that you just post.. ) it doesn't matter whether it's easy or so difficult. we will answer if we like to.
Some facts about why we don't answer
#1. the first reason is simple. we don't answer because we don't know. we are not God so that it's not possible to know everything.
#2. We don't answer the question like "how to create search engine like Google?" or "Can you help me to do my assignment or homework?"
#3. Sometimes, in order to answer a particular question, it is required to have an environment to reproduce the issue. (For example, if someone is asking about PHP questions (eg: How to call procedure in MySQL to use in PHP?), we need to install PHP and mysql in our machine and try to reproduce the error in our computer. and find the solution for that. so, it is required more time to give the answer. )
Anyway, don't forget that we are contributing or helping other people's problems with FREE OF CHARGES. If you want the exact answer whenever you are asking, you should probably contact with the consultants with thousand dollars.
Thanks for understanding.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Michael Sync wrote: there is no stupid question. (maybe. stupid post might be like that one that you just post.. )
Michael,
If you feel like the concern which I have raised is stupid than at first place you should now have spend your time in replying to it. You could have used this time to resolve some more tutorial questions.
Pls try to understand my concen and support the idea of putting up this forum and making it more effective.
thanks....
|
|
|
|
|
Hi KrunalC,
KrunalC wrote: You could have used this time to resolve some more tutorial questions.
As I said, it doesn't matter whether the question is easy or difficult. We will answer if we have the solution.
KrunalC wrote: Pls try to understand my concen and support the idea of putting up this forum and making it more effective.
I understand that you feel disappointed when you don't get something you want. Do you know how we feel when we got a complaint even we are trying to help others as much as we can?
Thanks.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
|
Nearly one year before I too had posted the same opinion in the lounge. And I was suggesting about an option of including a post like "Unanswered questions of the week" in the lounge every week by admin. But I was voted down.
I also suggested to rank the post before moving into the unanswered category .So It should be moved only if the post has got a minimum cut off mark.
The only thing happened after that is this unanswered answer section.
But still some crooked minds know that the best possible way to get an answer for a tough question is to post it in lounge and they are doing it also.
|
|
|
|
|
jith - iii wrote: the best possible way to get an answer for a tough question is to post it in lounge
No, that will only get your post modded out of the lounge.
|
|
|
|
|
I have seen people coming to lounge after the failed attempts in other forums with the sugar coated versions of their questions.
|
|
|
|
|
First of all, I have HideSelection set to false. I implemented drag and drop in a TreeView so that the indexed cards in the tree can be moved manually (cards store book info like Library card files). An XML file is updated with the newly arranged tree. The TreeView is refreshed in the Drag_Drop event, but the SelectedNode does not show!
Is there a workaround for this?
Here's the code...,
<small>private void cardsTreeView_DragDrop( object sender, DragEventArgs e )
{
nodePosition.X = e.X;
nodePosition.Y = e.Y;
nodePosition = cardsTreeView.PointToClient(nodePosition);
TreeNode dropNode = cardsTreeView.GetNodeAt(nodePosition);
if (dropNode != null && dropNode.Parent == this.nodeToDelete.Parent)
{
TreeNode dragNode = this.nodeToDelete;
if (dropNode == dragNode)
return;
dropNode.Parent.Nodes.Remove(this.nodeToDelete);
dropNode.Parent.Nodes.Insert(dropNode.Index + 1, dragNode);
Cards.MoveCardTo(GetIndexString(dropNode), GetIndexString(nodeToDelete));
Cards.ReOrderCards();
if (cardsTreeView.Nodes.Count > 0)
cardsTreeView.Nodes.Clear();
cardsTreeView.BeginUpdate();
Cards.GetAllCards(ref cardsTreeView);
cardsTreeView.EndUpdate();
cardsTreeView.ExpandAll();
cardsTreeView.EndUpdate();
cardsTreeView.SelectedNode = cardsTreeView.Nodes[dropNode.Index];
cardsTreeView.SelectedNode.EnsureVisible();
}
}
private void cardsTreeView_DragEnter( object sender, DragEventArgs e )
{
if(e.Data.GetDataPresent(DataFormats.Text))
e.Effect = DragDropEffects.Move;
else
e.Effect = DragDropEffects.None;
}
private void cardsTreeView_ItemDrag( object sender, ItemDragEventArgs e )
{
nodeToDelete = (TreeNode) e.Item;
string strItem = e.Item.ToString();
DoDragDrop(strItem, DragDropEffects.Copy | DragDropEffects.Move);
}
</small>
Thanks,
Mark
|
|
|
|
|
Give this a try. I've noticed that some properties don't seem to update until they are rendered (bad form IMO).
cardsTreeView.SelectedNode = cardsTreeView.Nodes[dropNode.Index]; <br />
cardsTreeView.Nodes[dropNode.Index].EnsureVisible();
|
|
|
|
|
Sorry, but I don't understand your reply. You posted the code that I already have in my project.
Mark
|
|
|
|