|
The Length of value is not fixed for 3
it can be increase and the result will be change according to input.
then how can i do that.
If you can think then I Can.
|
|
|
|
|
Length of string is dynamic too on my example.
Did you try my code to see result?
Which is result for you if the string is "abcd"
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
the result by program is :
a
b
c
d
ab
bc
cd
abcd
But Required result is :
a
b
c
d
ab
bc
cd
da
bd
abc
bcd
dab
....
abcd
..etc
If you can think then I Can.
|
|
|
|
|
Backtracking . You can search google to more detail .
I can it useful for you . Thanks !!
|
|
|
|
|
Homework question?
Should the output contain ACB? or strictly ordered?
|
|
|
|
|
A double iteration over the input string with position and substring length :
string str = "anystring";
for (int x = 1; x <= str.Length; x++)
{
for (int y = 0; y <= str.Length - x; y++)
{
Console.WriteLine(str.Substring(y, x));
}
}
Cheers
|
|
|
|
|
Hello Estys,
Thanks for your solution.But it is missing values.
Input : ABC
Output :
A
B
C
AB
BC
CA // Missing Value
SO pls provide the solution for that.
If you can think then I Can.
|
|
|
|
|
I didn't see the "CA" value, ouch!
Can you give an example of the expected output if the input is "ABCD"?
Or perhaps describe the situation in words? I suspect you're going to need some recursive algorithm.
Cheers
|
|
|
|
|
Estys wrote: input is "ABCD"?
Same question I asked
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
Blue_Boy wrote: Same question I asked
Great minds think alike .
If you can read this, you don't have Papyrus installed
|
|
|
|
|
CA wasn't in the initial spec, but AC was. The OP needs to better define what the problem actually is (and why he wants to solve it beyond 'my homework says so').
|
|
|
|
|
You're right of course from a professional viewpoint.
Some people, non-native english speakers, have trouble finding the right phrasing of the question though, which leads to this kind of confusion.
I took a look at his profile, very interesting.
Personally, I usually like solving these kindergarten puzzles, even if it sounds like homework .
Cheers
|
|
|
|
|
Based on his/her profile description, he/she should be able to solve that problem.
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
|
But he isn't asking for permutations..
|
|
|
|
|
I think he is asking combination.....
I quit being afraid when my first venture failed and the sky didn't fall down.
|
|
|
|
|
|
What you're looking for is the power set of "abc" (http://en.wikipedia.org/wiki/Power_set[^] )
If you go through all the 3-bit numbers (000, 001, 010, 011...) (i.e. the power set) and use the letters corresponding to 1's, that will give you all the permutations.
|
|
|
|
|
Hi friends
Currently am working on one windows application which am developing using C#.net... I need to integrate barcode reader with my application... So can anyone help what is the namespace that has to be used in order to use barcode reader... And if possible can any one give relevant info regarding how to read barcode from image... Thanks in advance...
|
|
|
|
|
There is no such namespace.
Using dedicated scanners it is quite simple. They come in all sorts and you can connect to them(the scanners) using either COM(RS 232) or USB or...
As for reading the barcode from an image in your code, this article should give you an idea.
All the best,
Dan
|
|
|
|
|
U mean i need to install that software which comes with scanners..
|
|
|
|
|
Just on your dev machine. To maybe set them up(like what to decode and what not, the max barcode length...).
But even this is not mandatory. You can leave them(the scanners) to their fabric default settings.
No need to install anything on clients. The scanners do the decoding and send the result either to a serial port or through the USB depending on config.
All the best,
Dan
|
|
|
|
|
But you do need to read the instructions for your scanner and find out what protocol is used to talk to it. I think you can access the I/O ports direct from .Net without P/Invoke these days but you still need to know what is being said.
|
|
|
|
|
First step would be to actually investigate bar code readers.
And just to be sure you are not presuming that you can write code that will work with any reader without actually testing it right?
|
|
|
|
|
Hello: I am from the country and English is very good, I have a project in C # you can do video conferencing with your help.
|
|
|
|