Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
GeneralRe: Count bitpattern occurences in textstrings Pin
invictus321-Jan-08 0:09
invictus321-Jan-08 0:09 
GeneralRe: Count bitpattern occurences in textstrings Pin
Luc Pattyn21-Jan-08 0:45
sitebuilderLuc Pattyn21-Jan-08 0:45 
GeneralRe: Count bitpattern occurences in textstrings Pin
invictus321-Jan-08 0:57
invictus321-Jan-08 0:57 
GeneralRe: Count bitpattern occurences in textstrings Pin
Luc Pattyn21-Jan-08 1:09
sitebuilderLuc Pattyn21-Jan-08 1:09 
GeneralRe: Count bitpattern occurences in textstrings Pin
invictus321-Jan-08 22:41
invictus321-Jan-08 22:41 
GeneralRe: Count bitpattern occurences in textstrings Pin
Luc Pattyn22-Jan-08 1:07
sitebuilderLuc Pattyn22-Jan-08 1:07 
GeneralRe: Count bitpattern occurences in textstrings Pin
Ennis Ray Lynch, Jr.15-Jan-08 11:00
Ennis Ray Lynch, Jr.15-Jan-08 11:00 
GeneralRe: Count bitpattern occurences in textstrings Pin
invictus315-Jan-08 23:10
invictus315-Jan-08 23:10 
This was an interesting idea.

Lets assume I have a string that consists only of the ascii symbols from code 32 and up to 126. Now each character must be at least 7 bits long (but probably are 8 as a result of byte of 8 bits). This leads to alot of possible combinations to be checked with the & operator if I want to check for all possible 2-bit patterns (even the one overlapping into the next character).

If I make the assumption that characters are 8 bits and include the first 0 in my calculations (to make it easier) I would still have to test against all possible combinations of 00, 01, 10, and 11 at all two consecutive slots within each character. Furthermore, I would have to test each of the four against the last bit of the current char and the first bit of the next char.

I am fully aware that this post perhaps should be located in the math/algo forum now. The question I now want to ask is this: is there any clever boolean algebra method for testing for this bit pattern in each possible location or do I have to manually test each of the possible locations?

If any mod reads this then perhaps this and the previous posts can be moved to the correct forum. Thank you.
GeneralRe: Count bitpattern occurences in textstrings Pin
Ennis Ray Lynch, Jr.16-Jan-08 4:11
Ennis Ray Lynch, Jr.16-Jan-08 4:11 
GeneralRe: Count bitpattern occurences in textstrings Pin
PIEBALDconsult15-Jan-08 15:41
mvePIEBALDconsult15-Jan-08 15:41 
GeneralCatching MouseMove Event Pin
stancrm14-Jan-08 21:16
stancrm14-Jan-08 21:16 
GeneralRe: Catching MouseMove Event Pin
Nouman Bhatti14-Jan-08 22:26
Nouman Bhatti14-Jan-08 22:26 
QuestionHow to upgrade existing application ...? Pin
Pankaj - Joshi14-Jan-08 21:13
Pankaj - Joshi14-Jan-08 21:13 
AnswerRe: How to upgrade existing application ...? Pin
led mike15-Jan-08 4:56
led mike15-Jan-08 4:56 
GeneralRe: How to upgrade existing application ...? Pin
Pankaj - Joshi15-Jan-08 23:23
Pankaj - Joshi15-Jan-08 23:23 
GeneralRe: How to upgrade existing application ...? Pin
led mike16-Jan-08 5:42
led mike16-Jan-08 5:42 
QuestionAssigning WPF Styles at runtime [modified] Pin
AlexZ7114-Jan-08 20:57
AlexZ7114-Jan-08 20:57 
QuestionNot Able to Send Mail Through C# Code Pin
Neeraj Kr14-Jan-08 20:30
Neeraj Kr14-Jan-08 20:30 
GeneralRe: Not Able to Send Mail Through C# Code Pin
Abhijit Jana14-Jan-08 20:31
professionalAbhijit Jana14-Jan-08 20:31 
GeneralRe: Not Able to Send Mail Through C# Code Pin
Neeraj Kr14-Jan-08 22:21
Neeraj Kr14-Jan-08 22:21 
GeneralRe: Not Able to Send Mail Through C# Code Pin
justintimberlake14-Jan-08 21:05
justintimberlake14-Jan-08 21:05 
QuestionSetting the color of a component (R:G:B) Pin
Programm3r14-Jan-08 20:24
Programm3r14-Jan-08 20:24 
GeneralRe: Setting the color of a component (R:G:B) Pin
Abhijit Jana14-Jan-08 20:30
professionalAbhijit Jana14-Jan-08 20:30 
GeneralRe: Setting the color of a component (R:G:B) Pin
Programm3r14-Jan-08 20:44
Programm3r14-Jan-08 20:44 
QuestionCompiling .Net 1.1 Pin
Muammar©14-Jan-08 20:17
Muammar©14-Jan-08 20:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.