Search some code: Max results:

Found 17926 results in 4468 files (5853KB index data, 26544 ngram matches, 6319 docs considered, 5835 docs (175MB) loaded, 448 docs skipped): for
substr:"needle" with options &zoekt.SearchOptions{EstimateDocCount:false, Whole:false, ShardMaxMatchCount:250, TotalMaxMatchCount:1000000, ShardMaxImportantMatch:2, TotalMaxImportantMatch:100, MaxWallTime:10000000000}
in 985.587441ms (queued: 2.423┬Ás)

eclipse.googlesource.com/jgit/jgit:org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java:[master, ] lang:java

59: 	private final byte[] needle;
57: 	private final String needleString;
75: 		needle = new byte[b.length];
77: 			needle[i] = lc(b[i]);
91: 		final int needleLen = needle.length;
92: 		final byte first = needle[0];
109: 				if (neq(needle[j], text[si]))
72: 		needleString = patternText;
96: 		final int maxPos = rcs.endPtr - needleLen;
108: 			for (int j = 1; j < needleLen; j++, si++) {
131: 		return needleString;
github.com/html5rocks/www.html5rocks.com:static/demos/lemdoodle/examples/lem-embedded/lem-const.js:[master, ] lang:javascript
172:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
223:     'needle', 'halo', 'noodles', 'neutron', 'nose'
github.com/src-d/kmcuda:src/test.R:[develop, ] lang:r
96:     needle <- "--file="
97:     match <- grep(needle, cmdArgs)
99:       return(normalizePath(sub(needle, "", cmdArgs[match])))
github.com/googlearchive/chrome-app-samples:samples/text-editor/lib/ace/mode/text.js:[master, ] lang:javascript
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))
github.com/GoogleChrome/chrome-app-samples:samples/text-editor/lib/ace/mode/text.js:[master, ] lang:javascript
duplicate result
chromium.googlesource.com/native_client/nacl-toolchain:newlib/newlib/libc/string/memmem.c:[master, ] lang:c
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, ] lang:c
duplicate result
github.com/GoogleChrome/chrome-app-samples:samples/text-editor/lib/ace/editor_highlight_selected_word_test.js:[master, ] lang:javascript
139:             needle: "Mauris"
194:             needle: "consectetur"
github.com/googlearchive/chrome-app-samples:samples/text-editor/lib/ace/editor_highlight_selected_word_test.js:[master, ] lang:javascript
duplicate result
chromium.googlesource.com/chromium:sync/syncable/directory.h:[trunk, ] lang:c++
536:     EntryKernel needle;
535:     // look something up in an index.  Needle in haystack metaphor.
chromium.googlesource.com/native_client/nacl-newlib:newlib/libc/string/memmem.c:[master, ] lang:c
duplicate result
android.googlesource.com/platform/external/qt:Windows-4.7.4/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp:[master, ] lang:c++
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/GoogleCloudPlatform/appengine-php:php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:[master, ] lang:c
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/external/chromium:chrome/browser/sync/syncable/syncable.h:[master, ] lang:c++
1002:     EntryKernel needle;
1001:     // look something up in an index.  Needle in haystack metaphor.
github.com/fuchsia-mirror/third_party-rust-crates:vendor/memchr-1.0.1/src/lib.rs:[master, ] lang:rust
68:     needle: u8,
233:     needle1: u8,
234:     needle2: u8,
307:     needle1: u8,
308:     needle2: u8,
309:     needle3: u8,
77:     /// Creates a new iterator that yields all positions of needle in haystack.
78:     pub fn new(needle: u8, haystack: &[u8]) -> Memchr {
80:             needle: needle,
92:         let search_result = memchr(self.needle, &self.haystack);
107:         let search_result = memrchr(self.needle, &self.haystack);
127: /// Returns the index corresponding to the first occurrence of `needle` in
131: /// magnitude faster than `haystack.iter().position(|&b| b == needle)`.
145: pub fn memchr(needle: u8, haystack: &[u8]) -> Option<usize> {
151:     fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
156:                         needle as c_int,
170:     fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
171:         fallback::memchr(needle, haystack)
174:     memchr_specific(needle, haystack)
179: /// Returns the index corresponding to the last occurrence of `needle` in
193: pub fn memrchr(needle: u8, haystack: &[u8]) -> Option<usize> {
197:     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
204:                           needle as c_int,
216:     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
217:         fallback::memrchr(needle, haystack)
224:     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
225:         haystack.iter().rposition(|&b| b == needle)
228:     memrchr_specific(needle, haystack)
242:     /// Creates a new iterator that yields all positions of needle in haystack.
243:     pub fn new(needle1: u8, needle2: u8, haystack: &[u8]) -> Memchr2 {
245:             needle1: needle1,
246:             needle2: needle2,
257:         let search_result = memchr2(self.needle1, self.needle2, &self.haystack);
272: pub fn memchr2(needle1: u8, needle2: u8, haystack: &[u8]) -> Option<usize> {
283:         if let Some(found) = slow(needle1, needle2, &haystack[..i]) {
287:     let repeated_b1 = repeat_byte(needle1);
288:     let repeated_b2 = repeat_byte(needle2);
302:     slow(needle1, needle2, &haystack[i..]).map(|pos| i + pos)
318:     pub fn new(needle1: u8, needle2: u8, needle3: u8, haystack: &[u8]) -> Memchr3 {
320:             needle1: needle1,
321:             needle2: needle2,
322:             needle3: needle3,
333:         let search_result = memchr3(self.needle1, self.needle2, self.needle3, &self.haystack);
347: pub fn memchr3(needle1: u8, needle2: u8, needle3: u8, haystack: &[u8]) -> Option<usize> {
358:         if let Some(found) = slow(needle1, needle2, needle3, &haystack[..i]) {
362:     let repeated_b1 = repeat_byte(needle1);
363:     let repeated_b2 = repeat_byte(needle2);
364:     let repeated_b3 = repeat_byte(needle3);
379:     slow(needle1, needle2, needle3, &haystack[i..]).map(|pos| i + pos)
537:                 fn prop(needle: u8, haystack: Vec<u8>) -> bool {
538:                     $memchr(needle, &haystack); true
580:                 fn prop(needle: u8, haystack: Vec<u8>) -> bool {
581:                     $memrchr(needle, &haystack); true
679:         fn prop(needle1: u8, needle2: u8, haystack: Vec<u8>) -> bool {
680:             memchr2(needle1, needle2, &haystack);
804:         fn prop(needle1: u8, needle2: u8, needle3: u8, haystack: Vec<u8>) -> bool {
805:             memchr3(needle1, needle2, needle3, &haystack);
chromium.googlesource.com/arc/arc:third_party/android/external/chromium/chrome/browser/sync/syncable/syncable.h:[master, ] lang:c++
duplicate result
github.com/fuchsia-mirror/third_party-cmake:Source/cmTarget.cxx:[master, ] lang:c++
568:   const cmSourceFileLocation& Needle;
584:   const cmSourceFileLocation& Needle;
570:   LocationMatcher(const cmSourceFileLocation& needle)
571:     : Needle(needle)
577:     return loc.Matches(this->Needle);
587:   TargetPropertyEntryFinder(const cmSourceFileLocation& needle)
588:     : Needle(needle)
599:                    CreateLocation(this->Needle.GetMakefile()));
602:                         LocationMatcher(this->Needle)) != locations.end();
android.googlesource.com/platform/superproject:external/clang/lib/Sema/AnalysisBasedWarnings.cpp:[master, ] lang:c++
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)
github.com/yeoman/generator-angular:route/index.js:[master, ] lang:javascript
63:     needle: '.otherwise',
github.com/html5rocks/www.html5rocks.com:content/tutorials/doodles/lem/static/code/lem-const.js:[master, ] lang:javascript
185:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
236:     'needle', 'halo', 'noodles', 'neutron', 'nose'
github.com/google/rekall:rekall-core/rekall/scan.py:[master, ] lang:python
163:     needle = None
164:     needle_offset = None
539:     needles = []
55:         """Is the needle found at 'offset'?
59:             checked for the needle.
166:     def __init__(self, needle=None, needle_offset=0, **kwargs):
168:         self.needle = needle
169:         self.needle_offset = needle_offset
173:         buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
174:         if buffer_as.data.startswith(self.needle, buffer_offset):
175:             return self.needle
178:         # Search the rest of the buffer for the needle.
179:         buffer_offset = buffer_as.get_buffer_offset(offset) + self.needle_offset
180:         dindex = buffer_as.data.find(self.needle, buffer_offset + 1)
531:             yield ("StringCheck", dict(needle=expected_bytes,
532:                                        needle_offset=rel_offset + array_offset))
552:                 needle=self.needles[0])
92:     def __init__(self, needles=None, **kwargs):
96:           needles: A list of strings we search for.
99:           RuntimeError: No needles provided.
105:         if not needles:
106:             raise RuntimeError("No needles provided to search.")
110:         if max([len(x) for x in needles]) > 50:
113:         tree = acora.AcoraBuilder(*needles)
538:     # Override with the needles to check for.
541:     def __init__(self, needles=None, **kwargs):
543:         if needles is not None:
544:             self.needles = needles
549:         if len(needles) == 1:
556:                 needles=self.needles)
586:         self.needles = []
594:             self.needles.append(tmp.obj_vm.read(0, tmp.obj_size))
596:         # The common string between all the needles.
598:             ("MultiStringFinderCheck", dict(needles=self.needles)),
android.googlesource.com/platform/external/clang_35a:lib/Sema/AnalysisBasedWarnings.cpp:[master, ] lang:c++
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)
chromium.googlesource.com/native_client/pnacl-clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ] lang:c++
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)
github.com/fuchsia-mirror/third_party-clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ] lang:c++
777:   const DeclRefExpr *Needle;
773: /// a particular declaration (the needle) within any evaluated component of an
782:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
783:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
794:     if (E == Needle)
github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ] lang:c++
duplicate result
android.googlesource.com/platform/external/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ] lang:c++
duplicate result
github.com/fuchsia-mirror/third_party-rust:src/libcore/str/pattern.rs:[master, ] lang:rust
576:     needle: &'b str,
588: struct EmptyNeedle {
596:     fn new(haystack: &'a str, needle: &'b str) -> StrSearcher<'a, 'b> {
597:         if needle.is_empty() {
600:                 needle,
611:                 needle,
613:                     TwoWaySearcher::new(needle.as_bytes(), haystack.len())
630:                 // empty needle rejects every char and matches every empty string between them
645:                 // as long as it does correct matching and that haystack and needle are
654:                                                       self.needle.as_bytes(),
689:                                                self.needle.as_bytes(),
693:                                                self.needle.as_bytes(),
724:                                                            self.needle.as_bytes(),
758:                                                     self.needle.as_bytes(),
762:                                                     self.needle.as_bytes(),
776:     /// critical factorization index for reversed needle
781:     /// to a (byte & 63) == j present in the needle.
787:     /// index into needle before which we have already matched
789:     /// index into needle after which we have already matched
867:     fn new(needle: &[u8], end: usize) -> TwoWaySearcher {
868:         let (crit_pos_false, period_false) = TwoWaySearcher::maximal_suffix(needle, false);
869:         let (crit_pos_true, period_true) = TwoWaySearcher::maximal_suffix(needle, true);
883:         // needle, and we want to determine whether u is a suffix of
885:         // "Algorithm CP2", which is optimized for when the period of the needle
887:         if &needle[..crit_pos] == &needle[period.. period + crit_pos] {
889:             // compute a separate critical factorization for the reversed needle
897:             let crit_pos_back = needle.len() - cmp::max(
898:                 TwoWaySearcher::reverse_maximal_suffix(needle, period, false),
899:                 TwoWaySearcher::reverse_maximal_suffix(needle, period, true));
905:                 byteset: Self::byteset_create(&needle[..period]),
910:                 memory_back: needle.len(),
923:                 period: cmp::max(crit_pos, needle.len() - crit_pos) + 1,
924:                 byteset: Self::byteset_create(needle),
944:     // One of the main ideas of Two-Way is that we factorize the needle into
948:     // that (u, v) is a critical factorization for the needle.
950:     fn next<S>(&mut self, haystack: &[u8], needle: &[u8], long_period: bool)
956:         let needle_last = needle.len() - 1;
959:             // position + needle_last can not overflow if we assume slices
961:             let tail_byte = match haystack.get(self.position + needle_last) {
975:                 self.position += needle.len();
982:             // See if the right part of the needle matches
985:             for i in start..needle.len() {
986:                 if needle[i] != haystack[self.position + i] {
995:             // See if the left part of the needle matches
998:                 if needle[i] != haystack[self.position + i] {
1001:                         self.memory = needle.len() - self.period;
1010:             // Note: add self.period instead of needle.len() to have overlapping matches
1011:             self.position += needle.len();
1013:                 self.memory = 0; // set to needle.len() - self.period for overlapping matches
1016:             return S::matching(match_pos, match_pos + needle.len());
1031:     // a reversed haystack with a reversed needle, matching first u' and then v'.
1033:     fn next_back<S>(&mut self, haystack: &[u8], needle: &[u8], long_period: bool)
1042:             // end - needle.len() will wrap around when there is no more room,
1045:             let front_byte = match haystack.get(self.end.wrapping_sub(needle.len())) {
1059:                 self.end -= needle.len();
1061:                     self.memory_back = needle.len();
1066:             // See if the left part of the needle matches
1070:                 if needle[i] != haystack[self.end - needle.len() + i] {
1073:                         self.memory_back = needle.len();
1079:             // See if the right part of the needle matches
1080:             let needle_end = if long_period { needle.len() }
1082:             for i in self.crit_pos_back..needle_end {
1083:                 if needle[i] != haystack[self.end - needle.len() + i] {
1093:             let match_pos = self.end - needle.len();
1094:             // Note: sub self.period instead of needle.len() to have overlapping matches
1095:             self.end -= needle.len();
1097:                 self.memory_back = needle.len();
1100:             return S::matching(match_pos, match_pos + needle.len());
583:     Empty(EmptyNeedle),
601:                 searcher: StrSearcherImpl::Empty(EmptyNeedle {
android.googlesource.com/platform/external/qt:Mac-4.7.4/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp:[master, ] lang:c++
129:     const QString needle;
128:     inline KeywordHelper(const QString &word) : needle(word) {}
134:     return helper.needle < QLatin1String(kw);
139:     return QLatin1String(kw) < helper.needle;
android.googlesource.com/platform/external/opencv3:modules/cudalegacy/src/cuda/needle_map.cu:[master, ] lang:cuda
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, float max_flow, float xscale, float yscale)
207:         void CreateOpticalFlowNeedleMap_gpu(PtrStepSzf u_avg, PtrStepSzf v_avg, float* vertex_buffer, float* color_data, float max_flow, float xscale, float yscale)
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);
github.com/hanwen/artisjokke:needle2d/artisjokke-drawer2.hh:[master, ] lang:c++
12:   Needle_inserter * needle_inserter_;
6: #include "needle-inserter.hh"
18:   virtual void set_needle ();
20:   virtual void draw_needle ();
github.com/hanwen/artisjokke:needle2d/artisjokke-drawer2.cc:[master, ] lang:c++
12: float needle_color [] = {1,0,0};
69: Artisjokke_drawer2::set_needle()
104: Artisjokke_drawer2::draw_needle()
23: 		needle_inserter_,
29: 		needle_inserter_,
41: 			   needle_inserter_,
47: 			   needle_inserter_,
58:   this->needle_inserter_ =0; 
71:   if (!needle_inserter_->live())
74:   Vector3 needle_handle_;
75:   Vector3 needle_tip_;
77:   needle_handle_.set (-1.0,0.073,0.0);
78:   Vector3 needle_dir = Vector3 (0.99,0,0);
81:   build_rotmatrix (om, needle_drag_.quat_);
86:   Real fact = pow (2, needle_drag_.scale_(0));
93:   needle_dir *= fact;
94:   //  needle_dir = m * needle_dir;
96:   needle_handle_ = needle_handle_ + (needle_drag_. translate_)*0.10;
97:   needle_tip_ = needle_handle_ + needle_dir;
99:   needle_inserter_->move_needle (needle_handle_, needle_tip_);
106:   set_color (needle_color);
110:   Vector3 t= needle_inserter_->tip ();
111:   Vector3 h= needle_inserter_->handle ();
github.com/google/mysql-protobuf:unittest/gunit/item_like-t.cc:[mysql-5.7.9, ] lang:c++
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/chromium/codesearch:src/content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java:[master, ] lang:java
46:     private static final String EXPECTED_HTML_NEEDLE = "http://www.example.com/";
102:                 Assert.assertTrue(htmlText.contains(EXPECTED_HTML_NEEDLE));
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java:[master, ] lang:java
33:     private static final String EXPECTED_HTML_NEEDLE = "http://www.example.com/";
78:         assertTrue(htmlText.contains(EXPECTED_HTML_NEEDLE));
github.com/google/coursebuilder-android-container-module:android/worker.py:[master, ] lang:python
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():
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/third_party/WebKit/PerformanceTests/Speedometer/resources/main.css:[master, ] lang:css
259: .gauge > .window > .needle {
chromium.googlesource.com/chromium/codesearch:src/third_party/WebKit/PerformanceTests/Speedometer/resources/main.css:[master, ] lang:css
duplicate result
chromium.googlesource.com/experimental/src-pruned-refs:content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java:[master, ] lang:java
36:     private static final String EXPECTED_HTML_NEEDLE = "http://www.example.com/";
90:             assertTrue(htmlText.contains(EXPECTED_HTML_NEEDLE));
chromium.googlesource.com/chromium/chromium:content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java:[trunk, ] lang:java
35:     private static final String EXPECTED_HTML_NEEDLE = "http://www.example.com/";
88:             assertTrue(htmlText.contains(EXPECTED_HTML_NEEDLE));
chromium.googlesource.com/chromium/src:content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java:[master, ] lang:java
duplicate result
chromium.googlesource.com/ios-chromium-mirror:content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java:[master, ] lang:java
duplicate result
chromium.googlesource.com/native_client/nacl-toolchain:newlib/newlib/libc/string/str-two-way.h:[master, ] lang:c++
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
android.googlesource.com/platform/external/chromium_org:content/public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java:[master, ] lang:java
36:     private static final String EXPECTED_HTML_NEEDLE = "http://www.example.com/";
90:             assertTrue(htmlText.contains(EXPECTED_HTML_NEEDLE));
chromium.googlesource.com/ios-chromium-mirror:third_party/WebKit/PerformanceTests/Speedometer/resources/main.css:[master, ] lang:css
duplicate result
chromium.googlesource.com/chromium/src:third_party/WebKit/PerformanceTests/Speedometer/resources/main.css:[master, ] lang:css
duplicate result
chromium.googlesource.com/native_client/nacl-newlib:newlib/libc/string/str-two-way.h:[master, ] lang:c++
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-glibc:string/str-two-way.h:[master, ] lang:c++
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
github.com/google/supersonic:supersonic/expression/core/comparison_expressions.cc:[master, ] lang:c++
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/google/coursebuilder-core:coursebuilder/modules/gitkit/gitkit.py:[master, ] lang:python
150: _BAD_CRYPTO_NEEDLE = 'PKCS12 format is not supported by the PyCrypto library'
627:             if _BAD_CRYPTO_NEEDLE in e.message:
github.com/google/supersonic:supersonic/expression/core/comparison_bound_expressions.cc:[master, ] lang:c++
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(),