Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 396 results for
needle
- Page 1
Re: A reliable way of detecting AI content?
Hardware and Software
Cloud-based Apps
1 Month Ago
by Reverend Jim
… note, I read recently about some researchers using a "
needle
in a haystack" test on an AI. They buried…
Needle which show's car speed can we use in vb
Programming
Software Development
16 Years Ago
by jatinder_44
Needle
which will show fluxation when receving data ,as it show's the car speed .Is there is any control in vb. can anybody give some info on this. wating for rply
Re: Needle which show's car speed can we use in vb
Programming
Software Development
16 Years Ago
by Prozeen
[URL="http://www.codeguru.com/vb/controls/vb_othctrl/ocxcontrols/article.php/c9175/"]Something like this?[/URL]
Re: Needle which show's car speed can we use in vb
Programming
Software Development
16 Years Ago
by AV Manoharan
Fundamentally commputers are of two kinds. Analog and Digital. I hope you are using a digital computer. The signals produced by a speedo meter is analog in nature. An instrument that can translate this analog in to digital if attached-you can read the input. In modern cars a computer does it- to warn the driver to reduce the speed when a …
Re: Needle which show's car speed can we use in vb
Programming
Software Development
16 Years Ago
by QVeen72
[quote=Prozeen;390355][URL="http://www.codeguru.com/vb/controls/vb_othctrl/ocxcontrols/article.php/c9175/"]Something like this?[/URL][/quote] So, Why dont u down load from that Code Guru Website and use it.. its a very good Example... and quite simple Regards Veena
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by Gonbe
…two times. */ const string HAYSTACK = "abbaabbaabb"; const string
NEEDLE
= "abba"; int counter = 0; /* A custom compare… h_it(HAYSTACK.begin()), h_end(HAYSTACK.end()); string::const_iterator n_it(
NEEDLE
.begin()), n_end(
NEEDLE
.end()); h_it = search(h_it, h_end, n_it, n_end, compare_fun…
Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by Joemeister
… code on how to make it simpler to find the
needle
in the haystack for example "abbaabbaabb", "abba…" - the
needle
, "abba" is found 2 times in the haystack…
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by Joemeister
… n = 0; string::size_type strSize = 0; while ( (strSize = haystack.find (
needle
,strSize) ) != string::npos ) { strSize++; n++; //case sensivity? } return n; BUT…
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by NathanOliver
If you call transform on both haystack and
needle
and have them both lower case then it should work.
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by tapananand
First of all this code is wrong. But before that let me describe how one expects this to work. The find function in string class returns the index where the substring starts in the original string. The finding starts from the index starting at the second argument which is optional. find returns the constant string::npos if string is not found. So …
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by NathanOliver
The way I have done it is like: size_t pos = 0; int counter = 0; // loop untill substrng is not found. while ((pos = strng.find(subStrng, pos)) != std::string::npos) { counter++; pos++; // increment pos so we dont duplicate the last search. } I am writing this from memory so there might be a bug I am …
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by NathanOliver
You need to transform the strings to all lower case. You can use this to do that. string input = "AbAbbAbBBaAA"; transform(input.begin(), input.end(), input.begin(), ::tolower);
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by Joemeister
Yeah, what I realised is that "Th" should be considered the same as "th"... Will that code still work in that case?
Re: Finding a string within a string (Needle and Haystack c++)
Programming
Software Development
9 Years Ago
by Joemeister
It was as simple as converting both strings into upper or lowercase and then compare it. Huge thanks to all who contributed!
error in my string code.
Programming
Software Development
16 Years Ago
by kireol
…] int main () { char thevalue[1024]; char
needle
[25]; char haystack[2048]; memset(thevalue,0,sizeof(…thevalue)-1); memset(
needle
,0,sizeof(
needle
)-1); memset(haystack,0,sizeof(haystack)-1… int getvalue(char * thevalue, char * haystack, char *
needle
) { char * pch; char temp[2048]; int templength=0…
How do I make a recursive GetEnumerator() ?
Programming
Software Development
12 Years Ago
by JohnPool
…n is: [CODE] void MoveTower0 (int n,
Needle
start,
Needle
finish,
Needle
temp) { if (n > 0) {…{ private set; get; } public Move (int n,
Needle
start,
Needle
finish,
Needle
temp) { N = n; Start = start; Finish…CODE] varStack.Push (new Move (n,
Needle
.A,
Needle
.B,
Needle
.Temp)); MoveTower1 (); [/CODE] The next…
PHP-SearchText Highlight Function
Programming
Web Development
16 Years Ago
by sujithfem
… own case... [CODE]function ShowPowerHighlight($Text,$
Needle
) { for($j=0; $j< count($
Needle
); $j++){ if ($
Needle
[$j] != "") { $TextTemp = ""… developers to create dynamic content that interacts with databases" ; $
Needle
= array ("0" =>"PHP","1…
Re: PHP-SearchText Highlight Function
Programming
Web Development
16 Years Ago
by sujithfem
… own case... [CODE]function ShowPowerHighlight($Text,$
Needle
) { for($j=0; $j< count($
Needle
); $j++){ if ($
Needle
[$j] != "") { $TextTemp = ""… developers to create dynamic content that interacts with databases" ; $
Needle
= array ("0" =>"PHP","1…
How to handle error C2664
Programming
Software Development
14 Years Ago
by octavia
…; //char *M,*S; int result; //int stripos(char *haystack,char *
needle
,int offset); //clrscr(); //// User data entry //// cout<<"…,position; while(*haystack!=0) { if(
needle
[0]==*haystack) while(*
needle
!=0) { if(
needle
[i] ==0) return position; if(
needle
[i] !=haystack[i]) break; } haystack…
Pointers
Programming
Software Development
11 Years Ago
by DaMaskMan2
. What wrong with the following code segment? int* =
needle
;
needle
= new int; *
needle
100; cout << *
needle
;
needle
= new int; *
needle
= 32; cout << *
needle
;
Re: Pointers
Programming
Software Development
11 Years Ago
by phfilly
int* =
needle
doesn't make sense and *
needle
100 have you even tried running it in a compiler?
problem with php code line
Programming
Web Development
12 Years Ago
by premier213
…hrs.':'.$mins.':'.$secs; } /** * Looks for the first occurence of $
needle
in $haystack and replaces it with $replace. * * @access public … false) { return $haystack; } return substr_replace($haystack, $replace, $pos, strlen($
needle
)); } /** * get full text format of given string * * @access public…
Mobile Compasspro
Programming
Mobile Development
11 Years Ago
by millroy
… class bkcanvas extends Canvas implements LocationListener { Image compass; Image
needle
; Image bk; Image gps; Image nogps; boolean gpsb; double… gpss(g); } public void rotation(Graphics g){ g.drawImage(
needle
, 0, 20,0); } public void gpss(Graphics g){ if…
drop down menu crash when quckly move on and out
Programming
Web Development
10 Years Ago
by azegurb
….offsetParent; } return totaloffset; }, css:function(el, targetclass, action){ var
needle
=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "…;ig") if (action=="check") return
needle
.test(el.className) else if (action=="remove") el…
C-Style Input/Output
Programming
Software Development
16 Years Ago
by balla4eva33
… do so: [B]char *strstr(const char *haystack, const char *
needle
);[/B] I want this to return NULL if the…
needle
string is not found in the haystack string and otherwise …return the pointer to where the
needle
is returned. I was hoping someone could help me find…
On demand JS ? how to implement?
Programming
Web Development
15 Years Ago
by Inny
…doc.body; } /* function getElementsByClassName(
needle
) { var xpathResult = document.evaluate('//*[@class =
needle
]', document, null, 0, null);…+ " "; if (c.indexOf(" " +
needle
+ " ") != -1) return NodeFilter.FILTER_ACCEPT; } return…
[SPLIT] String function not working
Programming
Software Development
13 Years Ago
by somshridhar
… in this haystack with needles."); string str2 ("
needle
"); size_t found; // different member versions of find …); if (found!=string::npos) cout << "first '
needle
' found at: " << int(found) <<…; endl; // let's replace the first
needle
: st.replace(st.find(str2),str2.length(),"preposition"…
Re: [SPLIT] String function not working
Programming
Software Development
13 Years Ago
by somshridhar
… in this haystack with needles."); string str2 ("
needle
"); size_t found; // different member versions of find …); if (found!=string::npos) cout << "first '
needle
' found at: " << int(found) <<…; endl; // let's replace the first
needle
: st.replace(st.find(str2),str2.length(),"preposition"…
find error
Programming
Web Development
10 Years Ago
by Shikha_1
… a way to find all the indices of a given $
needle
in $haystack. There is at least one bug in the… and fix the bug(s). <?php function findAllIndices($haystack, $
needle
) { $indices = array(); while ($index = strpos($haystack…
count of substrings. append method
Programming
Software Development
9 Years Ago
by kouty
… """ # On introduit les deux variables de chaine
needle
= input("segment = ") haystack = input("chaine = ") # On… nomme leurs longueurs respectives. l = len(
needle
) h = len(haystack) # On transformes les variables en listes. nou…
1
2
3
7
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC