Found 45635 results in 9487 files, showing top 150 files (show more).
github.com/apache/activemq-artemis:artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/KMPNeedle.java: [ master, ]
30:    private final byte[] needle;
27: final class KMPNeedle {
32:    private KMPNeedle(byte[] needle) {
24: ...(43 bytes skipped)...ttps://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm">Knuth-Morris-Pratt</a>'s needle to be used
33:       Objects.requireNonNull(needle);
34:       this.needle = needle;
35:       this.jumpTable = createJumpTable(needle);
38:    private static int[] createJumpTable(byte[] needle) {
39:       final int[] jumpTable = new int[needle.length + 1];
41:       for (int i = 1; i < needle.length; i++) {
42:          while (j > 0 && needle[j] != needle[i]) {
45:          if (needle[j] == needle[i]) {
63:     * the remaining haystack to be processed is < of the remaining needle to be matched.
71:       final int needleLength = needle.length;
80:          while (j > 0 && needle[j] != value) {
84:          if (needle[j] == value) {
97:    public static KMPNeedle of(byte[] needle) {
98:       return new KMPNeedle(needle);
72:       int remainingNeedle = needleLength;
75:          if (remainingNeedle > remainingHayStack) {
82:             remainingNeedle = needleLength - j;
86:             remainingNeedle--;
87:             assert remainingNeedle >= 0;
89:          if (j == needleLength) {
90:             final int startMatch = index - needleLength + 1;
github.com/kubernetes/minikube:site/package-lock.json: [ master, ]
1127:             "needle": "^2.2.1",
1108:         "needle": {
github.com/kubernetes/minikube:site/themes/docsy/userguide/package-lock.json: [ master, ]
1098:             "needle": "^2.2.1",
1079:         "needle": {
github.com/angular/material-start:package-lock.json: [ master, ]
1624:             "needle": "^2.2.1",
1605:         "needle": {
github.com/apache/beam:website/www/site/themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-planes/combined.js: [ master, ]
5051:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
5102:     'needle', 'halo', 'noodles', 'neutron', 'nose'
13797:     'intro-finale/items-needle-thread',
13798:     'intro-finale/items-needle',
15100:   'intro-finale/items-needle-thread': { width: 68, height: 65, x: 834, y: 0 },
15101:   'intro-finale/items-needle': { top: 8, width: 59, height: 51, x: 904, y: 0 },
github.com/google/skia:modules/canvaskit/package-lock.json: [ master, ]
1560:             "needle": "^2.2.1",
1541:         "needle": {
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-embedded/combined.js: [ master, ]
5024:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
5075:     'needle', 'halo', 'noodles', 'neutron', 'nose'
13843:             nItems = ['needle', 'noodles'];
15362:     'intro-finale/items-needle-thread',
15363:     'intro-finale/items-needle',
16665:   'intro-finale/items-needle-thread': { width: 68, height: 65, x: 834, y: 0 },
16666:   'intro-finale/items-needle': { top: 8, width: 59, height: 51, x: 904, y: 0 },
github.com/kubernetes/website:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result
github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
727:   const DeclRefExpr *Needle;
723: /// a particular declaration (the needle) within any evaluated component of an
732:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
733:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
744:     if (E == Needle)
skia.googlesource.com/skia:modules/canvaskit/package-lock.json: [ master, ] Duplicate result
chromium.googlesource.com/skia:modules/canvaskit/package-lock.json: [ master, ] Duplicate result
github.com/apache/trafficcontrol:traffic_portal/app/src/package-lock.json: [ master, ]
1251:                         "needle": "^2.2.1",
1234:                 "needle": {
skia.googlesource.com/buildbot:autoroll/package-lock.json: [ master, ]
1468:             "needle": "^2.2.1",
1449:         "needle": {
skia.googlesource.com/buildbot:task_scheduler/package-lock.json: [ master, ]
1376:             "needle": "^2.2.1",
1357:         "needle": {
android.googlesource.com/platform/external/clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
591:   const DeclRefExpr *Needle;
587: /// a particular declaration (the needle) within any evaluated component of an
596:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
597:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
608:     if (E == Needle)
chromium.googlesource.com/native_client/pnacl-clang:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
579:   const DeclRefExpr *Needle;
575: /// a particular declaration (the needle) within any evaluated component of an
582:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
584:       FoundReference(false), Needle(Needle) {}
595:     if (E == Needle)
android.googlesource.com/platform/external/clang_35a:lib/Sema/AnalysisBasedWarnings.cpp: [ master, ]
577:   const DeclRefExpr *Needle;
573: /// a particular declaration (the needle) within any evaluated component of an
580:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
582:       FoundReference(false), Needle(Needle) {}
593:     if (E == Needle)
github.com/bazelbuild/rules_nodejs:tools/fine_grained_deps_npm/package-lock.json: [ master, ]
768:             "needle": "^2.2.0",
751:         "needle": {
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-planes/lem-const.js: [ master, ]
172:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
223:     'needle', 'halo', 'noodles', 'neutron', 'nose'
github.com/google/skia-buildbot:autoroll/package-lock.json: [ master, ] Duplicate result
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-embedded/lem-const.js: [ master, ]
172:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
223:     'needle', 'halo', 'noodles', 'neutron', 'nose'
github.com/google/skia-buildbot:task_scheduler/package-lock.json: [ master, ] Duplicate result
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-standalone/lem-const.js: [ master, ]
185:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
236:     'needle', 'halo', 'noodles', 'neutron', 'nose'
github.com/google/kf:docs/kf.dev/themes/docsy/userguide/package-lock.json: [ master, ]
1098:             "needle": "^2.2.1",
1079:         "needle": {
chromium.googlesource.com/git/chromium:sync/syncable/directory.h: [ trunk, ]
536:     EntryKernel needle;
535:     // look something up in an index.  Needle in haystack metaphor.
chromium.googlesource.com/chromium:sync/syncable/directory.h: [ trunk, ] Duplicate result
github.com/apache/hawq:src/backend/optimizer/util/clauses.c: [ master, ]
4526: 	Expr *needle;	/* This is the expression being searched */
4530:  * expression_matching_walker checks if the expression 'needle' in context is a sub-expression of hayStack.
4536: 	Assert(ctx->needle);
4543: 	if (equal(ctx->needle, hayStack))
4558: 	ctx.needle = expr1;
github.com/html5rocks/www.html5rocks.com:content/tutorials/doodles/lem/static/code/lem-const.js: [ master, ] Duplicate result
github.com/google/llvm-propeller:clang/lib/Sema/AnalysisBasedWarnings.cpp: [ plo-dev, ] Duplicate result
github.com/google/rekall:rekall-core/rekall/scan.py: [ master, ]
170:     needle = None
171:     needle_offset = None
540:     needles = []
59:         """Is the needle found at 'offset'?
63:             checked for the needle.
173:     def __init__(self, needle=None, needle_offset=0, **kwargs):
175:         self.needle = needle
176:         self.needle_offset = needle_offset
180:         buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
181:         if buffer_as.data.startswith(self.needle, buffer_offset):
182:             return self.needle
185:         # Search the rest of the buffer for the needle.
186:         buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
187:         dindex = buffer_as.data.find(self.needle, buffer_offset + 1)
532:             yield ("StringCheck", dict(needle=expected_bytes,
533:                                        needle_offset=rel_offset + array_offset))
553:                 needle=self.needles[0])
96:     def __init__(self, needles=None, **kwargs):
100:           needles: A list of strings we search for.
103:           RuntimeError: No needles provided.
109:         if not needles:
110:             raise RuntimeError("No needles provided to search.")
114:         if max([len(x) for x in needles]) > 50:
118:         # sure all the needles are bytes too.
119:         byte_needles = [utils.SmartStr(x) for x in needles]
120:         tree = acora.AcoraBuilder(*byte_needles)
539:     # Override with the needles to check for.
542:     def __init__(self, needles=None, **kwargs):
544:         if needles is not None:
545:             self.needles = needles
550:         if len(needles) == 1:
557:                 needles=self.needles)
587:         self.needles = []
595:             self.needles.append(tmp.obj_vm.read(0, tmp.obj_size))
597:         # The common string between all the needles.
599:             ("MultiStringFinderCheck", dict(needles=self.needles)),
github.com/GoogleCloudPlatform/appengine-php:php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c: [ master, ]
874: 	mbfl_wchar_device needle;
875: 	int needle_len;
879: 	int needle_pos;
890: 		if (c == (int)pc->needle.buffer[pc->needle_pos]) {
891: 			if (pc->needle_pos == 0) {
894: 			pc->needle_pos++;						/* needle pointer */
895: 			if (pc->needle_pos >= pc->needle_len) {
897: 				pc->needle_pos--;
900: 		} else if (pc->needle_pos != 0) {
902: 			h = (int *)pc->needle.buffer;
907: 				m = (int *)pc->needle.buffer;
908: 				n = pc->needle_pos - 1;
916: 						pc->needle_pos = 0;
921: 					pc->needle_pos--;
982:     mbfl_string *needle,
987: 	mbfl_string _haystack_u8, _needle_u8;
988: 	const mbfl_string *haystack_u8, *needle_u8;
991: 	if (haystack == NULL || haystack->val == NULL || needle == NULL || needle->val == NULL) {
1015: 	if (needle->no_encoding != mbfl_no_encoding_utf8) {
1016: 		mbfl_string_init(&_needle_u8);
1017: 		needle_u8 = mbfl_convert_encoding(needle, &_needle_u8, mbfl_no_encoding_utf8);
1018: 		if (needle_u8 == NULL) {
1023: 		needle_u8 = needle;
1026: 	if (needle_u8->len < 1) {
1032: 	if (haystack_u8->len < needle_u8->len) {
1038: 		unsigned int needle_u8_len = needle_u8->len;
1042: 		                    *needle_u8_val = needle_u8->val;
1044: 			jtbl[i] = needle_u8_len + 1;
1046: 		for (i = 0; i < needle_u8_len - 1; ++i) {
1047: 			jtbl[needle_u8_val[i]] = needle_u8_len - i;
1058: 		p += needle_u8_len;
1064: 			q = needle_u8_val + needle_u8_len;
1066: 				if (q == needle_u8_val) {
1089: 		unsigned int needle_u8_len = needle_u8->len, needle_len = 0;
1093: 		                    *needle_u8_val = needle_u8->val;
1095: 			jtbl[i] = needle_u8_len;
1097: 		for (i = needle_u8_len - 1; i > 0; --i) {
1098: 			unsigned char c = needle_u8_val[i];
1101: 				++needle_len;
1103: 				++needle_len;
1107: 			unsigned char c = needle_u8_val[0];
1109: 				++needle_len;
1111: 				++needle_len;
1116: 		qe = needle_u8_val + needle_u8_len;
1118: 			if (-offset > needle_len) {
1119: 				offset += needle_len; 
1144: 		if (p < e + needle_u8_len) {
1147: 		p -= needle_u8_len;
1150: 			q = needle_u8_val;
1154: 					p -= needle_u8_len;
1180: 	if (needle_u8 == &_needle_u8) {
1181: 		mbfl_string_clear(&_needle_u8);
1193:     mbfl_string *needle
1201: 	if (haystack == NULL || needle == NULL) {
1204: 	/* needle is converted into wchar */
1205: 	mbfl_wchar_device_init(&pc.needle);
1207: 	  needle->no_encoding,
1209: 	  mbfl_wchar_device_output, 0, &pc.needle);
1213: 	p = needle->val;
1214: 	n = needle->len;
1225: 	pc.needle_len = pc.needle.pos;
1226: 	if (pc.needle.buffer == NULL) {
1229: 	if (pc.needle_len <= 0) {
1230: 		mbfl_wchar_device_clear(&pc.needle);
1239: 		mbfl_wchar_device_clear(&pc.needle);
1244: 	pc.needle_pos = 0;
1260: 				pc.needle_pos = 0;
1267: 	mbfl_wchar_device_clear(&pc.needle);
android.googlesource.com/platform/superproject:external/clang/lib/Sema/AnalysisBasedWarnings.cpp: [ master, ] Duplicate result
github.com/google/docsy:userguide/package-lock.json: [ master, ] Duplicate result
github.com/apache/sling-whiteboard:serverless-microsling/package-lock.json: [ master, ]
992:         "needle": "^2.1.0"
901:     "needle": {
903:       "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
github.com/google/cargo-raze:examples/vendored/non_cratesio_library/cargo/vendor/memchr-2.0.1/src/lib.rs: [ master, ]
106:     needle: u8,
261:     needle1: u8,
262:     needle2: u8,
330:     needle1: u8,
331:     needle2: u8,
332:     needle3: u8,
114:     /// Creates a new iterator that yields all positions of needle in haystack.
115:     pub fn new(needle: u8, haystack: &[u8]) -> Memchr {
117:             needle: needle,
128:         iter_next!(self, memchr(self.needle, &self.haystack))
138:         iter_next_back!(self, memrchr(self.needle, &self.haystack))
144: /// Returns the index corresponding to the first occurrence of `needle` in
148: /// magnitude faster than `haystack.iter().position(|&b| b == needle)`.
162: pub fn memchr(needle: u8, haystack: &[u8]) -> Option<usize> {
170:     fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
175:                         needle as c_int,
190:     fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
191:         fallback::memchr(needle, haystack)
198:     fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
199:         haystack.iter().position(|&b| b == needle)
202:     memchr_specific(needle, haystack)
207: /// Returns the index corresponding to the last occurrence of `needle` in
221: pub fn memrchr(needle: u8, haystack: &[u8]) -> Option<usize> {
225:     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
232:                           needle as c_int,
244:     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
245:         fallback::memrchr(needle, haystack)
252:     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
253:         haystack.iter().rposition(|&b| b == needle)
256:     memrchr_specific(needle, haystack)
270:     /// Creates a new iterator that yields all positions of needle in haystack.
271:     pub fn new(needle1: u8, needle2: u8, haystack: &[u8]) -> Memchr2 {
273:             needle1: needle1,
274:             needle2: needle2,
285:         iter_next!(self, memchr2(self.needle1, self.needle2, &self.haystack))
295: pub fn memchr2(needle1: u8, needle2: u8, haystack: &[u8]) -> Option<usize> {
306:         if let Some(found) = slow(needle1, needle2, &haystack[..i]) {
310:     let repeated_b1 = repeat_byte(needle1);
311:     let repeated_b2 = repeat_byte(needle2);
325:     slow(needle1, needle2, &haystack[i..]).map(|pos| i + pos)
342:         needle1: u8,
343:         needle2: u8,
344:         needle3: u8,
348:             needle1: needle1,
349:             needle2: needle2,
350:             needle3: needle3,
363:             memchr3(self.needle1, self.needle2, self.needle3, &self.haystack)
374:     needle1: u8,
375:     needle2: u8,
376:     needle3: u8,
389:         if let Some(found) = slow(needle1, needle2, needle3, &haystack[..i]) {
393:     let repeated_b1 = repeat_byte(needle1);
394:     let repeated_b2 = repeat_byte(needle2);
395:     let repeated_b3 = repeat_byte(needle3);
410:     slow(needle1, needle2, needle3, &haystack[i..]).map(|pos| i + pos)
573:                 fn prop(needle: u8, haystack: Vec<u8>) -> bool {
574:                     $memchr(needle, &haystack); true
616:                 fn prop(needle: u8, haystack: Vec<u8>) -> bool {
617:                     $memrchr(needle, &haystack); true
717:         fn prop(needle1: u8, needle2: u8, haystack: Vec<u8>) -> bool {
718:             memchr2(needle1, needle2, &haystack);
772:     // needle
773:     fn positions1<'a>(needle: u8, haystack: &'a [u8])
778:                          .filter(move |&(_, &elt)| elt == needle)
782:     fn positions2<'a>(needle1: u8, needle2: u8, haystack: &'a [u8])
788:             .filter(move |&(_, &elt)| elt == needle1 || elt == needle2)
793:         needle1: u8,
794:         needle2: u8,
795:         needle3: u8,
802:                 elt == needle1 || elt == needle2 || elt == needle3
887:             needle1: u8,
888:             needle2: u8,
889:             needle3: u8,
892:             memchr3(needle1, needle2, needle3, &haystack);
1002:         fn qc_memchr_double_ended_iter(needle: u8, data: Vec<u8>,
1009:             let iter = Memchr::new(needle, &data);
1013:             all_found.iter().cloned().eq(positions1(needle, &data))
1017:             let needle = 0;
1018:             let answer = positions1(needle, &data);
1019:             answer.eq(Memchr::new(needle, &data))
1023:             let needle = 0;
1024:             let answer = positions1(needle, &data);
1025:             answer.rev().eq(Memchr::new(needle, &data).rev())
1029:             let needle1 = 0;
1030:             let needle2 = 1;
1031:             let answer = positions2(needle1, needle2, &data);
1032:             answer.eq(Memchr2::new(needle1, needle2, &data))
1036:             let needle1 = 0;
1037:             let needle2 = 1;
1038:             let needle3 = 2;
1039:             let answer = positions3(needle1, needle2, needle3, &data);
1040:             answer.eq(Memchr3::new(needle1, needle2, needle3, &data))
1045:             let needle = 0;
1046:             let mut iter = Memchr::new(needle, &data);
1049:                 .filter(|&&elt| elt == needle)
github.com/google/cyanobyte:docs/themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result
github.com/google/streetview-publish-client-libraries:client_libraries/nodejs_library/package-lock.json: [ master, ]
1140:             "needle": "^2.2.1",
1125:         "needle": {
github.com/yeoman/generator-angular:route/index.js: [ master, ]
63:     needle: '.otherwise',
github.com/google/gvisor-website:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result
github.com/apache/openwhisk-client-js:package.json: [ master, ]
53:     "needle": "^2.4.0"
android.googlesource.com/platform/superproject:external/rust/crates/memchr/src/iter.rs: [ master, ]
35:     needle: u8,
73:     needle1: u8,
74:     needle2: u8,
120:     needle1: u8,
121:     needle2: u8,
122:     needle3: u8,
43:     /// Creates a new iterator that yields all positions of needle in haystack.
45:     pub fn new(needle: u8, haystack: &[u8]) -> Memchr {
46:         Memchr { needle: needle, haystack: haystack, position: 0 }
55:         iter_next!(self, memchr(self.needle, self.haystack))
67:         iter_next_back!(self, memrchr(self.needle, self.haystack))
82:     /// Creates a new iterator that yields all positions of needle in haystack.
84:     pub fn new(needle1: u8, needle2: u8, haystack: &[u8]) -> Memchr2 {
86:             needle1: needle1,
87:             needle2: needle2,
99:         iter_next!(self, memchr2(self.needle1, self.needle2, self.haystack))
113:             memrchr2(self.needle1, self.needle2, self.haystack)
133:         needle1: u8,
134:         needle2: u8,
135:         needle3: u8,
139:             needle1: needle1,
140:             needle2: needle2,
141:             needle3: needle3,
155:             memchr3(self.needle1, self.needle2, self.needle3, self.haystack)
170:             memrchr3(self.needle1, self.needle2, self.needle3, self.haystack)
github.com/GoogleCloudPlatform/datashare-toolkit:ingestion/streaming/package-lock.json: [ master, ]
667:             "needle": "^2.2.1",
650:         "needle": {
652:           "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
github.com/grpc/grpc.io:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result
github.com/GNOME/libdazzle:src/search/dzl-fuzzy-index-cursor.c: [ mainline, ]
65:   const gchar                     *needle;
408:   lookup.needle = query;
github.com/google/docsy-example:package-lock.json: [ master, ]
1088:             "needle": "^2.2.1",
1069:         "needle": {
github.com/google/cargo-raze:examples/vendored/complicated_cargo_library/cargo/vendor/memchr-2.2.0/src/iter.rs: [ master, ]
35:     needle: u8,
77:     needle1: u8,
78:     needle2: u8,
124:     needle1: u8,
125:     needle2: u8,
126:     needle3: u8,
43:     /// Creates a new iterator that yields all positions of needle in haystack.
45:     pub fn new(needle: u8, haystack: &[u8]) -> Memchr {
47:             needle: needle,
59:         iter_next!(self, memchr(self.needle, self.haystack))
71:         iter_next_back!(self, memrchr(self.needle, self.haystack))
86:     /// Creates a new iterator that yields all positions of needle in haystack.
88:     pub fn new(needle1: u8, needle2: u8, haystack: &[u8]) -> Memchr2 {
90:             needle1: needle1,
91:             needle2: needle2,
103:         iter_next!(self, memchr2(self.needle1, self.needle2, self.haystack))
117:             memrchr2(self.needle1, self.needle2, self.haystack)
137:         needle1: u8,
138:         needle2: u8,
139:         needle3: u8,
143:             needle1: needle1,
144:             needle2: needle2,
145:             needle3: needle3,
159:             memchr3(self.needle1, self.needle2, self.needle3, self.haystack)
174:             memrchr3(self.needle1, self.needle2, self.needle3, self.haystack)
github.com/google/docsy-example:themes/docsy/userguide/package-lock.json: [ master, ] Duplicate result
github.com/googlesamples/functions-as-a-service:package-lock.json: [ master, ]
1274:             "needle": "^2.2.1",
1255:         "needle": {
android.googlesource.com/platform/external/libwebsockets:include/libwebsockets/lws-fts.h: [ master, ]
168: 	const char *needle;
github.com/GNOME/gnome-notes:src/bjb-controller.c: [ mainline, ]
47:   gchar          *needle;
68:   PROP_NEEDLE,
526: bjb_controller_apply_needle (BjbController *self)
777: bjb_controller_set_needle (BjbController *self, const gchar *needle )
787: bjb_controller_get_needle (BjbController *self)
556: on_needle_changed (BjbController *self)
45:   /* needle, notebook and group define what the controller shows */
122:   g_free (self->needle);
147:   case PROP_NEEDLE:
148:     g_value_set_string (value, self->needle);
175:   case PROP_NEEDLE:
176:     self->needle = g_strdup (g_value_get_string (value));
193:   const gchar *needle = NULL;
196:       needle = biji_item_get_uuid (item);
209:     if (needle && g_strcmp0 (item_path, needle) == 0)
213:     else if (!needle && BIJI_IS_NOTE_OBJ (
308:   if (!self->needle || g_strcmp0 (self->needle, "") == 0)
323:     if (g_strrstr (title, self->needle) != NULL)
330:       if (g_strrstr (content, self->needle) != NULL)
529:   gchar *needle;
531:   needle = self->needle;
536:   if (needle == NULL || g_strcmp0 (needle,"") == 0)
552:   biji_get_items_matching_async (self->manager, self->group, needle, update_controller_callback, self);
558:   bjb_controller_apply_needle (self);
598:       bjb_controller_apply_needle (self);
648:     /* Apply the needle to display the relevant items.
656:       bjb_controller_apply_needle (self);
738:   properties[PROP_NEEDLE] = g_param_spec_string ("needle",
739:                                                  "Needle",
761:                     gchar         *needle)
766:               "needle", needle,
779:   if (self->needle)
780:     g_free (self->needle);
782:   self->needle = g_strdup (needle);
783:   on_needle_changed (self);
789:   if (!self->needle)
792:   return self->needle;
827:     bjb_controller_apply_needle (self);
834:   g_clear_pointer (&self->needle, g_free);
836:   self->needle = g_strdup ("");
871:       bjb_controller_apply_needle (self);
877:     bjb_controller_apply_needle (self);
894:     on_needle_changed (self);
android.googlesource.com/platform/external/qt:Windows-4.7.4/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp: [ master, ]
129:     const QString needle;
128:     inline KeywordHelper(const QString &word) : needle(word) {}
134:     return helper.needle < QLatin1String(kw);
139:     return QLatin1String(kw) < helper.needle;
github.com/tensorflow/tfjs-examples:lstm-text-generation/data.js: [ master, ]
26:     needle: 'Nietzsche'
31:     needle: 'Jules Verne'
36:     needle: 'Shakespeare'
40:     needle: 'TensorFlow.js Code (Compiled, 0.11.7)'
github.com/GoogleChrome/chrome-app-samples:samples/text-editor/lib/ace/search.js: [ master, ]
49:         needle: "",
74:         if (!this.$options.needle)
94:         if (!options.needle)
204:             var needle = this.$options.needle;
206:             needle = lang.escapeRegExp(this.$options.needle);
210:             needle = "\\b" + needle + "\\b";
218:         var re = new RegExp(needle, modifier);
github.com/GoogleChrome/chrome-app-samples:samples/text-editor/lib/ace/mode/text.js: [ master, ]
135:             needle: needle
117:         var needle = line.substring(Math.max(startOuter, 0),
121:         if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
122:             (endOuter <= lineCols && /[\w\d]$/.test(needle)))
125:         needle = line.substring(selection.start.column, selection.end.column);
126:         if (!/^[\w\d]+$/.test(needle))
android.googlesource.com/platform/superproject:external/libwebsockets/include/libwebsockets/lws-fts.h: [ master, ] Duplicate result
github.com/apache/openwhisk-catalog:packages/github/webhook.js: [ master, ]
18: const needle = require('needle');
72:       needle.post(registrationEndpoint, body, { 'json': true, username: username, password: accessToken, user_ag...(50 bytes skipped)...
99:       needle.get(registrationEndpoint, { 'json': true, username: username, password: accessToken, user_agent: 'w...(43 bytes skipped)...
116:               needle.delete(body[i].url, null, { username: username, password: accessToken, user_agent: 'whisk' }, funct...(29 bytes skipped)...
github.com/chromium/chromium:third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ]
30:   const char* needle;
76:       const char* needle_string = nullptr;
79:         auto needlepos = after_replacing_many->find(r.needle, pos);
82:           needle_string = r.needle;
87:       after_replacing_many->replace(next_pos, strlen(needle_string),
80:         if (needlepos != std::string::npos && needlepos < next_pos) {
81:           next_pos = needlepos;
github.com/GNOME/libdazzle:src/search/dzl-fuzzy-mutable-index.c: [ mainline, ]
79:    const gchar  *needle;
432:  * @needle: (in): The needle to fuzzy search for.
435:  * DzlFuzzyMutableIndex searches within @fuzzy for strings that fuzzy match @needle.
448:                                const gchar          *needle,
465:   g_return_val_if_fail (needle, NULL);
469:   if (!*needle)
474:       downcase = g_utf8_casefold (needle, -1);
475:       needle = downcase;
479:   lookup.n_tables = g_utf8_strlen (needle, -1);
482:   lookup.needle = needle;
486:   for (i = 0, tmp = needle; *tmp; tmp = g_utf8_next_char (tmp))
github.com/apache/openwhisk-package-alarms:action/lib/common.js: [ master, ]
18: const needle = require('needle');
30:         // needle takes e.g. 'put' not 'PUT'
31:         needle.request(method.toLowerCase(), url, input, options, function(error, response, body) {
android.googlesource.com/platform/external/qt:Mac-4.7.4/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp: [ master, ]
129:     const QString needle;
128:     inline KeywordHelper(const QString &word) : needle(word) {}
134:     return helper.needle < QLatin1String(kw);
139:     return QLatin1String(kw) < helper.needle;
github.com/googlecreativelab/pattern-radio:kubernetes/tools/classifier_clustering/package-lock.json: [ master, ]
1590:             "needle": "^2.2.1",
1573:         "needle": {
github.com/apache/openwhisk-client-js:lib/client.js: [ master, ]
22: const needle = require('needle')
27:  * This implements a request-promise-like facade over the needle
28:  * library. There are two gaps between needle and rp that need to be
30:  * needle's non-excepting >=400 statusCode responses into exceptions
50:   // this situation than needle
53:   return needle(opts.method.toLowerCase(), // needle takes e.g. 'put' not 'PUT'
chromium.googlesource.com/chromium/src:third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result
github.com/apache/openwhisk-catalog:packages/slack/post.js: [ master, ]
18: const needle = require('needle');
79:         needle.post(params.url, body, function (err, res, body) {
github.com/GoogleCloudPlatform/pubsub:load-test-framework/node_src/package-lock.json: [ master, ]
583:             "needle": "^2.2.1",
568:         "needle": {
android.googlesource.com/platform/external/abseil-cpp:absl/strings/str_replace_benchmark.cc: [ master, ]
30:   const char* needle;
76:       const char* needle_string = nullptr;
79:         auto needlepos = after_replacing_many->find(r.needle, pos);
82:           needle_string = r.needle;
87:       after_replacing_many->replace(next_pos, strlen(needle_string),
80:         if (needlepos != std::string::npos && needlepos < next_pos) {
81:           next_pos = needlepos;
github.com/GNOME/gnome-notes:src/bjb-search-toolbar.c: [ mainline, ]
53:   gchar             *needle;
124:   bjb_controller_set_needle (BJB_CONTROLLER (self->controller),
161:   /* Get the needle from controller */
162:   self->needle = bjb_controller_get_needle (self->controller);
164:   if (self->needle && g_strcmp0 (self->needle, "") != 0)
166:     gtk_entry_set_text (GTK_ENTRY (self->entry), self->needle);
github.com/apache/marmotta:libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/collect/SQLProjectionFinder.java: [ master, ]
39:     private String needle;
43:     public SQLProjectionFinder(TupleExpr expr, String needle) {
44:         this.needle = needle;
50:         if(node.getName().equals(needle)) {
59:             if(g.equals(needle)) {
68:         if(node.getName().equals(needle)) {
77:             if(elem.getSourceName().equals(needle)) {
chromium.googlesource.com/chromium/src/third_party:abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result
github.com/googlecreativelab/aog-canvas-quiz:deploy/package-lock.json: [ master, ]
551:             "needle": "^2.2.1",
536:         "needle": {
github.com/apache/openwhisk-catalog:packages/weather/forecast.js: [ master, ]
18: const needle = require('needle');
64:         needle.request('get', url, qs, { 'username': username, 'password': password, timeout: 30000 }, function (e...(23 bytes skipped)...
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ]
30:   const char* needle;
76:       const char* needle_string = nullptr;
79:         auto needlepos = after_replacing_many->find(r.needle, pos);
82:           needle_string = r.needle;
87:       after_replacing_many->replace(next_pos, strlen(needle_string),
80:         if (needlepos != std::string::npos && needlepos < next_pos) {
81:           next_pos = needlepos;
github.com/PolymerLabs/actor-helpers:package-lock.json: [ master, ]
1359:             "needle": "^2.2.0",
1340:         "needle": {
github.com/PolymerLabs/actor-boilerplate:package-lock.json: [ master, ]
868:             "needle": "^2.2.0",
851:         "needle": {
github.com/google/sqlcommenter:nodejs/sqlcommenter-nodejs/packages/sqlcommenter-sequelize/package-lock.json: [ master, ]
1199:             "needle": "^2.2.1",
1167:         "needle": {
github.com/v8/v8:test/unittests/heap/cppgc/stack-unittest.cc: [ master, ]
67:   int* needle() const { return container_->value.get(); }
79:   // No check that the needle is initially not found as on some platforms it
82:     int* volatile tmp = scanner->needle();
92:   // No check that the needle is initially not found as on some platforms it
97:     int* volatile tmp = scanner->needle();
199:   void* needle = RecursivelyPassOnParameter(0, scanner->needle(), GetStack(),
201:   EXPECT_EQ(scanner->needle(), needle);
207:   void* needle = RecursivelyPassOnParameter(1, scanner->needle(), GetStack(),
209:   EXPECT_EQ(scanner->needle(), needle);
215:   void* needle = RecursivelyPassOnParameter(2, scanner->needle(), GetStack(),
217:   EXPECT_EQ(scanner->needle(), needle);
223:   void* needle = RecursivelyPassOnParameter(3, scanner->needle(), GetStack(),
225:   EXPECT_EQ(scanner->needle(), needle);
231:   void* needle = RecursivelyPassOnParameter(4, scanner->needle(), GetStack(),
233:   EXPECT_EQ(scanner->needle(), needle);
239:   void* needle = RecursivelyPassOnParameter(5, scanner->needle(), GetStack(),
241:   EXPECT_EQ(scanner->needle(), needle);
247:   void* needle = RecursivelyPassOnParameter(6, scanner->needle(), GetStack(),
249:   EXPECT_EQ(scanner->needle(), needle);
255:   void* needle = RecursivelyPassOnParameter(7, scanner->needle(), GetStack(),
257:   EXPECT_EQ(scanner->needle(), needle);
263:   void* needle = RecursivelyPassOnParameter(8, scanner->needle(), GetStack(),
265:   EXPECT_EQ(scanner->needle(), needle);
306:   // No check that the needle is initially not found as on some platforms it
319: // Moves |local_scanner->needle()| into a callee-saved register, leaving the
320: // callee-saved register as the only register referencing the needle.
325:   asm("mov %0, %%" reg : : "r"(local_scanner->needle()) : reg);          \
gerrit.googlesource.com/jgit:org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java: [ master, ]
26: 	private final byte[] needle;
24: 	private final String needleString;
42: 		needle = new byte[b.length];
44: 			needle[i] = lc(b[i]);
58: 		final int needleLen = needle.length;
59: 		final byte first = needle[0];
76: 				if (neq(needle[j], text[si]))
39: 		needleString = patternText;
63: 		final int maxPos = rcs.endPtr - needleLen;
75: 			for (int j = 1; j < needleLen; j++, si++) {
98: 		return needleString;
eclipse.googlesource.com/jgit/jgit:org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java: [ master, ] Duplicate result
gerrit.googlesource.com/gerrit:modules/jgit/org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java: [ master, ] Duplicate result
chromium.googlesource.com/v8/v8:test/unittests/heap/cppgc/stack-unittest.cc: [ master, ] Duplicate result
android.googlesource.com/platform/external/jetbrains/JetBrainsRuntime:test/hotspot/jtreg/compiler/intrinsics/string/TestStringIntrinsics2.java: [ master, ]
161:     static String needle = "<miss>";
184:     static int indexOf_no_match_unknown_needle(String s, String needle) {
190:     static int indexOf_no_match_imm_needle(String s) {
196:     static int indexOf_no_match_imm2_needle(String s) {
202:     static int indexOf_no_match_imm1_needle(String s) {
221:     static String indexOf_reads_past_string_unknown_needle(String s, String needle) {
231:     static String indexOf_reads_past_string_imm_needle(String s) {
240:     static String indexOf_reads_past_string_imm2_needle(String s) {
249:     static String indexOf_reads_past_string_imm1_needle(String s) {
313:     static int indexOf_match_at_end_of_string_unknown_needle(String s, String needle) {
319:     static int indexOf_match_at_end_of_string_imm_needle(String s) {
325:     static int indexOf_match_at_end_of_string_imm2_needle(String s) {
331:     static int indexOf_match_at_end_of_string_imm1_needle(String s) {
438:     static String indexOf_match_spans_end_of_string_unknown_needle(String s, String needle) {
447:     static String indexOf_match_spans_end_of_string_imm_needle(String s) {
456:     static String indexOf_match_spans_end_of_string_imm2_needle(String s) {
481:     public static void test_indexOf_imm1_needle() {
498:     static int indexOf_imm1_needle(String s) {
512:     static int indexOf_imm1Latin1_needle(String s) {
517:     static int indexOf_imm1UTF16_needle(String s) {
522:     static int indexOf_immUTF16_needle(String s) {
71:     // - The needle is exactly at the end of the string.
72:     // - The needle spans the end of the string
75:     // - needle is first char
76:     // - needle is last char
80:     // We test all these for an unknown needle, and needles known to the compiler
165:         int res = indexOf_no_match_unknown_needle(ss[0], "<miss>");
166:         assertEquals(res, -1, "test_indexOf_no_match_unknown_needle matched at: " + res);
167:         res = indexOf_no_match_imm_needle(ss[0]);
168:         assertEquals(res, -1, "test_indexOf_no_match_imm_needle matched at: " + res);
169:         res = indexOf_no_match_imm2_needle(ss[0]);
170:         assertEquals(res, -1, "test_indexOf_no_match_imm2_needle matched at: " + res);
173:         res = indexOf_no_match_unknown_needle(ss2[0], "<miss>");
174:         assertEquals(res, -1, "test_indexOf_no_match_unknown_needle matched at: " + res);
175:         res = indexOf_no_match_imm_needle(ss2[0]);
176:         assertEquals(res, -1, "test_indexOf_no_match_imm_needle matched at: " + res);
177:         res = indexOf_no_match_imm2_needle(ss2[0]);
178:         assertEquals(res, -1, "test_indexOf_no_match_imm2_needle matched at: " + res);
179:         res = indexOf_no_match_imm1_needle(ss2[0]);
180:         assertEquals(res, -1, "test_indexOf_no_match_imm1_needle matched at: " + res);
185:         int index = s.indexOf(needle);
210:         String res = indexOf_reads_past_string_unknown_needle(ss[0], "<hit>");
211:         assertEquals(res, null, "test_indexOf_reads_past_string_unknown_needle " + res);
212:         res = indexOf_reads_past_string_imm_needle(ss[0]);
213:         assertEquals(res, null, "test_indexOf_reads_past_string_imm_needle " + res);
214:         res = indexOf_reads_past_string_imm2_needle(ss[0]);
215:         assertEquals(res, null, "test_indexOf_reads_past_string_imm2_needle " + res);
216:         res = indexOf_reads_past_string_imm1_needle(ss[0]);
217:         assertEquals(res, null, "test_indexOf_reads_past_string_imm1_needle " + res);
222:         int index = s.indexOf(needle);
224:             return "Found needle \"" + needle + "\" behind string of length " + s.length()
234:             return "Found needle \"<hit>\" behind string of length " + s.length() + " at position " + index + ".";
243:             return "Found needle \"<h\" behind string of length " + s.length() + " at position " + index + ".";
252:             return "Found needle \"<h\" behind string of length " + s.length() + " at position " + index + ".";
275:         res = indexOf_match_at_end_of_string_unknown_needle(text3, "<hit>");
277:         res = indexOf_match_at_end_of_string_unknown_needle(text4, "<hit>");
279:         res = indexOf_match_at_end_of_string_unknown_needle(text5, "<hit>");
281:         res = indexOf_match_at_end_of_string_unknown_needle(text6, "<hit>");
284:         res = indexOf_match_at_end_of_string_imm_needle(text3);
286:         res = indexOf_match_at_end_of_string_imm_needle(text4);
288:         res = indexOf_match_at_end_of_string_imm_needle(text5);
290:         res = indexOf_match_at_end_of_string_imm_needle(text6);
293:         res = indexOf_match_at_end_of_string_imm2_needle(text7);
295:         res = indexOf_match_at_end_of_string_imm2_needle(text8);
297:         res = indexOf_match_at_end_of_string_imm2_needle(text9);
299:         res = indexOf_match_at_end_of_string_imm2_needle(text10);
302:         res = indexOf_match_at_end_of_string_imm1_needle(text7);
304:         res = indexOf_match_at_end_of_string_imm1_needle(text8);
306:         res = indexOf_match_at_end_of_string_imm1_needle(text9);
308:         res = indexOf_match_at_end_of_string_imm1_needle(text10);
314:         int index = s.indexOf(needle);
361:         res = indexOf_match_spans_end_of_string_unknown_needle(s0_1, "<hit>");
362:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_1 " + res);
363:         res = indexOf_match_spans_end_of_string_unknown_needle(s0_2, "<hit>");
364:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_2 " + res);
365:         res = indexOf_match_spans_end_of_string_unknown_needle(s0_3, "<hit>");
366:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_3 " + res);
367:         res = indexOf_match_spans_end_of_string_unknown_needle(s0_4, "<hit>");
368:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s0_4 " + res);
369:         res = indexOf_match_spans_end_of_string_unknown_needle(s1_1, "<hit>");
370:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_1 " + res);
371:         res = indexOf_match_spans_end_of_string_unknown_needle(s1_2, "<hit>");
372:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_2 " + res);
373:         res = indexOf_match_spans_end_of_string_unknown_needle(s1_3, "<hit>");
374:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_3 " + res);
375:         res = indexOf_match_spans_end_of_string_unknown_needle(s1_4, "<hit>");
376:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s1_4 " + res);
377:         res = indexOf_match_spans_end_of_string_unknown_needle(s2_1, "<hit>");
378:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_1 " + res);
379:         res = indexOf_match_spans_end_of_string_unknown_needle(s2_2, "<hit>");
380:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_2 " + res);
381:         res = indexOf_match_spans_end_of_string_unknown_needle(s2_3, "<hit>");
382:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_3 " + res);
383:         res = indexOf_match_spans_end_of_string_unknown_needle(s2_4, "<hit>");
384:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s2_4 " + res);
385:         res = indexOf_match_spans_end_of_string_unknown_needle(s3_1, "<hit>");
386:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_1 " + res);
387:         res = indexOf_match_spans_end_of_string_unknown_needle(s3_2, "<hit>");
388:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_2 " + res);
389:         res = indexOf_match_spans_end_of_string_unknown_needle(s3_3, "<hit>");
390:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_3 " + res);
391:         res = indexOf_match_spans_end_of_string_unknown_needle(s3_4, "<hit>");
392:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_unknown_needle s3_4 " + res);
394:         res = indexOf_match_spans_end_of_string_imm_needle(s0_1);
395:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_1 " + res);
396:         res = indexOf_match_spans_end_of_string_imm_needle(s0_2);
397:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_2 " + res);
398:         res = indexOf_match_spans_end_of_string_imm_needle(s0_3);
399:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_3 " + res);
400:         res = indexOf_match_spans_end_of_string_imm_needle(s0_4);
401:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s0_4 " + res);
402:         res = indexOf_match_spans_end_of_string_imm_needle(s1_1);
403:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_1 " + res);
404:         res = indexOf_match_spans_end_of_string_imm_needle(s1_2);
405:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_2 " + res);
406:         res = indexOf_match_spans_end_of_string_imm_needle(s1_3);
407:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_3 " + res);
408:         res = indexOf_match_spans_end_of_string_imm_needle(s1_4);
409:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s1_4 " + res);
410:         res = indexOf_match_spans_end_of_string_imm_needle(s2_1);
411:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_1 " + res);
412:         res = indexOf_match_spans_end_of_string_imm_needle(s2_2);
413:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_2 " + res);
414:         res = indexOf_match_spans_end_of_string_imm_needle(s2_3);
415:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_3 " + res);
416:         res = indexOf_match_spans_end_of_string_imm_needle(s2_4);
417:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s2_4 " + res);
418:         res = indexOf_match_spans_end_of_string_imm_needle(s3_1);
419:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_1 " + res);
420:         res = indexOf_match_spans_end_of_string_imm_needle(s3_2);
421:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_2 " + res);
422:         res = indexOf_match_spans_end_of_string_imm_needle(s3_3);
423:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_3 " + res);
424:         res = indexOf_match_spans_end_of_string_imm_needle(s3_4);
425:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm_needle s3_4 " + res);
427:         res = indexOf_match_spans_end_of_string_imm2_needle(s0_1x);
428:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s0_1x " + res);
429:         res = indexOf_match_spans_end_of_string_imm2_needle(s1_1x);
430:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s1_1x " + res);
431:         res = indexOf_match_spans_end_of_string_imm2_needle(s2_1x);
432:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s2_1x " + res);
433:         res = indexOf_match_spans_end_of_string_imm2_needle(s3_1x);
434:         assertEquals(res, null, "test_indexOf_match_spans_end_of_string_imm2_needle s3_1x " + res);
439:         int index = s.indexOf(needle);
441:             return "Found needle \"" + needle + "\" that is spanning the end of the string: " + s + ".";
450:             return "Found needle \"<hit>\" that is spanning the end of the string: " + s + ".";
459:             return "Found needle \"<h\" that is spanning the end of the string: " + s + ".";
482:         assertEquals(     -1, indexOf_imm1_needle(text16), "test_indexOf_imm1_needle no_match");
484:         assertEquals(      0, indexOf_imm1_needle(text11), "test_indexOf_imm1_needle first_matches");
486:         assertEquals(len12-1, indexOf_imm1_needle(text12), "test_indexOf_imm1_needle last_matches");
487:         assertEquals(len13-1, indexOf_imm1_needle(text13), "test_indexOf_imm1_needle last_matches");
488:         assertEquals(len14-1, indexOf_imm1_needle(text14), "test_indexOf_imm1_needle last_matches");
489:         assertEquals(len15-1, indexOf_imm1_needle(text15), "test_indexOf_imm1_needle last_matches");
491:         assertEquals(     -1, indexOf_imm1_needle(text12_1), "test_indexOf_imm1_needle walked_past");
492:         assertEquals(     -1, indexOf_imm1_needle(text13_1), "test_indexOf_imm1_needle walked_past");
493:         assertEquals(     -1, indexOf_imm1_needle(text14_1), "test_indexOf_imm1_needle walked_past");
494:         assertEquals(     -1, indexOf_imm1_needle(text15_1), "test_indexOf_imm1_needle walked_past");
506:         assertEquals(      3, indexOf_imm1Latin1_needle(text1UTF16), "test_indexOf_immUTF16");
507:         assertEquals(      1, indexOf_imm1UTF16_needle(text1UTF16), "test_indexOf_immUTF16");
508:         assertEquals(      1, indexOf_immUTF16_needle(text1UTF16), "test_indexOf_immUTF16");
74:     // A special case are needles of length 1. For these we test:
github.com/firebase/firestore-codelab-extended-swift:Pods/FirebaseFirestore/Firestore/third_party/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result
github.com/GNOME/libdazzle:src/search/dzl-pattern-spec.c: [ mainline, ]
48:   gchar          *needle;
59:             const gchar *needle)
62:   g_autofree gchar *needle_folded = g_utf8_casefold (needle, -1);
66:   pos = strstr (haystack_folded, needle_folded);
85: dzl_pattern_spec_new (const gchar *needle)
90:   if (needle == NULL)
91:     needle = "";
95:   self->needle = g_strdup (needle);
96:   self->parts = g_strsplit (needle, " ", 0);
99:   for (tmp = needle; *tmp; tmp = g_utf8_next_char (tmp))
116:   return self->needle;
123:   g_clear_pointer (&self->needle, g_free);
chromium.googlesource.com/native_client/nacl-toolchain:newlib/newlib/libc/string/memmem.c: [ master, ]
58:   const unsigned char *needle = (const unsigned char *) needle_start;
24: 	lengths of your haystack and needle, <<memmem>> can be much
49: _DEFUN (memmem, (haystack_start, haystack_len, needle_start, needle_len),
52: 	const void *needle_start _AND
53: 	size_t needle_len)
60:   if (needle_len == 0)
68:   while (needle_len <= haystack_len)
70:       if (!memcmp (haystack, needle, needle_len))
83:   if (haystack_len < needle_len)
90:   if (needle_len < LONG_NEEDLE_THRESHOLD)
92:       haystack = memchr (haystack, *needle, haystack_len);
93:       if (!haystack || needle_len == 1)
96:       if (haystack_len < needle_len)
98:       return two_way_short_needle (haystack, haystack_len, needle, needle_len);
100:   return two_way_long_needle (haystack, haystack_len, needle, needle_len);
88:      coefficient.  However, avoid memchr for long needles, since we
chromium.googlesource.com/arc/arc:third_party/nacl-newlib/newlib/libc/string/memmem.c: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/abseil-cpp/absl/strings/str_replace_benchmark.cc: [ master, ] Duplicate result
android.googlesource.com/platform/external/abseil-cpp:absl/strings/string_view_test.cc: [ master, ]
717:     std::string needle;
739:     SCOPED_TRACE(s.needle);
745:       EXPECT_EQ(sp.find(s.needle, pos),
746:                 st.find(s.needle, pos));
747:       EXPECT_EQ(sp.rfind(s.needle, pos),
748:                 st.rfind(s.needle, pos));
749:       EXPECT_EQ(sp.find_first_of(s.needle, pos),
750:                 st.find_first_of(s.needle, pos));
751:       EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
752:                 st.find_first_not_of(s.needle, pos));
753:       EXPECT_EQ(sp.find_last_of(s.needle, pos),
754:                 st.find_last_of(s.needle, pos));
755:       EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
756:                 st.find_last_not_of(s.needle, pos));
github.com/apache/openwhisk-package-alarms:action/alarmWeb_package.json: [ master, ]
7:     "needle": "2.3.2",
chromium.googlesource.com/native_client/nacl-newlib:newlib/libc/string/memmem.c: [ master, ] Duplicate result
github.com/GoogleCloudPlatform/cloud-foundation-toolkit:cli/vendor/github.com/gobwas/glob/match/contains.go: [ master, ]
9: 	Needle string
13: func NewContains(needle string, not bool) Contains {
14: 	return Contains{needle, not}
18: 	return strings.Contains(s, self.Needle) != self.Not
24: 	idx := strings.Index(s, self.Needle)
31: 		offset = idx + len(self.Needle)
57: 	return fmt.Sprintf("<contains:%s[%s]>", not, self.Needle)
github.com/apache/openwhisk-package-alarms:action/alarmFeed_package.json: [ master, ]
7:     "needle": "2.3.2"
github.com/googlearchive/gcsbeat:vendor/github.com/gobwas/glob/match/contains.go: [ master, ] Duplicate result
github.com/ampproject/remapping:test/unit/binary-search.ts: [ master, ]
29:         const needle = j * 2;
45:         const needle = j * 2 - 1;
64:     const needle = -1;
79:     const needle = 18;
94:     const needle = 1;
103:     const needle = 1;
20:   function comparator(item: number, needle: number): number {
21:     return item - needle;
30:         const index = binarySearch(array, needle, comparator);
34:         expect(array[index]).toEqual(needle);
46:         const index = binarySearch(array, needle, comparator);
53:           expect(array[negated - 1]).toBeLessThan(needle);
56:           expect(array[negated]).toBeGreaterThan(needle);
62:   test('needle is lower than all elements', () => {
68:       const index = binarySearch(array, needle, comparator);
73:       expect(array[negated]).toBeGreaterThan(needle);
77:   test('needle is higher than all elements', () => {
83:       const index = binarySearch(array, needle, comparator);
88:       expect(array[negated - 1]).toBeLessThan(needle);
95:     const index = binarySearch(array, needle, comparator);
108:       array.push(needle);
110:       const index = binarySearch(array, needle, comparator);
github.com/v8/v8:test/mjsunit/regress/regress-1067270.js: [ master, ]
7: const needle = Array(1802).join(" +") + Array(16884).join("A");
10: assertEquals(string.search(needle), -1);
11: assertEquals(string.search(needle), -1);
chromium.googlesource.com/v8/v8:test/mjsunit/regress/regress-1067270.js: [ master, ] Duplicate result
github.com/chromium/chromium:third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ]
718:     std::string needle;
740:     SCOPED_TRACE(s.needle);
746:       EXPECT_EQ(sp.find(s.needle, pos),
747:                 st.find(s.needle, pos));
748:       EXPECT_EQ(sp.rfind(s.needle, pos),
749:                 st.rfind(s.needle, pos));
750:       EXPECT_EQ(sp.find_first_of(s.needle, pos),
751:                 st.find_first_of(s.needle, pos));
752:       EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
753:                 st.find_first_not_of(s.needle, pos));
754:       EXPECT_EQ(sp.find_last_of(s.needle, pos),
755:                 st.find_last_of(s.needle, pos));
756:       EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
757:                 st.find_last_not_of(s.needle, pos));
github.com/GoogleCloudPlatform/terraform-validator:vendor/github.com/gobwas/glob/match/contains.go: [ master, ] Duplicate result
chromium.googlesource.com/chromium/src:third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result
github.com/apache/marmotta:libraries/ostrich/backend/3rdparty/abseil/absl/strings/string_view_test.cc: [ master, ]
699:     std::string needle;
721:     SCOPED_TRACE(s.needle);
727:       EXPECT_EQ(sp.find(s.needle, pos),
728:                 st.find(s.needle, pos));
729:       EXPECT_EQ(sp.rfind(s.needle, pos),
730:                 st.rfind(s.needle, pos));
731:       EXPECT_EQ(sp.find_first_of(s.needle, pos),
732:                 st.find_first_of(s.needle, pos));
733:       EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
734:                 st.find_first_not_of(s.needle, pos));
735:       EXPECT_EQ(sp.find_last_of(s.needle, pos),
736:                 st.find_last_of(s.needle, pos));
737:       EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
738:                 st.find_last_not_of(s.needle, pos));
github.com/asciidoctor/asciidoctor-reveal.js:test/js-babel/package-lock.json: [ master, ]
578:                 "needle": "^2.2.1",
559:             "needle": {
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ]
709:     std::string needle;
731:     SCOPED_TRACE(s.needle);
737:       EXPECT_EQ(sp.find(s.needle, pos),
738:                 st.find(s.needle, pos));
739:       EXPECT_EQ(sp.rfind(s.needle, pos),
740:                 st.rfind(s.needle, pos));
741:       EXPECT_EQ(sp.find_first_of(s.needle, pos),
742:                 st.find_first_of(s.needle, pos));
743:       EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
744:                 st.find_first_not_of(s.needle, pos));
745:       EXPECT_EQ(sp.find_last_of(s.needle, pos),
746:                 st.find_last_of(s.needle, pos));
747:       EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
748:                 st.find_last_not_of(s.needle, pos));
chromium.googlesource.com/chromium/src/third_party:abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result
github.com/angular/protractor:testapp/package-lock.json: [ master, ]
1505:             "needle": "^2.2.0",
1486:         "needle": {
android.googlesource.com/platform/superproject:external/abseil-cpp/absl/strings/string_view_test.cc: [ master, ] Duplicate result
github.com/apache/ranger:security-admin/src/test/javascript/package-lock.json: [ master, ]
1437:             "needle": "^2.2.0",
1418:         "needle": {
github.com/firebase/firestore-codelab-extended-swift:Pods/FirebaseFirestore/Firestore/third_party/abseil-cpp/absl/strings/string_view_test.cc: [ master, ]
710:     std::string needle;
732:     SCOPED_TRACE(s.needle);
738:       EXPECT_EQ(sp.find(s.needle, pos),
739:                 st.find(s.needle, pos));
740:       EXPECT_EQ(sp.rfind(s.needle, pos),
741:                 st.rfind(s.needle, pos));
742:       EXPECT_EQ(sp.find_first_of(s.needle, pos),
743:                 st.find_first_of(s.needle, pos));
744:       EXPECT_EQ(sp.find_first_not_of(s.needle, pos),
745:                 st.find_first_not_of(s.needle, pos));
746:       EXPECT_EQ(sp.find_last_of(s.needle, pos),
747:                 st.find_last_of(s.needle, pos));
748:       EXPECT_EQ(sp.find_last_not_of(s.needle, pos),
749:                 st.find_last_not_of(s.needle, pos));
github.com/GNOME/libdazzle:tests/test-levenshtein.c: [ mainline, ]
5:   const gchar *needle;
24:   for (guint i = 0; check[i].needle != NULL; i++)
26:       gint score = dzl_levenshtein (check[i].needle, check[i].haystack);
github.com/GNOME/libdazzle:tests/test-fuzzy-highlight.c: [ mainline, ]
27:     const gchar *needle;
40:                                                          tests[i].needle,
skia.googlesource.com/external/github.com/unicode-org/icu:icu4c/source/test/intltest/strtest.cpp: [ master, ]
455:         const char* needle;
479:         StringPiece needle(cas.needle);
481:             cas.expected, haystack.find(needle, 0));
484:         std::string stdneedle(cas.needle);
490:                 stdhaystack.find(stdneedle, offset), haystack.find(needle, offset));
486:             cas.expected, stdhaystack.find(stdneedle, 0));
github.com/GNOME/libdazzle:tests/test-pattern-spec.c: [ mainline, ]
25:     const gchar *needle;
46:       spec = dzl_pattern_spec_new (tests[i].needle);
github.com/src-d/kmcuda:src/test.R: [ develop, ]
96:     needle <- "--file="
97:     match <- grep(needle, cmdArgs)
99:       return(normalizePath(sub(needle, "", cmdArgs[match])))
github.com/GoogleChrome/chrome-app-samples:samples/text-editor/lib/ace/editor_highlight_selected_word_test.js: [ master, ]
139:             needle: "Mauris"
194:             needle: "consectetur"
github.com/hanwen/artisjokke:needle2d/needle-inserter.hh: [ master, ]
6: #define NEEDLE_INSERTER
13: class Needle_inserter : public Deformation_hook
29:   Link_array<Node> needle_;
36:   Array<Vector2> needle_params_;
2:   declare Needle_inserter
5: #ifndef NEEDLE_INSERTER
44:   Auto_needle_insert * auto_insert_;
49:   void dump_needle_forces (const char *);
54:   Needle_inserter (Maubach_tree*, Deformation_state*);
55:   void move_needle (Vector2 h, Vector2 t);
58:   void auto_needle_insert ();
61:   void refine_around_needle_tip (Vector2,Vector2);
64:   void print_needle ();  
github.com/hanwen/artisjokke:needle3d/needle-inserter3.hh: [ master, ]
2: #define NEEDLE_INSERTER3_HH
10: class Needle_inserter3 : public Deformation_hook,  public Element_watcher
12:   enum Needle_state {
19:   set<Element*> needle_elements_;
20:   map<Node*,Real> needle_node_radii_;
26:   Real needle_radius_;
23:   bool filter_needle_rotations_ ;
1: #ifndef NEEDLE_INSERTER3_HH
16:   Needle_state state_;
40:   void select_elements_around_needle (Element*, Vector3,Vector3);
42:   void update_needle_elements ();
45:   void accrue_needle_elements (Vector3, Vector3);    
47:   bool is_needle_element (Element*, Vector3 , Vector3, Real ) const;
50:   Auto_needle_inserter3 * auto_insert_;
51:   void auto_needle_insert ();
53:   void refine_around_needle_tip (Vector3, Vector3);
55:   Needle_inserter3 (Maubach_tree3*, Deformation_state*);
59:   void move_needle (Vector3,Vector3);
60:   set<Face*> get_needle_surface ();
64: extern float needle_color [];
github.com/hanwen/artisjokke:needle3d/needle-inserter3.cc: [ master, ]
30: Needle_inserter3::Needle_inserter3 (Maubach_tree3* tree,
63: Needle_inserter3::move_needle (Vector3 h, Vector3 t)
96: Needle_inserter3::get_needle_surface ()
481: Needle_inserter3::refine_around_needle_tip (Vector3 h, Vector3 t)
527: Needle_inserter3::is_needle_element (Element *e, Vector3 h, Vector3 t,  Real entry_param) const
551: Needle_inserter3::accrue_needle_elements (Vector3 h, Vector3 t)
677: Needle_inserter3::update_needle_elements ()
9: #include "needle-inserter3.hh"
16:   The needle is characterized by the set NEEDLE_ELEMENTS_.
18:   All nodes that are constrained (boundary of the NEEDLE_ELEMENTS_
19:   subcomplex) also have a needle radius (necessary for moving the needle.)
21:   The needle is described by vectors (H, T), where H is the handle
26:   Handling NEEDLE_ELEMENTS_ is not done particularly
38:   needle_radius_ = get_number_setting ("needle-radius");
45:   filter_needle_rotations_ = strcmp (get_string_setting ("elasticity"), "linear");
51: Needle_inserter3::handle () const
57: Needle_inserter3::tip () const
89:   All faces of NEEDLE_ELEMENTS_ whose mates are not in
90:   NEEDLE_ELEMENTS_.
98:   set<Face*> needle_surf;
100:   for (iterof (i, needle_elements_); i != needle_elements_.end(); i++)
107: 	      !has_elt(needle_elements_, f->mate ()->element()))
109: 	      needle_surf .insert (f);
113:   return needle_surf;
121: Needle_inserter3::force_distribution (Real tip_distance, Real entry_param)
143:   Compute the friction force for triangle PLEX, given needle
148:   This should approximate the area of the needle relatively accurate.
158: Needle_inserter3::friction_force (Real * area, Simplex const &plex, Vector3 h, Vector3 t,
178:     beyond the tip of the needle:
190:     We could discard tris if the triangle intersects the needle line, but
194:   if (dir1.length () < needle_radius_ / 100)
196:       printf ("Short distance to needle, %lf\n", dir1.length());
207:       if  (xy.length () < needle_radius_/ 100)
209: 	  printf ("Short distance to needle : %lf\n", xy.length ());
220: 			  phi_z_coordinates[1] - phi_z_coordinates[2]).length () * 0.5 * needle_radius_ *sign;
227:   Change the needle position: express the locations of all needle
228:   nodes (including internal nodes of NEEDLE_ELEMENTS_) in coordinates
229:   relative to the needle, and set their positions to by changing the
230:   coordinate system to the new needle position.
233: Needle_inserter3::drag_nodes (Vector3 h, Vector3 t)
249:   for (iterof (i, needle_elements_); i != needle_elements_.end (); i++)
293:   ENTRY_PARAM is where the needle enters the tissue.
296: Needle_inserter3::get_entry_parameter (Vector3 h, Vector3 t) const
303:   for (iterof (i, needle_elements_); i != needle_elements_.end () ; i++)
318: Needle_inserter3::rearrange_boundary_conditions ()
323:   set<Face*> needle_surf = get_needle_surface ();
324:   for (iterof (i, needle_surf); i != needle_surf.end(); i++)
347:   for (iterof (i, needle_surf); i != needle_surf.end(); i++)
363:   Real theoretical_area = (maxp - minp) * needle_radius_ * 2 * M_PI;
370: 	  needle_surf.size(),
372: 	  (100.0 * inverted )/  needle_surf.size());
389:       assert (has_key (needle_node_radii_, n));
390:       Real node_radius = needle_node_radii_[n]; 
407:       if (filter_needle_rotations_)
436:     Pop off elements slid off the needle.
439:   for (iterof (i, needle_elements_); i != needle_elements_.end (); i++)
455:     needle_elements_.erase (erase[i]);
457:   if (!needle_elements_.size ())
464: Needle_inserter3::handle_tip_changes (Vector3 h, Vector3 t)
466:   refine_around_needle_tip (h, t);
468:   update_needle_elements ();
469:   accrue_needle_elements (h, t); 
473:   Refine the mesh around the needle tip.
475:   This happens in a circle perpendicular to the needle.
477:   This assumes that the needle doesn't move a big deal between
499:   int steps =  int (needle_radius_ * 2 * M_PI / refinement_h);
506:       Vector3 x = t + rad * needle_radius_;
511:       Vector3 farx = t + rad * (refinement_h +  needle_radius_);
542:   return (p >= 0.0 && p <= entry_param)  && (r < needle_radius_ || simp_dist < r /2 ) ;
547:   Add elements to NEEDLE_ELEMENTS_. We start from the tip, and
583:       if (has_elt (needle_elements_, e))
586:       if (is_needle_element (e, last_handle_, last_tip_, entry_param))
588: 	  needle_elements_.insert (e);
605:   Find new needle surface nodes by comparing NEEDLE_ELEMENTS_ and
606:   NEEDLE_NODE_RADII_, and set appropriate radii.
608:   Remove node that are no longer part of the needle, junking the
612: Needle_inserter3::update_boundary_nodes ()
614:   set<Face*> surf = get_needle_surface ();
625:       if (!has_key (needle_node_radii_, *i))
628: 	  needle_node_radii_[*i] = point_to_line_distance3 (y, last_handle_, last_tip_);
635:   for (iterof (i, needle_node_radii_); i != needle_node_radii_.end ();  i++)
645:       needle_node_radii_.erase (rm[i]);
656: Needle_inserter3::signal_converged ()
667:       auto_needle_insert ();
673:   Put topological changes in the NEEDLE_ELEMENTS_ set: subdivision may
674:   render existing elements of NEEDLE_ELEMENTS_ invalid. a
690: 	  bool h = has_elt (needle_elements_, e);
694: 	      needle_elements_.erase (*i);
701: 		  if (is_needle_element (*j, last_handle_, last_tip_, entry_param))
702: 		    needle_elements_.insert (*j);
707: 	      if (is_needle_element (e, last_handle_, last_tip_, entry_param))
708: 		needle_elements_.insert (e);
github.com/hanwen/artisjokke:needle2d/needle-inserter.cc: [ master, ]
17: #define needle_assert(a) do { if (!a) { fprintf(stderr, "NEEDLE ASSERT FAILED: %s\n", #a); suicide(); return ; }}  while (0)
47: Needle_inserter::Needle_inserter(Maubach_tree * tr, Deformation_state * st)
389: Needle_inserter::print_needle ()
416: Needle_inserter::move_needle (Vector2 h, Vector2 t)
80: Needle_inserter::refine_around_needle_tip (Vector2 handle , Vector2 tip)
447: Needle_inserter::dump_needle_forces (const char *fn)
8: #include "needle-inserter.hh"
42: Needle_inserter::live()const
61:     sqrt(2), is to control the inter needle-node spacing.
73: Needle_inserter::suicide ()
88:   if (needle_.size())
90:       tip_param  = ((deformed_location2 (needle_.top(), deformation ()) - tip)*dir);
94:     init  to length_threshold_  to refine in advance of the needle.
112: 	    This refines in a region around the needle.  Have not
125:       if (!e && ! needle_.size())
147:     Walk from tip to the first node that's already on the needle.
153: 	  && needle_.size()
154: 	  && e->opposite_node (entry) == needle_.top ())
169:       if (needle_.find_l (newnod))
209:       assert (!needle_.find_l (n));
254:       needle_.push (n);
255:       needle_params_.push (param);
259:     TODO: add nodes to needle_
264: Needle_inserter::drag_fixed_nodes (Vector2 h, Vector2 t)
267:   for (int i = 0; i < needle_.size (); i++)
269:       Node * n = needle_[i];
270:       Vector2 param = needle_params_[i];
287: Needle_inserter::rearrange_boundary_conditions ()
289:   if (!needle_.size())
302:   for (int i =  needle_.size(); i--;)
304:       Vector2 x =  deformed_location2 (needle_[i], deformation ());
318:   for (int i = 0; i < needle_.size(); i++)
320:       Node * n = needle_[i];
341: 	  Vector2 p = needle_params_[i];
343: 	  needle_params_[i]
353:   for (int i = needle_.size(); i--;)
355:       Node * n = needle_[i];
372: 	  needle_.del (i);
373: 	  needle_params_.del(i);
381:   if (!needle_.size())
391:   log_message ("Needle: "); 
392:   for (int i = needle_.size(); i--;)
394:       bool f = deformation ()->constraints_.is_fixed (needle_[i]);
395:       bool l = deformation ()->constraints_.has_linear_movement_constraint (needle_[i]);
401: Needle_inserter::signal_converged ()
407:   refine_around_needle_tip (last_handle_, last_tip_ );
411:       auto_needle_insert ();
442:       refine_around_needle_tip (h, t); 
458:   fprintf (f, "%d\n", needle_.size ());
467:   for (int i =0; i < needle_.size (); i++)
469:       Node* n = needle_[i];
526:     Walk from tip to the first node that's already on the needle.
588: Needle_inserter::tip_reference_location () const
github.com/hanwen/artisjokke:needle2d/mesh-print.cc: [ master, ]
127: print_needle (FILE * f,
15: #include "needle-inserter.hh"
150:       fprintf (f, " %lf %lf moveto %lf %lf lineto stroke %% needle \n ",
161: 	    Needle_inserter * ni,
203: 	  print_needle (f, top, def, tip, handle);
216: 	    Needle_inserter * ni,
252: 	  print_needle (f, top, def, tip, handle);
android.googlesource.com/platform/external/opencv3:modules/cudalegacy/src/cuda/needle_map.cu: [ master, ]
51:         #define NEEDLE_MAP_SCALE 16
54:         __global__ void NeedleMapAverageKernel(const PtrStepSzf u, const PtrStepf v, PtrStepf u_avg, PtrStepf v_avg)
116:         void NeedleMapAverage_gpu(PtrStepSzf u, PtrStepSzf v, PtrStepSzf u_avg, PtrStepSzf v_avg)
127:         __global__ void NeedleMapVertexKernel(const PtrStepSzf u_avg, const PtrStepf v_avg, float* vertex_data, float* color_data,...(44 bytes skipped)...
207:         void CreateOpticalFlowNeedleMap_gpu(PtrStepSzf u_avg, PtrStepSzf v_avg, float* vertex_buffer, float* color_data, float max_flow,...(28 bytes skipped)...
56:             __shared__ float smem[2 * NEEDLE_MAP_SCALE];
59:             volatile float* v_col_sum = u_col_sum + NEEDLE_MAP_SCALE;
61:             const int x = blockIdx.x * NEEDLE_MAP_SCALE + threadIdx.x;
62:             const int y = blockIdx.y * NEEDLE_MAP_SCALE;
68:             for(int i = 0; i < NEEDLE_MAP_SCALE; ++i)
106:                 const float coeff = 1.0f / (NEEDLE_MAP_SCALE * NEEDLE_MAP_SCALE);
118:             const dim3 block(NEEDLE_MAP_SCALE);
133:             const float arrow_x = x * NEEDLE_MAP_SCALE + NEEDLE_MAP_SCALE / 2.0f;
134:             const float arrow_y = y * NEEDLE_MAP_SCALE + NEEDLE_MAP_SCALE / 2.0f;
121:             NeedleMapAverageKernel<<<grid, block>>>(u, v, u_avg, v_avg);
212:             NeedleMapVertexKernel<<<grid, block>>>(u_avg, v_avg, vertex_buffer, color_data, max_flow, xscale, yscale);...(0 bytes skipped)...
github.com/asciidoctor/jekyll-asciidoc:spec/fixtures/with_custom_private_collection/_tips/needle-in-haystack.adoc: [ master, ]
1: = Needle In Haystack
6: if (~haystack.indexOf(needle)) { /* present */ }
github.com/apache/kudu:www/epoch.0.5.2.min.css: [ master, ]
1: ...(1125 bytes skipped)....inner{stroke-width:1px;stroke:#555}.epoch .gauge .tick{stroke-width:1px;stroke:#555}.epoch .gauge .needle{fill:orange}.epoch .gauge .needle-base{fill:#666}.epoch div.ref.category1,.epoch.category10 div.ref.category1{background-color:#1f77b...(24132 bytes skipped)...
github.com/google/rekall:rekall-core/rekall/plugins/linux/heap_analysis.py: [ master, ]
2852:     def search_vmas_for_needle(self, search_string=None, pointers=None,
3053:     def search_chunks_for_needle(self, search_string=None, pointers=None,
2307:             for hit in self.search_vmas_for_needle(pointers=[top_chunk.v()]):
2787:             for hit in self.search_vmas_for_needle(pointers=mmap_pointers):
2789:                 found_pointers.add(hit['needle'])
2854:         """Searches all vmas or only the given ones for the given needle(s).
2868:                                                 dict(needle=search_string))])
2901:                     temp['needle'] = pointer
2904:                     temp['needle'] = search_string
3055:         """Searches all chunks for the given needle(s) and returns the ones
3070:             hits = self.search_vmas_for_needle(pointers=pointers,
3074:             hits = self.search_vmas_for_needle(search_string=search_string,
3085:         #   { needle (string or pointer): { offsets: {offsets} }, needle2: ...}
3099:                         result[chunk] = {hit['needle']: {hit['hit']}}
3102:                         if hit['needle'] not in list(result[chunk].keys()):
3103:                             result[chunk][hit['needle']] = {hit['hit']}
3106:                             result[chunk][hit['needle']].add(hit['hit'])
3657:                 hits = self.search_vmas_for_needle(
3661:                 hits = self.search_vmas_for_needle(
4228:                         hits = self.search_chunks_for_needle(
4233:                         temp_hits = self.search_chunks_for_needle(
4264:                                 temp_hit['needle'] = ','.join(rule_strings)
4267:                         temp_hits = self.search_chunks_for_needle(
4308:                             temp_hits = self.search_chunks_for_needle(
4342:                             "We didn't find anything for the given needle(s).")
4350:                         for needle, data in needles.items():
4351:                             if isinstance(needle, malloc_chunk):
4355:                                     "0x{:X}:\n".format(needle.v()))
4371:                                     "The following needle at the given "
4373:                                 renderer.write("Needle     Offset(s)\n")
4378:                                         (hex(needle) if isinstance(needle, int)
4379:                                          else repr(needle)) + ": "
4386:                                         (hex(needle) if isinstance(needle, int)
4387:                                          else repr(needle)) + ": The needle "
4237:                         for chunk, needles in temp_hits.items():
4239:                                 hits[chunk].update(needles)
4242:                                 hits[chunk] = needles
4271:                         for chunk, needles in temp_hits.items():
4273:                                 hits[chunk].update(needles)
4276:                                 hits[chunk] = needles
4345:                     for chunk, needles in hits.items():
github.com/googleglass/gdk-compass-sample:app/src/main/java/com/google/android/glass/sample/compass/CompassView.java: [ master, ]
53:     private static final float NEEDLE_WIDTH = 6;
54:     private static final float NEEDLE_HEIGHT = 125;
55:     private static final int NEEDLE_COLOR = Color.RED;
341:     private void drawNeedle(Canvas canvas, boolean bottom) {
216:         mPaint.setColor(NEEDLE_COLOR);
336:      * Draws a needle that is centered at the top or bottom of the compass.
339:      * @param bottom true to draw the bottom needle, or false to draw the top needle
346:         // Flip the vertical coordinates if we're drawing the bottom needle.
355:         float needleHalfWidth = NEEDLE_WIDTH / 2;
359:         mPath.lineTo(centerX - needleHalfWidth, origin + sign * (NEEDLE_HEIGHT - 4));
360:         mPath.lineTo(centerX, origin + sign * NEEDLE_HEIGHT);
361:         mPath.lineTo(centerX + needleHalfWidth, origin + sign * (NEEDLE_HEIGHT - 4));
48:  * marks at the half-winds. The red "needles" in the display mark the current heading.
217:         drawNeedle(canvas, false);
218:         drawNeedle(canvas, true);
358:         mPath.moveTo(centerX - needleHalfWidth, origin);
362:         mPath.lineTo(centerX + needleHalfWidth, origin);
github.com/google/coursebuilder-core:coursebuilder/modules/gitkit/gitkit.py: [ master, ]
150: _BAD_CRYPTO_NEEDLE = 'PKCS12 format is not supported by the PyCrypto library'
627:             if _BAD_CRYPTO_NEEDLE in e.message:
github.com/google/coursebuilder-android-container-module:android/worker.py: [ master, ]
110: _ACCEPT_LICENSE_NEEDLE = 'Do you accept the license'
133: _GRADLEW_INSTALL_SUCCESS_NEEDLE = 'BUILD SUCCESSFUL'
145: _TEST_FAILURE_NEEDLE = 'FAILURES!!!\r'
779:         return _GRADLEW_INSTALL_SUCCESS_NEEDLE not in result
782:         return _TEST_FAILURE_NEEDLE in result
1111:             if _ACCEPT_LICENSE_NEEDLE in line and not process.poll():
github.com/GoogleCloudPlatform/IoT-Icebreaker:appengine/sensordata-to-ui/public/third_party/epoch/epoch.min.css: [ master, ]
1: ...(1365 bytes skipped)....inner{stroke-width:1px;stroke:#555}.epoch .gauge .tick{stroke-width:1px;stroke:#555}.epoch .gauge .needle{fill:orange}.epoch .gauge .needle...(24288 bytes skipped)...nner{stroke:#AAA}.epoch-theme-dark .epoch .gauge .tick{stroke:#AAA}.epoch-theme-dark .epoch .gauge .needle{fill:#F3DE88}.epoch-theme-dark .epoch .gauge .needle-base{fill:#999}.epoch-theme-dark .epoch div.ref.category1,.epoch-theme-dark .epoch.category10 div.r...(32086 bytes skipped)...
github.com/google/supersonic:supersonic/expression/core/comparison_bound_expressions.cc: [ master, ]
376:   scoped_ptr<BoundExpression> needle_expression_;
733:   BoundExpression* needle_expression_;
381:   bool_ptr skipped_or_matched_or_needle_expression_null_copy() {
391:   bool_ptr skipped_or_matched_or_needle_expression_null() {
140:   // Needle expression, haystack arguments, and haystack constants are expected
146:                        BoundExpression* needle_expression,
154:                            GetExpressionNullability(needle_expression),
157:         needle_expression_(needle_expression),
163:         data_type, needle_expression_.get()).is_success());
187:     // Step 1: Evaluate the needle expression.
188:     EvaluationResult needle_expression_result =
189:         needle_expression_->DoEvaluate(input, skip_vectors);
190:     PROPAGATE_ON_FAILURE(needle_expression_result);
194:     // a) it's skipped either because needle expression evaluates to null
197:     bit_pointer::FillFrom(skipped_or_matched_or_needle_expression_null(),
201:     DCHECK_EQ(needle_expression_result.get().schema().attribute(0).type(),
204:         needle_expression_result.get().column(0).typed_data<data_type>();
206:     bool_ptr output_data = skipped_or_matched_or_needle_expression_null();
233:           skipped_or_matched_or_needle_expression_null(),
253:       bit_pointer::FillFrom(skipped_or_matched_or_needle_expression_null_copy(),
254:                             skipped_or_matched_or_needle_expression_null(),
258:           0, skipped_or_matched_or_needle_expression_null_copy());
266:       const cpp_type* needle_expression_iterator =
267:           needle_expression_result.get().column(0).typed_data<data_type>();
273:       bool_ptr skip_iterator = skipped_or_matched_or_needle_expression_null();
282:           // We only need to check equality between needle and haystack
283:           // if needle is not null, not skipped, not yet matched
287:               *haystack_expression_iterator, *needle_expression_iterator);
291:           ++needle_expression_iterator;
300:               *needle_expression_iterator);
303:           ++needle_expression_iterator;
309:     // skipped_or_matched_or_needle_expression_null_copy (since it is not
311:     vector_logic::AndNot(skipped_or_matched_or_needle_expression_null(),
320:         skipped_or_matched_or_needle_expression_null(),
327:   // Needle in <haystack_constants, haystack_arguments> can be resolved if
328:   // needle expression is a constant and at least one of the following is true:
330:   // b) needle expression evaluates null.
331:   // c) the value of the needle expression is present in haystack_constants.
333:     if (!needle_expression_->is_constant()) {
342:           needle_expression_.get(), &is_null);
343:       // If actual evaluation of needle expression fails, we can't propagate
366:     needle_expression_->CollectReferredAttributeNames(referred_attribute_names);
643:     BoundExpression* input_needle_expression,
647:   scoped_ptr<BoundExpression> needle_expression(input_needle_expression);
656:   string name = StrCat(GetExpressionName(needle_expression.get()),
688:   // hashing for matching needle with constant-valued haystack expressions.
699:           needle_expression.release(),
708:             needle_expression.release(),
718:   InSetResolver(BoundExpression* needle_expression,
723:         needle_expression_(needle_expression),
730:         needle_expression_, haystack_arguments_, allocator_, max_row_count_);
760:     BoundExpression* input_needle_expression,
764:   scoped_ptr<BoundExpression> needle_expression(input_needle_expression);
766:   PROPAGATE_ON_FAILURE(CheckAttributeCount("Needle Bound Expression",
767:                                            needle_expression->result_schema(),
777:       needle_expression->result_schema().attribute(0).type();
792:       needle_expression.release(),
796:   needle_expression.reset(converted.release());
807:   InSetResolver resolver(needle_expression.release(),
github.com/GNOME/totem-pl-parser:plparse/totem-pl-parser-podcast.c: [ mainline, ]
38: #define RSS_NEEDLE "<rss "
40: #define ATOM_NEEDLE "<feed "
41: #define OPML_NEEDLE "<opml "
39: #define RSS_NEEDLE2 "<rss\n"
51: 	if (g_strstr_len (data, len, RSS_NEEDLE) != NULL)
53: 	if (g_strstr_len (data, len, RSS_NEEDLE2) != NULL)
67: 	if (g_strstr_len (data, len, ATOM_NEEDLE) != NULL)
81: 	if (g_strstr_len (data, len, OPML_NEEDLE) != NULL)
github.com/GNOME/totem-pl-parser:plparse/totem-pl-parser-wm.c: [ mainline, ]
40: #define ASX_NEEDLE "<ASX"
41: #define ASX_NEEDLE2 "<asx"
42: #define ASX_NEEDLE3 "<Asx"
53: 	if (g_strstr_len (data, len, ASX_NEEDLE) != NULL)
55: 	if (g_strstr_len (data, len, ASX_NEEDLE2) != NULL)
57: 	if (g_strstr_len (data, len, ASX_NEEDLE3) != NULL)
github.com/hanwen/artisjokke:visualize/artisjokke-drawer.hh: [ master, ]
38:   Drag_state needle_drag_;
76:   virtual void set_needle ();
79:   virtual void draw_needle ();
chromium.googlesource.com/chromium/third_party/ffmpeg:libavfilter/vf_find_rect.c: [ master, ]
41:     AVFrame *needle_frame[MAX_MIPMAPS];
170:             float score = compare(foc->haystack_frame[pass], foc->needle_frame[pass], x, y);
232:         av_frame_free(&foc->needle_frame[i]);
265:     foc->needle_frame[0] = av_frame_clone(foc->obj_frame);
267:         foc->needle_frame[i] = downscale(foc->needle_frame[i-1]);
268:         if (!foc->needle_frame[i])
github.com/hanwen/artisjokke:visualize/artisjokke-drawer.cc: [ master, ]
291: Artisjokke_drawer::set_needle ()
296: Artisjokke_drawer::draw_needle ()
64:   else if (current == & needle_drag_.quat_)
66:       set_needle ();
108:   //  set_needle();
192:   this->draw_needle ();
256:   else if (current == &needle_drag_.scale_)
258:       set_needle ();
280:    else if (current == &needle_drag_.translate_)
282:       set_needle ();
github.com/GNOME/totem-pl-parser:plparse/totem-pl-parser-qt.c: [ mainline, ]
39: #define QT_NEEDLE "<?quicktime"
59: 	if (g_strstr_len (data, len, QT_NEEDLE) != NULL)
chromium.googlesource.com/native_client/nacl-glibc:string/str-two-way.h: [ master, ]
213: two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
307: two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
66: # define LONG_NEEDLE_THRESHOLD 32U
68: # define LONG_NEEDLE_THRESHOLD SIZE_MAX
42:   LONG_NEEDLE_THRESHOLD.
60:    adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
61:    speedup no greater than a factor of NEEDLE_LEN.  The larger the
62:    needle, the better the potential performance gain.  On the other
82: /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
90:    When NEEDLE is factored into two halves, a local period is the
93:    non-empty NEEDLE have a local period of at least 1 and no greater
94:    than NEEDLE_LEN.
101:    in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
106: critical_factorization (const unsigned char *needle, size_t needle_len,
111:   size_t j; /* Index into NEEDLE for current candidate suffix.  */
117:      0 <= j < NEEDLE_LEN - 1
119:      min(max_suffix, max_suffix_rev) < global period of NEEDLE
120:      1 <= p <= global period of NEEDLE
121:      p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
129:   while (j + k < needle_len)
131:       a = CANON_ELEMENT (needle[j + k]);
132:       b = CANON_ELEMENT (needle[max_suffix + k]);
164:   while (j + k < needle_len)
166:       a = CANON_ELEMENT (needle[j + k]);
167:       b = CANON_ELEMENT (needle[max_suffix_rev + k]);
202: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
204:    method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
206:    of 2 * NEEDLE_LEN comparisons.
209:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
211:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.  */
214: 		      const unsigned char *needle, size_t needle_len)
216:   size_t i; /* Index into current byte of NEEDLE.  */
218:   size_t period; /* The period of the right half of needle.  */
219:   size_t suffix; /* The index of the right half of needle.  */
221:   /* Factor the needle into two halves, such that the left half is
223:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
224:   suffix = critical_factorization (needle, needle_len, &period);
228:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
230:       /* Entire needle is periodic; a mismatch can only advance by the
235:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
239: 	  while (i < needle_len && (CANON_ELEMENT (needle[i])
242: 	  if (needle_len <= i)
246: 	      while (memory < i + 1 && (CANON_ELEMENT (needle[i])
254: 	      memory = needle_len - period;
265:       /* The two halves of needle are distinct; no extra memory is
267:       period = MAX (suffix, needle_len - suffix) + 1;
269:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
273: 	  while (i < needle_len && (CANON_ELEMENT (needle[i])
276: 	  if (needle_len <= i)
280: 	      while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
294: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
296:    method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
298:    of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
301:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
302:    and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
304:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
308: 		     const unsigned char *needle, size_t needle_len)
310:   size_t i; /* Index into current byte of NEEDLE.  */
312:   size_t period; /* The period of the right half of needle.  */
313:   size_t suffix; /* The index of the right half of needle.  */
316:   /* Factor the needle into two halves, such that the left half is
318:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
319:   suffix = critical_factorization (needle, needle_len, &period);
323:      the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
324:      shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0.  */
326:     shift_table[i] = needle_len;
327:   for (i = 0; i < needle_len; i++)
328:     shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
332:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
334:       /* Entire needle is periodic; a mismatch can only advance by the
340:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
344: 	  shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
349: 		  /* Since needle is periodic, but the last period has
352: 		  shift = needle_len - period;
361: 	  while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
364: 	  if (needle_len - 1 <= i)
368: 	      while (memory < i + 1 && (CANON_ELEMENT (needle[i])
376: 	      memory = needle_len - period;
387:       /* The two halves of needle are distinct; no extra memory is
390:       period = MAX (suffix, needle_len - suffix) + 1;
392:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
396: 	  shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
405: 	  while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
408: 	  if (needle_len - 1 <= i)
412: 	      while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
50:    needles, we also use a bad character shift table similar to the
59:    worthwhile.  Small needles should not compute a table, since it
chromium.googlesource.com/arc/arc:third_party/nacl-glibc/string/str-two-way.h: [ master, ] Duplicate result
chromium.googlesource.com/native_client/nacl-toolchain:newlib/newlib/libc/string/str-two-way.h: [ master, ]
198: two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
292: two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
53: # define LONG_NEEDLE_THRESHOLD 32U
55: # define LONG_NEEDLE_THRESHOLD SIZE_MAX
29:   LONG_NEEDLE_THRESHOLD.
47:    adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
48:    speedup no greater than a factor of NEEDLE_LEN.  The larger the
49:    needle, the better the potential performance gain.  On the other
67: /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
75:    When NEEDLE is factored into two halves, a local period is the
78:    non-empty NEEDLE have a local period of at least 1 and no greater
79:    than NEEDLE_LEN.
86:    in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
91: critical_factorization (const unsigned char *needle, size_t needle_len,
96:   size_t j; /* Index into NEEDLE for current candidate suffix.  */
102:      0 <= j < NEEDLE_LEN - 1
104:      min(max_suffix, max_suffix_rev) < global period of NEEDLE
105:      1 <= p <= global period of NEEDLE
106:      p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
114:   while (j + k < needle_len)
116:       a = CANON_ELEMENT (needle[j + k]);
117:       b = CANON_ELEMENT (needle[(size_t)(max_suffix + k)]);
149:   while (j + k < needle_len)
151:       a = CANON_ELEMENT (needle[j + k]);
152:       b = CANON_ELEMENT (needle[max_suffix_rev + k]);
187: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
189:    method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
191:    of 2 * NEEDLE_LEN comparisons.
194:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
196:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.  */
199: 		      const unsigned char *needle, size_t needle_len)
201:   size_t i; /* Index into current byte of NEEDLE.  */
203:   size_t period; /* The period of the right half of needle.  */
204:   size_t suffix; /* The index of the right half of needle.  */
206:   /* Factor the needle into two halves, such that the left half is
208:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
209:   suffix = critical_factorization (needle, needle_len, &period);
213:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
215:       /* Entire needle is periodic; a mismatch can only advance by the
220:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
224: 	  while (i < needle_len && (CANON_ELEMENT (needle[i])
227: 	  if (needle_len <= i)
231: 	      while (memory < i + 1 && (CANON_ELEMENT (needle[i])
239: 	      memory = needle_len - period;
250:       /* The two halves of needle are distinct; no extra memory is
252:       period = MAX (suffix, needle_len - suffix) + 1;
254:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
258: 	  while (i < needle_len && (CANON_ELEMENT (needle[i])
261: 	  if (needle_len <= i)
265: 	      while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
279: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
281:    method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
283:    of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
286:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
287:    and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
289:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
293: 		     const unsigned char *needle, size_t needle_len)
295:   size_t i; /* Index into current byte of NEEDLE.  */
297:   size_t period; /* The period of the right half of needle.  */
298:   size_t suffix; /* The index of the right half of needle.  */
301:   /* Factor the needle into two halves, such that the left half is
303:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
304:   suffix = critical_factorization (needle, needle_len, &period);
308:      the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
309:      shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0.  */
311:     shift_table[i] = needle_len;
312:   for (i = 0; i < needle_len; i++)
313:     shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
317:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
319:       /* Entire needle is periodic; a mismatch can only advance by the
325:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
329: 	  shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
334: 		  /* Since needle is periodic, but the last period has
337: 		  shift = needle_len - period;
346: 	  while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
349: 	  if (needle_len - 1 <= i)
353: 	      while (memory < i + 1 && (CANON_ELEMENT (needle[i])
361: 	      memory = needle_len - period;
372:       /* The two halves of needle are distinct; no extra memory is
375:       period = MAX (suffix, needle_len - suffix) + 1;
377:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
381: 	  shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
390: 	  while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
393: 	  if (needle_len - 1 <= i)
397: 	      while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
37:    needles, we also use a bad character shift table similar to the
46:    worthwhile.  Small needles should not compute a table, since it
chromium.googlesource.com/arc/arc:third_party/nacl-newlib/newlib/libc/string/str-two-way.h: [ master, ]
198: two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
292: two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
53: # define LONG_NEEDLE_THRESHOLD 32U
55: # define LONG_NEEDLE_THRESHOLD SIZE_MAX
29:   LONG_NEEDLE_THRESHOLD.
47:    adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
48:    speedup no greater than a factor of NEEDLE_LEN.  The larger the
49:    needle, the better the potential performance gain.  On the other
67: /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
75:    When NEEDLE is factored into two halves, a local period is the
78:    non-empty NEEDLE have a local period of at least 1 and no greater
79:    than NEEDLE_LEN.
86:    in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
91: critical_factorization (const unsigned char *needle, size_t needle_len,
96:   size_t j; /* Index into NEEDLE for current candidate suffix.  */
102:      0 <= j < NEEDLE_LEN - 1
104:      min(max_suffix, max_suffix_rev) < global period of NEEDLE
105:      1 <= p <= global period of NEEDLE
106:      p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
114:   while (j + k < needle_len)
116:       a = CANON_ELEMENT (needle[j + k]);
117:       b = CANON_ELEMENT (needle[(size_t)(max_suffix + k)]);
149:   while (j + k < needle_len)
151:       a = CANON_ELEMENT (needle[j + k]);
152:       b = CANON_ELEMENT (needle[max_suffix_rev + k]);
187: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
189:    method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
191:    of 2 * NEEDLE_LEN comparisons.
194:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
196:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.  */
199: 		      const unsigned char *needle, size_t needle_len)
201:   size_t i; /* Index into current byte of NEEDLE.  */
203:   size_t period; /* The period of the right half of needle.  */
204:   size_t suffix; /* The index of the right half of needle.  */
206:   /* Factor the needle into two halves, such that the left half is
208:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
209:   suffix = critical_factorization (needle, needle_len, &period);
213:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
215:       /* Entire needle is periodic; a mismatch can only advance by the
220:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
224: 	  while (i < needle_len && (CANON_ELEMENT (needle[i])
227: 	  if (needle_len <= i)
231: 	      while (memory < i + 1 && (CANON_ELEMENT (needle[i])
239: 	      memory = needle_len - period;
250:       /* The two halves of needle are distinct; no extra memory is
252:       period = MAX (suffix, needle_len - suffix) + 1;
254:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
258: 	  while (i < needle_len && (CANON_ELEMENT (needle[i])
261: 	  if (needle_len <= i)
265: 	      while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
279: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
281:    method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
283:    of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
286:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
287:    and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
289:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
293: 		     const unsigned char *needle, size_t needle_len)
295:   size_t i; /* Index into current byte of NEEDLE.  */
297:   size_t period; /* The period of the right half of needle.  */
298:   size_t suffix; /* The index of the right half of needle.  */
301:   /* Factor the needle into two halves, such that the left half is
303:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
304:   suffix = critical_factorization (needle, needle_len, &period);
308:      the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
309:      shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0.  */
311:     shift_table[i] = needle_len;
312:   for (i = 0; i < needle_len; i++)
313:     shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
317:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
319:       /* Entire needle is periodic; a mismatch can only advance by the
325:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
329: 	  shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
334: 		  /* Since needle is periodic, but the last period has
337: 		  shift = needle_len - period;
346: 	  while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
349: 	  if (needle_len - 1 <= i)
353: 	      while (memory < i + 1 && (CANON_ELEMENT (needle[i])
361: 	      memory = needle_len - period;
372:       /* The two halves of needle are distinct; no extra memory is
375:       period = MAX (suffix, needle_len - suffix) + 1;
377:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
381: 	  shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
390: 	  while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
393: 	  if (needle_len - 1 <= i)
397: 	      while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
37:    needles, we also use a bad character shift table similar to the
46:    worthwhile.  Small needles should not compute a table, since it
chromium.googlesource.com/native_client/nacl-gdb:gdb/gnulib/import/str-two-way.h: [ master, ]
235: two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
329: two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
65: # define LONG_NEEDLE_THRESHOLD 32U
67: # define LONG_NEEDLE_THRESHOLD SIZE_MAX
40:   LONG_NEEDLE_THRESHOLD.
59:    adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
60:    speedup no greater than a factor of NEEDLE_LEN.  The larger the
61:    needle, the better the potential performance gain.  On the other
81: /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
89:    When NEEDLE is factored into two halves, a local period is the
92:    non-empty NEEDLE have a local period of at least 1 and no greater
93:    than NEEDLE_LEN.
103:    in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
108: critical_factorization (const unsigned char *needle, size_t needle_len,
113:   size_t j; /* Index into NEEDLE for current candidate suffix.  */
118:   /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered
120:   if (needle_len < 3)
123:       return needle_len - 1;
127:      0 <= j < NEEDLE_LEN - 1
129:      min(max_suffix, max_suffix_rev) < global period of NEEDLE
130:      1 <= p <= global period of NEEDLE
131:      p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
139:   while (j + k < needle_len)
141:       a = CANON_ELEMENT (needle[j + k]);
142:       b = CANON_ELEMENT (needle[max_suffix + k]);
174:   while (j + k < needle_len)
176:       a = CANON_ELEMENT (needle[j + k]);
177:       b = CANON_ELEMENT (needle[max_suffix_rev + k]);
224: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
226:    method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
228:    of 2 * NEEDLE_LEN comparisons.
231:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
233:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.  */
236:                       const unsigned char *needle, size_t needle_len)
238:   size_t i; /* Index into current byte of NEEDLE.  */
240:   size_t period; /* The period of the right half of needle.  */
241:   size_t suffix; /* The index of the right half of needle.  */
243:   /* Factor the needle into two halves, such that the left half is
245:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
246:   suffix = critical_factorization (needle, needle_len, &period);
250:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
252:       /* Entire needle is periodic; a mismatch in the left half can
257:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
261:           while (i < needle_len && (CANON_ELEMENT (needle[i])
264:           if (needle_len <= i)
268:               while (memory < i + 1 && (CANON_ELEMENT (needle[i])
276:               memory = needle_len - period;
287:       /* The two halves of needle are distinct; no extra memory is
289:       period = MAX (suffix, needle_len - suffix) + 1;
291:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
295:           while (i < needle_len && (CANON_ELEMENT (needle[i])
298:           if (needle_len <= i)
302:               while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
316: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
318:    method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
320:    of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
323:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
324:    and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
326:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
330:                      const unsigned char *needle, size_t needle_len)
332:   size_t i; /* Index into current byte of NEEDLE.  */
334:   size_t period; /* The period of the right half of needle.  */
335:   size_t suffix; /* The index of the right half of needle.  */
338:   /* Factor the needle into two halves, such that the left half is
340:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
341:   suffix = critical_factorization (needle, needle_len, &period);
345:      the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
346:      shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0.  */
348:     shift_table[i] = needle_len;
349:   for (i = 0; i < needle_len; i++)
350:     shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
354:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
356:       /* Entire needle is periodic; a mismatch in the left half can
362:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
366:           shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
371:                   /* Since needle is periodic, but the last period has
374:                   shift = needle_len - period;
383:           while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
386:           if (needle_len - 1 <= i)
390:               while (memory < i + 1 && (CANON_ELEMENT (needle[i])
398:               memory = needle_len - period;
409:       /* The two halves of needle are distinct; no extra memory is
412:       period = MAX (suffix, needle_len - suffix) + 1;
414:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
418:           shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
427:           while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
430:           if (needle_len - 1 <= i)
434:               while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
48:    constant space.  Additionally, for long needles, we also use a bad
58:    worthwhile.  Small needles should not compute a table, since it
119:      out 0-length needles.  */
github.com/apache/impala:be/src/experiments/string-search-sse.h: [ master, ]
157:   const StringValue* needle_str_val_;
158:   const char* needle_cstr_;
160:   int needle_len_;
35:   /// Create a search needle for *null-terminated strings*.  This is more
36:   /// efficient for searching and should be used if either the needle already
37:   /// happens to be null terminated or the needle will be reused repeatedly, in
39:   /// The caller owns the memory for the needle.
40:   StringSearchSSE(const char* needle) :
41:       needle_str_val_(NULL), needle_cstr_(needle) {
42:     needle_len_ = strlen(needle);
45:   /// Create a search needle from a non-null terminated string.  The caller
46:   /// owns the memory for the needle.
47:   StringSearchSSE(const StringValue* needle) :
48:       needle_str_val_(needle), needle_cstr_(NULL) {
49:     needle_len_ = needle->len;
52:   StringSearchSSE() : needle_str_val_(NULL), needle_cstr_(NULL), needle_len_(0) {}
54:   /// Search for needle in haystack.
55:   ///   Returns the offset into str if the needle exists
56:   ///   Returns -1 if the needle is not found
60:     if (UNLIKELY(haystack.len == 0 && needle_len_ == 0)) return 0;
62:     if (UNLIKELY(needle_len_ == 0)) return 0;
63:     if (UNLIKELY(haystack.len < needle_len_)) return -1;
71:     // Use strchr if needle_len_ is 1
72:     if (needle_len_ == 1) {
73:       char c = (needle_str_val_ == NULL) ? needle_cstr_[0] : needle_str_val_->ptr[0];
85:     // needle is null terminated.  We just need to run strstr on the
87:     // on the last needle_len chars.
88:     if (LIKELY(needle_cstr_ != NULL)) {
89:       char* s = strstr(haystack.ptr, needle_cstr_);
96:         // If we didn't find a match, try the last needle->len chars
97:         char* end = haystack.ptr + haystack.len - needle_len_;
99:         for (int i = 0; i < needle_len_; ++i) {
100:           if (LIKELY(end[i] != needle_cstr_[i])) {
105:         if (UNLIKELY(match)) result = haystack.len - needle_len_;
109:       // Needle is not null terminated.  Terminate it on the fly.
110:       const char last_char_needle = needle_str_val_->ptr[needle_len_ - 1];
111:       needle_str_val_->ptr[needle_len_ - 1] = '\0';
115:       while (offset <= haystack.len - needle_len_) {
116:         char* search = strstr(haystack_pos, needle_str_val_->ptr);
125:         //   needle = "abc"  (null terminated to "ab")
128:         if (offset == haystack.len - needle_len_) {
129:           if (last_char_needle == last_char_haystack) result = offset;
135:           if (search[needle_len_ - 1] == last_char_needle) {
149:       // Undo changes to needle
150:       needle_str_val_->ptr[needle_len_ - 1] = last_char_needle;
chromium.googlesource.com/native_client/nacl-newlib:newlib/libc/string/str-two-way.h: [ master, ] Duplicate result
github.com/google/supersonic:supersonic/expression/core/comparison_expressions.cc: [ master, ]
79:   const scoped_ptr<const Expression> needle_expression_;
50:   InExpressionSetExpression(const Expression* const needle_expression,
52:       : needle_expression_(needle_expression),
60:     FailureOrOwned<BoundExpression> bound_needle =
61:         needle_expression_->DoBind(input_schema, allocator, max_row_count);
62:     PROPAGATE_ON_FAILURE(bound_needle);
66:     return BoundInSet(bound_needle.release(),
73:     return StrCat(needle_expression_->ToString(verbose),
84: const Expression* In(const Expression* const needle_expression,
86:   return new InExpressionSetExpression(needle_expression, haystack_arguments);
github.com/emacs-mirror/emacs:lib/str-two-way.h: [ master, ]
235: two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
329: two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
65: # define LONG_NEEDLE_THRESHOLD 32U
67: # define LONG_NEEDLE_THRESHOLD SIZE_MAX
40:   LONG_NEEDLE_THRESHOLD.
59:    adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
60:    speedup no greater than a factor of NEEDLE_LEN.  The larger the
61:    needle, the better the potential performance gain.  On the other
81: /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
89:    When NEEDLE is factored into two halves, a local period is the
92:    non-empty NEEDLE have a local period of at least 1 and no greater
93:    than NEEDLE_LEN.
103:    in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
108: critical_factorization (const unsigned char *needle, size_t needle_len,
113:   size_t j; /* Index into NEEDLE for current candidate suffix.  */
118:   /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered
120:   if (needle_len < 3)
123:       return needle_len - 1;
127:      0 <= j < NEEDLE_LEN - 1
129:      min(max_suffix, max_suffix_rev) < global period of NEEDLE
130:      1 <= p <= global period of NEEDLE
131:      p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
139:   while (j + k < needle_len)
141:       a = CANON_ELEMENT (needle[j + k]);
142:       b = CANON_ELEMENT (needle[max_suffix + k]);
174:   while (j + k < needle_len)
176:       a = CANON_ELEMENT (needle[j + k]);
177:       b = CANON_ELEMENT (needle[max_suffix_rev + k]);
224: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
226:    method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
228:    of 2 * NEEDLE_LEN comparisons.
231:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
233:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.  */
236:                       const unsigned char *needle, size_t needle_len)
238:   size_t i; /* Index into current byte of NEEDLE.  */
240:   size_t period; /* The period of the right half of needle.  */
241:   size_t suffix; /* The index of the right half of needle.  */
243:   /* Factor the needle into two halves, such that the left half is
245:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
246:   suffix = critical_factorization (needle, needle_len, &period);
250:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
252:       /* Entire needle is periodic; a mismatch in the left half can
257:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
261:           while (i < needle_len && (CANON_ELEMENT (needle[i])
264:           if (needle_len <= i)
268:               while (memory < i + 1 && (CANON_ELEMENT (needle[i])
276:               memory = needle_len - period;
287:       /* The two halves of needle are distinct; no extra memory is
289:       period = MAX (suffix, needle_len - suffix) + 1;
291:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
295:           while (i < needle_len && (CANON_ELEMENT (needle[i])
298:           if (needle_len <= i)
302:               while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
316: /* Return the first location of non-empty NEEDLE within HAYSTACK, or
318:    method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
320:    of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
323:    most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
324:    and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
326:    HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
330:                      const unsigned char *needle, size_t needle_len)
332:   size_t i; /* Index into current byte of NEEDLE.  */
334:   size_t period; /* The period of the right half of needle.  */
335:   size_t suffix; /* The index of the right half of needle.  */
338:   /* Factor the needle into two halves, such that the left half is
340:      periodic (with a period as large as NEEDLE_LEN - suffix).  */
341:   suffix = critical_factorization (needle, needle_len, &period);
345:      the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
346:      shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0.  */
348:     shift_table[i] = needle_len;
349:   for (i = 0; i < needle_len; i++)
350:     shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
354:   if (CMP_FUNC (needle, needle + period, suffix) == 0)
356:       /* Entire needle is periodic; a mismatch in the left half can
362:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
366:           shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
371:                   /* Since needle is periodic, but the last period has
374:                   shift = needle_len - period;
383:           while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
386:           if (needle_len - 1 <= i)
390:               while (memory < i + 1 && (CANON_ELEMENT (needle[i])
398:               memory = needle_len - period;
409:       /* The two halves of needle are distinct; no extra memory is
412:       period = MAX (suffix, needle_len - suffix) + 1;
414:       while (AVAILABLE (haystack, haystack_len, j, needle_len))
418:           shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
427:           while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
430:           if (needle_len - 1 <= i)
434:               while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
48:    constant space.  Additionally, for long needles, we also use a bad
58:    worthwhile.  Small needles should not compute a table, since it
119:      out 0-length needles.  */
github.com/chromium/chromium:third_party/blink/perf_tests/speedometer/resources/main.css: [ master, ]
259: .gauge > .window > .needle {
chromium.googlesource.com/chromium/src:third_party/blink/perf_tests/speedometer/resources/main.css: [ master, ] Duplicate result
chromium.googlesource.com/ios-chromium-mirror:third_party/blink/perf_tests/speedometer/resources/main.css: [ master, ] Duplicate result
github.com/google/mysql-protobuf:unittest/gunit/item_like-t.cc: [ mysql-5.7.9, ]
104:   const char *m_needle;
121:   const char *m_needle;
124: static const char *needles[] = {
218: static const char* falseNeedles[] = {
60:   const char needle[]= "%ACAGGTGCTGGAGAGGATGCGGAGAAATAGGAACA%" ;
62:   Item_string *it_needle=
63:     new Item_string(STRING_WITH_LEN(needle), &my_charset_latin1);
65:     new Item_func_like(it_haystack, it_needle, it_escape, false);
78:   const char needle[]= "%CAAAACCACTATGAGATATCATCTCACACCAGTTA%";
79:   Item_string *it_needle=
80:     new Item_string(STRING_WITH_LEN(needle), &my_charset_latin1);
83:     new Item_func_like(it_haystack, it_needle, it_escape, false);
97:     m_needle= GetParam();
114:     m_needle= GetParam();
207:   Item_string *it_needle=
208:     new Item_string(m_needle, strlen(m_needle), &my_charset_latin1);
213:     new Item_func_like(it_haystack, it_needle, it_escape, false);
296:   Item_string *it_needle=
297:     new Item_string(m_needle, strlen(m_needle), &my_charset_latin1);
302:     new Item_func_like(it_haystack, it_needle, it_escape, false);
200:                         ::testing::ValuesIn(needles));
199: INSTANTIATE_TEST_CASE_P(MoreNeedles, ItemLikeTestP,
203: TEST_P(ItemLikeTestP, MoreNeedlesTest)
289: INSTANTIATE_TEST_CASE_P(FalseNeedlesTest, ItemFalseLikeTestP,
290:                         ::testing::ValuesIn(falseNeedles));
292: TEST_P(ItemFalseLikeTestP,FalseNeedlesTest)
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java: [ master, ]
47:     private static final String EXPECTED_HTML_NEEDLE = "http://www.example.com/";
104:                 Assert.assertTrue(htmlText.contains(EXPECTED_HTML_NEEDLE));
chromium.googlesource.com/chromium/src/third_party:blink/perf_tests/speedometer/resources/main.css: [ master, ] Duplicate result