
- I'm working on setting up an http interface and one requirement that am working with was to take a string and use it's status as a bool. The result of the string I then run the bool in a conditional if/else block, and it works fine when true but is not triggered when false. Even tried with a null, same result. Anyone been down this road and willing to share some info? I believe this question is not language dependent. -File stream: Not sure whether the stream referred to in programming is in binary format? E.g. in the comms world, streams are modulated binaries in a digital signal i.e the payload binaries are carried by a modulated carrier. Anyone care to discuss the file streams in programs. Cheers. :-)

Some examples (sample code/pseudocode) on how you "take a string and use it's status as a bool" and how you "run the bool in a conditional block" would be in order. Don't assume we know what you are trying to do. -Billy 2011/5/25 aki <aki275@gmail.com>
- I'm working on setting up an http interface and one requirement that am working with was to take a string and use it's status as a bool. The result of the string I then run the bool in a conditional if/else block, and it works fine when true but is not triggered when false. Even tried with a null, same result. Anyone been down this road and willing to share some info? I believe this question is not language dependent.
-File stream: Not sure whether the stream referred to in programming is in binary format? E.g. in the comms world, streams are modulated binaries in a digital signal i.e the payload binaries are carried by a modulated carrier. Anyone care to discuss the file streams in programs.
Cheers. :-)
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

Sorry Billy, cannot release my code portion as it's many days work. But I've listed the question as it exactly stands, hopefully it makes some sense. Thanks though. Cheers. :-) On Wed, May 25, 2011 at 9:47 PM, Billy <billyx5@gmail.com> wrote:
Some examples (sample code/pseudocode) on how you "take a string and use it's status as a bool" and how you "run the bool in a conditional block" would be in order. Don't assume we know what you are trying to do.
-Billy

It doesn't make sense to me. How exactly is that possible? On Wed, May 25, 2011 at 10:26 PM, aki <aki275@gmail.com> wrote:
Sorry Billy, cannot release my code portion as it's many days work. But I've listed the question as it exactly stands, hopefully it makes some sense. Thanks though. Cheers. :-)
On Wed, May 25, 2011 at 9:47 PM, Billy <billyx5@gmail.com> wrote:
Some examples (sample code/pseudocode) on how you "take a string and use it's status as a bool" and how you "run the bool in a conditional block" would be in order. Don't assume we know what you are trying to do.
-Billy
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- Solomon Kariri, Software Developer, Cell: +254736 729 450 Skype: solomonkariri

i cant for the life of me figure out what u are asking. maybe a rephrase of the question would help On Wed, May 25, 2011 at 10:55 PM, solomon kariri <solomonkariri@gmail.com>wrote:
It doesn't make sense to me. How exactly is that possible?
On Wed, May 25, 2011 at 10:26 PM, aki <aki275@gmail.com> wrote:
Sorry Billy, cannot release my code portion as it's many days work. But I've listed the question as it exactly stands, hopefully it makes some sense. Thanks though. Cheers. :-)
On Wed, May 25, 2011 at 9:47 PM, Billy <billyx5@gmail.com> wrote:
Some examples (sample code/pseudocode) on how you "take a string and use it's status as a bool" and how you "run the bool in a conditional block" would be in order. Don't assume we know what you are trying to do.
-Billy
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- Solomon Kariri,
Software Developer, Cell: +254736 729 450 Skype: solomonkariri
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

On Wed, May 25, 2011 at 22:26, aki <aki275@gmail.com> wrote:
Sorry Billy, cannot release my code portion as it's many days work. But I've listed the question as it exactly stands, hopefully it makes some sense. Thanks though. Cheers. :-)
Aki, You can at least provide a pseudo code. If foo { bar }, else ... blah... :) -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ I can't hear you -- I'm using the scrambler. Please consider the environment before printing this email.

Sawa, here goes in a nutshell : string ske = "I love SkunksKE!" string ske2 = "I dislike SkunksKE!" If ( condition on ske = true ) //condition is a bool { //run ske } else { //run ske2 }

My guess is that you might be using an = instead of == . like If ( condition on ske = true ) instead of If ( condition on ske == true ) Most languages use the second construct for comparison and the first for assignment. The first will alwayz evaluate to true since you r simply assigning true to a variable. Thats what I can almost make out so far. On Thu, May 26, 2011 at 9:20 AM, aki <aki275@gmail.com> wrote:
Sawa, here goes in a nutshell :
string ske = "I love SkunksKE!"
string ske2 = "I dislike SkunksKE!"
If ( condition on ske = true ) //condition is a bool
{ //run ske }
else
{ //run ske2 }
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- Solomon Kariri, Software Developer, Cell: +254736 729 450 Skype: solomonkariri

i still do not understand the boolean relevance in the pseudo code. it would seem that you are trying to evaluate strings. String ske = "i Love Skuks"; String ske2 = "i dislike Skunks"; if(ske.equals("i Love Skunks")) { //run ske; } else { // run ske2; } On Thu, May 26, 2011 at 9:20 AM, aki <aki275@gmail.com> wrote:
Sawa, here goes in a nutshell :
string ske = "I love SkunksKE!"
string ske2 = "I dislike SkunksKE!"
If ( condition on ske = true ) //condition is a bool
{ //run ske }
else
{ //run ske2 }
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

@solomon, @Steve, @chris. Thanks guys for the help. :-) @chris, that's correct i.e I'm evaluating strings. And I can get it to work fine on true but not false because the string inputs vary i.e not a constant. Also, if I use a null on the input, the false is still not triggered. Strings can only use these operators == and != so I thought of trying to use a bool value somewhere to create the trigger, but no success. Basically, I've created a web app user interface which carried some intelligence i.e does not use any validation rules or code. With the else code, I've got various other things happening like e.g. a progress and status bar, a "file stream " diagnostic ( which am still to work on ), and disbaling features that block the interface after a few tries. On Thu, May 26, 2011 at 9:45 AM, Chris Mwirigi <mwirigic@gmail.com> wrote:
i still do not understand the boolean relevance in the pseudo code. it would seem that you are trying to evaluate strings.
String ske = "i Love Skuks"; String ske2 = "i dislike Skunks";
if(ske.equals("i Love Skunks")) { //run ske; } else { // run ske2; }

how about using regex to match your strings? On Thu, May 26, 2011 at 10:19 AM, aki <aki275@gmail.com> wrote:
@solomon, @Steve, @chris. Thanks guys for the help. :-)
@chris, that's correct i.e I'm evaluating strings. And I can get it to work fine on true but not false because the string inputs vary i.e not a constant. Also, if I use a null on the input, the false is still not triggered. Strings can only use these operators == and != so I thought of trying to use a bool value somewhere to create the trigger, but no success.
Basically, I've created a web app user interface which carried some intelligence i.e does not use any validation rules or code. With the else code, I've got various other things happening like e.g. a progress and status bar, a "file stream " diagnostic ( which am still to work on ), and disbaling features that block the interface after a few tries.
On Thu, May 26, 2011 at 9:45 AM, Chris Mwirigi <mwirigic@gmail.com> wrote:
i still do not understand the boolean relevance in the pseudo code. it would seem that you are trying to evaluate strings.
String ske = "i Love Skuks"; String ske2 = "i dislike Skunks";
if(ske.equals("i Love Skunks")) { //run ske; } else { // run ske2; }
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

Thanks @Kiti. Seems maybe a good option, but it complicates quite a lot because should the string can contain hex characters, then I need to setup the expressions for this too. For example, for a basic password validation expression this is the minimum \S+@S+!,\S+. I wonder how many of the expressions will I setup to create the false trigger? Let me try. cheers. :-) On Thu, May 26, 2011 at 10:47 AM, Kiti Chigiri <kiti.chigiri@gmail.com>wrote:
how about using regex to match your strings?

If you study regex manuals/usage well, you will learn that it was invented for the kind of work you want to do. Take some time off your project (if time allows) and read up on regex. Search google or try *this article*<http://gnosis.cx/publish/programming/regular_expressions.html>for example. With regexp, its even possible to accomplish your "AI" analysis in one statement using conditional operation Consider this pseudocode *bool *boolvar = (one of your "*positive feedback*" substrings is found by regexp)?true:false; * *

You probably have a logic error somewhere in your code and its hard to tell. Make sure in your implementation what you think evaluates to true is actually true and not false. I have to make this assumption because you have given us very little to go on. ----- "aki" <aki275@gmail.com> wrote:
Sorry Billy, cannot release my code portion as it's many days work.. But I've listed the question as it exactly stands, hopefully it makes some sense. Thanks though. Cheers. :-)
On Wed, May 25, 2011 at 9:47 PM, Billy < billyx5@gmail.com > wrote:
Some examples (sample code/pseudocode) on how you "take a string and use it's status as a bool" and how you "run the bool in a conditional block" would be in order. Don't assume we know what you are trying to do. -Billy
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
participants (8)
-
aki
-
Billy
-
Chris Mwirigi
-
James Nzomo
-
Kiti Chigiri
-
Odhiambo Washington
-
solomon kariri
-
Steve Obbayi