Search some code: Max results:

Found 8826 results in 2116 files (14498 ngram matches, 3408 docs considered, 3096 docs (74MB) loaded, 298 docs skipped): for
substr:"needle" with options &zoekt.SearchOptions{EstimateDocCount:false, Whole:false, ShardMaxMatchCount:250, TotalMaxMatchCount:1000000, ShardMaxImportantMatch:2, TotalMaxImportantMatch:100, MaxWallTime:10000000000}
in 463.912453ms (queued: 2.228┬Ás)

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

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, ]
172:   'needle': ['intro-finale/items-needle-thread', 'intro-finale/items-needle'],
223:     'needle', 'halo', 'noodles', 'neutron', 'nose'
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))
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/google/DirectXShaderCompiler:tools/clang/lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
578:   const DeclRefExpr *Needle;
574: /// a particular declaration (the needle) within any evaluated component of an
583:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
584:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
595:     if (E == Needle)
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/external/chromium:chrome/browser/sync/syncable/syncable.h:[master, ]
1002:     EntryKernel needle;
1001:     // look something up in an index.  Needle in haystack metaphor.
github.com/fuchsia-mirror/third_party-cmake:Source/cmTarget.cxx:[master, ]
565:   const cmSourceFileLocation& Needle;
581:   const cmSourceFileLocation& Needle;
567:   LocationMatcher(const cmSourceFileLocation& needle)
568:     : Needle(needle)
574:     return loc.Matches(this->Needle);
584:   TargetPropertyEntryFinder(const cmSourceFileLocation& needle)
585:     : Needle(needle)
595:                    CreateLocation(this->Needle.GetMakefile()));
598:                         LocationMatcher(this->Needle)) != locations.end();
github.com/yeoman/generator-angular:route/index.js:[master, ]
63:     needle: '.otherwise',
github.com/html5rocks/www.html5rocks.com:content/tutorials/doodles/lem/static/code/lem-const.js:[master, ]
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, ]
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, ]
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)
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)
github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
618:   const DeclRefExpr *Needle;
614: /// a particular declaration (the needle) within any evaluated component of an
623:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
624:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
635:     if (E == Needle)
github.com/fuchsia-mirror/third_party-clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
618:   const DeclRefExpr *Needle;
614: /// a particular declaration (the needle) within any evaluated component of an
623:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
624:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
635:     if (E == Needle)
github.com/hanwen/artisjokke:needle2d/artisjokke-drawer2.hh:[master, ]
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, ]
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, ]
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)
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/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/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/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/fuchsia-mirror/third_party-binutils-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/fuchsia-mirror/third_party-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/fuchsia-mirror/third_party-ffmpeg:libavfilter/vf_find_rect.c:[master, ]
42:     AVFrame *needle_frame[MAX_MIPMAPS];
171:             float score = compare(foc->haystack_frame[pass], foc->needle_frame[pass], x, y);
234:         av_frame_free(&foc->needle_frame[i]);
267:     foc->needle_frame[0] = av_frame_clone(foc->obj_frame);
269:         foc->needle_frame[i] = downscale(foc->needle_frame[i-1]);
270:         if (!foc->needle_frame[i])
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/vanadium/travel:browser/mocks/google-maps.js:[master, ]
32:   SPACE_NEEDLE: {
github.com/gwtproject/gwt:user/test/com/google/gwt/uibinder/test/client/NeedlesslyAnnotatedLabel.java:[master, ]
25: public class NeedlesslyAnnotatedLabel extends Label {
26:   @UiConstructor public NeedlesslyAnnotatedLabel() {
github.com/gwtproject/gwt:user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java:[master, ]
144:   @UiField NeedlesslyAnnotatedLabel needlessLabel;
github.com/google/beautiful-audio-editor:third_party/closure_library/closure/goog/ui/gauge.js:[master, ]
405: goog.ui.Gauge.prototype.needleRadius_ = 0;
414: goog.ui.Gauge.prototype.needleGroup_ = null;
423: goog.ui.Gauge.prototype.needleValuePosition_ = null;
81:  * ticks and labels inside the internal border, and a needle that points to
190:  * The length of the needle front (value facing) from the internal radius.
191:  * The needle front is the part of the needle that points to the value.
194: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
198:  * The length of the needle back relative to the internal radius.
199:  * The needle back is the part of the needle that points away from the value.
202: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
206:  * The width of the needle front at the hinge.
211: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
215:  * The width (radius) of the needle hinge from the gauge radius.
218: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
265:  * The maximal size of a step the needle can move (percent from size of range).
266:  * If the needle needs to move more, it will be moved in animated steps, to
270: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
277: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
399:  * The radius for drawing the needle.
401:  * the needle.
409:  * The group elemnt of the needle. Contains all elements that change when the
418:  * The current position (0-1) of the visible needle.
435:  * Animation object while needle is being moved (animated).
488:  *     determines the position of the needle of the gauge.
508:         goog.ui.Gauge.NEEDLE_MOVE_TIME,
792:   // Draw the needle and the value label. Stop animation when doing
889:  * Draw the elements that depend on the current value (the needle and
907:   // Compute the needle path
909:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
911:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
917:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
934:   // Draw the needle hinge
935:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
937:   // Clean previous needle
962:   // Draw the needle
500:   if (this.needleValuePosition_ == null) {
502:     this.needleValuePosition_ = valuePosition;
506:     this.animation_ = new goog.fx.Animation([this.needleValuePosition_],
635:   this.needleGroup_ = null;
796:   this.needleRadius_ = r;
807:   this.needleValuePosition_ = e.x;
899:   var r = this.needleRadius_;
905:       /** @type {number} */(this.needleValuePosition_));
938:   var needleGroup = this.needleGroup_;
939:   if (needleGroup) {
940:     needleGroup.clear();
942:     needleGroup = this.needleGroup_ = graphics.createGroup();
959:         'center', font, null, fill, needleGroup);
965:   graphics.drawPath(path, stroke, fill, needleGroup);
968:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1009:   delete this.needleGroup_;
963:   var stroke = theme.getNeedleStroke();
964:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/karma-runner/karma-closure:test-app/lib/goog/ui/gauge.js:[master, ]
403: goog.ui.Gauge.prototype.needleRadius_ = 0;
412: goog.ui.Gauge.prototype.needleGroup_ = null;
421: goog.ui.Gauge.prototype.needleValuePosition_ = null;
80:  * ticks and labels inside the internal border, and a needle that points to
188:  * The length of the needle front (value facing) from the internal radius.
189:  * The needle front is the part of the needle that points to the value.
192: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
196:  * The length of the needle back relative to the internal radius.
197:  * The needle back is the part of the needle that points away from the value.
200: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
204:  * The width of the needle front at the hinge.
209: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
213:  * The width (radius) of the needle hinge from the gauge radius.
216: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
263:  * The maximal size of a step the needle can move (percent from size of range).
264:  * If the needle needs to move more, it will be moved in animated steps, to
268: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
275: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
397:  * The radius for drawing the needle.
399:  * the needle.
407:  * The group elemnt of the needle. Contains all elements that change when the
416:  * The current position (0-1) of the visible needle.
433:  * Animation object while needle is being moved (animated).
486:  *     determines the position of the needle of the gauge.
506:         goog.ui.Gauge.NEEDLE_MOVE_TIME,
790:   // Draw the needle and the value label. Stop animation when doing
887:  * Draw the elements that depend on the current value (the needle and
905:   // Compute the needle path
907:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
909:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
915:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
932:   // Draw the needle hinge
933:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
935:   // Clean previous needle
960:   // Draw the needle
498:   if (this.needleValuePosition_ == null) {
500:     this.needleValuePosition_ = valuePosition;
504:     this.animation_ = new goog.fx.Animation([this.needleValuePosition_],
633:   this.needleGroup_ = null;
794:   this.needleRadius_ = r;
805:   this.needleValuePosition_ = e.x;
897:   var r = this.needleRadius_;
903:       /** @type {number} */(this.needleValuePosition_));
936:   var needleGroup = this.needleGroup_;
937:   if (needleGroup) {
938:     needleGroup.clear();
940:     needleGroup = this.needleGroup_ = graphics.createGroup();
957:         'center', font, null, fill, needleGroup);
963:   graphics.drawPath(path, stroke, fill, needleGroup);
966:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1007:   delete this.needleGroup_;
961:   var stroke = theme.getNeedleStroke();
962:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/google/crisis-info-hub:closure-library/closure/goog/ui/gauge.js:[master, ]
405: goog.ui.Gauge.prototype.needleRadius_ = 0;
414: goog.ui.Gauge.prototype.needleGroup_ = null;
423: goog.ui.Gauge.prototype.needleValuePosition_ = null;
81:  * ticks and labels inside the internal border, and a needle that points to
190:  * The length of the needle front (value facing) from the internal radius.
191:  * The needle front is the part of the needle that points to the value.
194: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
198:  * The length of the needle back relative to the internal radius.
199:  * The needle back is the part of the needle that points away from the value.
202: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
206:  * The width of the needle front at the hinge.
211: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
215:  * The width (radius) of the needle hinge from the gauge radius.
218: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
265:  * The maximal size of a step the needle can move (percent from size of range).
266:  * If the needle needs to move more, it will be moved in animated steps, to
270: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
277: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
399:  * The radius for drawing the needle.
401:  * the needle.
409:  * The group elemnt of the needle. Contains all elements that change when the
418:  * The current position (0-1) of the visible needle.
435:  * Animation object while needle is being moved (animated).
488:  *     determines the position of the needle of the gauge.
508:         goog.ui.Gauge.NEEDLE_MOVE_TIME,
792:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
908:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
910:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
916:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
933:   // Draw the needle hinge
934:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
936:   // Clean previous needle
961:   // Draw the needle
500:   if (this.needleValuePosition_ == null) {
502:     this.needleValuePosition_ = valuePosition;
506:     this.animation_ = new goog.fx.Animation([this.needleValuePosition_],
635:   this.needleGroup_ = null;
795:   this.needleRadius_ = r;
806:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */(this.needleValuePosition_));
937:   var needleGroup = this.needleGroup_;
938:   if (needleGroup) {
939:     needleGroup.clear();
941:     needleGroup = this.needleGroup_ = graphics.createGroup();
958:         'center', font, null, fill, needleGroup);
964:   graphics.drawPath(path, stroke, fill, needleGroup);
967:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1008:   delete this.needleGroup_;
962:   var stroke = theme.getNeedleStroke();
963:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/google/closure-library:closure/goog/ui/gauge.js:[master, ]
406: goog.ui.Gauge.prototype.needleRadius_ = 0;
415: goog.ui.Gauge.prototype.needleGroup_ = null;
424: goog.ui.Gauge.prototype.needleValuePosition_ = null;
82:  * ticks and labels inside the internal border, and a needle that points to
191:  * The length of the needle front (value facing) from the internal radius.
192:  * The needle front is the part of the needle that points to the value.
195: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
199:  * The length of the needle back relative to the internal radius.
200:  * The needle back is the part of the needle that points away from the value.
203: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
207:  * The width of the needle front at the hinge.
212: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
216:  * The width (radius) of the needle hinge from the gauge radius.
219: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
266:  * The maximal size of a step the needle can move (percent from size of range).
267:  * If the needle needs to move more, it will be moved in animated steps, to
271: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
278: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
400:  * The radius for drawing the needle.
402:  * the needle.
410:  * The group elemnt of the needle. Contains all elements that change when the
419:  * The current position (0-1) of the visible needle.
436:  * Animation object while needle is being moved (animated).
489:  *     determines the position of the needle of the gauge.
509:         goog.ui.Gauge.NEEDLE_MOVE_TIME, goog.fx.easing.inAndOut);
794:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
907:   var frontRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
908:   var backRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
914:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
931:   // Draw the needle hinge
932:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
934:   // Clean previous needle
958:   // Draw the needle
501:   if (this.needleValuePosition_ == null) {
503:     this.needleValuePosition_ = valuePosition;
508:         [this.needleValuePosition_], [valuePosition],
639:   this.needleGroup_ = null;
797:   this.needleRadius_ = r;
808:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */ (this.needleValuePosition_));
935:   var needleGroup = this.needleGroup_;
936:   if (needleGroup) {
937:     needleGroup.clear();
939:     needleGroup = this.needleGroup_ = graphics.createGroup();
955:         needleGroup);
961:   graphics.drawPath(path, stroke, fill, needleGroup);
964:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1005:   delete this.needleGroup_;
959:   var stroke = theme.getNeedleStroke();
960:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/GoogleCloudPlatform/PerfKitExplorer:lib/closure-library/closure/goog/ui/gauge.js:[master, ]
406: goog.ui.Gauge.prototype.needleRadius_ = 0;
415: goog.ui.Gauge.prototype.needleGroup_ = null;
424: goog.ui.Gauge.prototype.needleValuePosition_ = null;
82:  * ticks and labels inside the internal border, and a needle that points to
191:  * The length of the needle front (value facing) from the internal radius.
192:  * The needle front is the part of the needle that points to the value.
195: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
199:  * The length of the needle back relative to the internal radius.
200:  * The needle back is the part of the needle that points away from the value.
203: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
207:  * The width of the needle front at the hinge.
212: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
216:  * The width (radius) of the needle hinge from the gauge radius.
219: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
266:  * The maximal size of a step the needle can move (percent from size of range).
267:  * If the needle needs to move more, it will be moved in animated steps, to
271: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
278: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
400:  * The radius for drawing the needle.
402:  * the needle.
410:  * The group elemnt of the needle. Contains all elements that change when the
419:  * The current position (0-1) of the visible needle.
436:  * Animation object while needle is being moved (animated).
489:  *     determines the position of the needle of the gauge.
509:         goog.ui.Gauge.NEEDLE_MOVE_TIME, goog.fx.easing.inAndOut);
794:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
907:   var frontRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
908:   var backRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
914:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
931:   // Draw the needle hinge
932:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
934:   // Clean previous needle
958:   // Draw the needle
501:   if (this.needleValuePosition_ == null) {
503:     this.needleValuePosition_ = valuePosition;
508:         [this.needleValuePosition_], [valuePosition],
639:   this.needleGroup_ = null;
797:   this.needleRadius_ = r;
808:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */ (this.needleValuePosition_));
935:   var needleGroup = this.needleGroup_;
936:   if (needleGroup) {
937:     needleGroup.clear();
939:     needleGroup = this.needleGroup_ = graphics.createGroup();
955:         needleGroup);
961:   graphics.drawPath(path, stroke, fill, needleGroup);
964:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1005:   delete this.needleGroup_;
959:   var stroke = theme.getNeedleStroke();
960:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/GoogleChrome/accessibility-developer-tools:lib/closure-library/closure/goog/ui/gauge.js:[master, ]
406: goog.ui.Gauge.prototype.needleRadius_ = 0;
415: goog.ui.Gauge.prototype.needleGroup_ = null;
424: goog.ui.Gauge.prototype.needleValuePosition_ = null;
82:  * ticks and labels inside the internal border, and a needle that points to
191:  * The length of the needle front (value facing) from the internal radius.
192:  * The needle front is the part of the needle that points to the value.
195: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
199:  * The length of the needle back relative to the internal radius.
200:  * The needle back is the part of the needle that points away from the value.
203: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
207:  * The width of the needle front at the hinge.
212: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
216:  * The width (radius) of the needle hinge from the gauge radius.
219: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
266:  * The maximal size of a step the needle can move (percent from size of range).
267:  * If the needle needs to move more, it will be moved in animated steps, to
271: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
278: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
400:  * The radius for drawing the needle.
402:  * the needle.
410:  * The group elemnt of the needle. Contains all elements that change when the
419:  * The current position (0-1) of the visible needle.
436:  * Animation object while needle is being moved (animated).
489:  *     determines the position of the needle of the gauge.
509:         goog.ui.Gauge.NEEDLE_MOVE_TIME, goog.fx.easing.inAndOut);
794:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
907:   var frontRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
908:   var backRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
914:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
931:   // Draw the needle hinge
932:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
934:   // Clean previous needle
958:   // Draw the needle
501:   if (this.needleValuePosition_ == null) {
503:     this.needleValuePosition_ = valuePosition;
508:         [this.needleValuePosition_], [valuePosition],
639:   this.needleGroup_ = null;
797:   this.needleRadius_ = r;
808:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */ (this.needleValuePosition_));
935:   var needleGroup = this.needleGroup_;
936:   if (needleGroup) {
937:     needleGroup.clear();
939:     needleGroup = this.needleGroup_ = graphics.createGroup();
955:         needleGroup);
961:   graphics.drawPath(path, stroke, fill, needleGroup);
964:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1005:   delete this.needleGroup_;
959:   var stroke = theme.getNeedleStroke();
960:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/googlei18n/TachyFont:run_time/src/gae_server/third_party/closure-library/closure/goog/ui/gauge.js:[master, ]
405: goog.ui.Gauge.prototype.needleRadius_ = 0;
414: goog.ui.Gauge.prototype.needleGroup_ = null;
423: goog.ui.Gauge.prototype.needleValuePosition_ = null;
81:  * ticks and labels inside the internal border, and a needle that points to
190:  * The length of the needle front (value facing) from the internal radius.
191:  * The needle front is the part of the needle that points to the value.
194: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
198:  * The length of the needle back relative to the internal radius.
199:  * The needle back is the part of the needle that points away from the value.
202: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
206:  * The width of the needle front at the hinge.
211: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
215:  * The width (radius) of the needle hinge from the gauge radius.
218: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
265:  * The maximal size of a step the needle can move (percent from size of range).
266:  * If the needle needs to move more, it will be moved in animated steps, to
270: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
277: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
399:  * The radius for drawing the needle.
401:  * the needle.
409:  * The group elemnt of the needle. Contains all elements that change when the
418:  * The current position (0-1) of the visible needle.
435:  * Animation object while needle is being moved (animated).
488:  *     determines the position of the needle of the gauge.
508:         goog.ui.Gauge.NEEDLE_MOVE_TIME,
792:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
908:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
910:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
916:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
933:   // Draw the needle hinge
934:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
936:   // Clean previous needle
961:   // Draw the needle
500:   if (this.needleValuePosition_ == null) {
502:     this.needleValuePosition_ = valuePosition;
506:     this.animation_ = new goog.fx.Animation([this.needleValuePosition_],
635:   this.needleGroup_ = null;
795:   this.needleRadius_ = r;
806:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */(this.needleValuePosition_));
937:   var needleGroup = this.needleGroup_;
938:   if (needleGroup) {
939:     needleGroup.clear();
941:     needleGroup = this.needleGroup_ = graphics.createGroup();
958:         'center', font, null, fill, needleGroup);
964:   graphics.drawPath(path, stroke, fill, needleGroup);
967:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1008:   delete this.needleGroup_;
962:   var stroke = theme.getNeedleStroke();
963:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/GoogleChrome/chromeos_smart_card_connector:third_party/closure-library/src/closure/goog/ui/gauge.js:[master, ]
406: goog.ui.Gauge.prototype.needleRadius_ = 0;
415: goog.ui.Gauge.prototype.needleGroup_ = null;
424: goog.ui.Gauge.prototype.needleValuePosition_ = null;
82:  * ticks and labels inside the internal border, and a needle that points to
191:  * The length of the needle front (value facing) from the internal radius.
192:  * The needle front is the part of the needle that points to the value.
195: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
199:  * The length of the needle back relative to the internal radius.
200:  * The needle back is the part of the needle that points away from the value.
203: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
207:  * The width of the needle front at the hinge.
212: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
216:  * The width (radius) of the needle hinge from the gauge radius.
219: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
266:  * The maximal size of a step the needle can move (percent from size of range).
267:  * If the needle needs to move more, it will be moved in animated steps, to
271: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
278: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
400:  * The radius for drawing the needle.
402:  * the needle.
410:  * The group elemnt of the needle. Contains all elements that change when the
419:  * The current position (0-1) of the visible needle.
436:  * Animation object while needle is being moved (animated).
489:  *     determines the position of the needle of the gauge.
509:         goog.ui.Gauge.NEEDLE_MOVE_TIME, goog.fx.easing.inAndOut);
794:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
907:   var frontRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
908:   var backRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
914:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
931:   // Draw the needle hinge
932:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
934:   // Clean previous needle
958:   // Draw the needle
501:   if (this.needleValuePosition_ == null) {
503:     this.needleValuePosition_ = valuePosition;
508:         [this.needleValuePosition_], [valuePosition],
639:   this.needleGroup_ = null;
797:   this.needleRadius_ = r;
808:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */ (this.needleValuePosition_));
935:   var needleGroup = this.needleGroup_;
936:   if (needleGroup) {
937:     needleGroup.clear();
939:     needleGroup = this.needleGroup_ = graphics.createGroup();
955:         needleGroup);
961:   graphics.drawPath(path, stroke, fill, needleGroup);
964:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1005:   delete this.needleGroup_;
959:   var stroke = theme.getNeedleStroke();
960:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/PolymerLabs/ci-runner:lib/queue.js:[master, ]
139:   var commitNeedle = {
146:   var currentlyActive = _.filter(this._active, commitNeedle);
160:         console.log('Equal:', item, commitNeedle);
162:         if (_.filter([item], commitNeedle).length > 0) {
github.com/google/gae-secure-scaffold-python:closure-library/closure/goog/ui/gauge.js:[master, ]
406: goog.ui.Gauge.prototype.needleRadius_ = 0;
415: goog.ui.Gauge.prototype.needleGroup_ = null;
424: goog.ui.Gauge.prototype.needleValuePosition_ = null;
82:  * ticks and labels inside the internal border, and a needle that points to
191:  * The length of the needle front (value facing) from the internal radius.
192:  * The needle front is the part of the needle that points to the value.
195: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
199:  * The length of the needle back relative to the internal radius.
200:  * The needle back is the part of the needle that points away from the value.
203: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
207:  * The width of the needle front at the hinge.
212: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
216:  * The width (radius) of the needle hinge from the gauge radius.
219: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
266:  * The maximal size of a step the needle can move (percent from size of range).
267:  * If the needle needs to move more, it will be moved in animated steps, to
271: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
278: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
400:  * The radius for drawing the needle.
402:  * the needle.
410:  * The group elemnt of the needle. Contains all elements that change when the
419:  * The current position (0-1) of the visible needle.
436:  * Animation object while needle is being moved (animated).
489:  *     determines the position of the needle of the gauge.
509:         goog.ui.Gauge.NEEDLE_MOVE_TIME, goog.fx.easing.inAndOut);
794:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
907:   var frontRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
908:   var backRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
914:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
931:   // Draw the needle hinge
932:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
934:   // Clean previous needle
958:   // Draw the needle
501:   if (this.needleValuePosition_ == null) {
503:     this.needleValuePosition_ = valuePosition;
508:         [this.needleValuePosition_], [valuePosition],
639:   this.needleGroup_ = null;
797:   this.needleRadius_ = r;
808:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */ (this.needleValuePosition_));
935:   var needleGroup = this.needleGroup_;
936:   if (needleGroup) {
937:     needleGroup.clear();
939:     needleGroup = this.needleGroup_ = graphics.createGroup();
955:         needleGroup);
961:   graphics.drawPath(path, stroke, fill, needleGroup);
964:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1005:   delete this.needleGroup_;
959:   var stroke = theme.getNeedleStroke();
960:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/pagespeed/mod_pagespeed-debian-packaging:src/third_party/closure_library/closure/goog/ui/gauge.js:[master, ]
405: goog.ui.Gauge.prototype.needleRadius_ = 0;
414: goog.ui.Gauge.prototype.needleGroup_ = null;
423: goog.ui.Gauge.prototype.needleValuePosition_ = null;
81:  * ticks and labels inside the internal border, and a needle that points to
190:  * The length of the needle front (value facing) from the internal radius.
191:  * The needle front is the part of the needle that points to the value.
194: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
198:  * The length of the needle back relative to the internal radius.
199:  * The needle back is the part of the needle that points away from the value.
202: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
206:  * The width of the needle front at the hinge.
211: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
215:  * The width (radius) of the needle hinge from the gauge radius.
218: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
265:  * The maximal size of a step the needle can move (percent from size of range).
266:  * If the needle needs to move more, it will be moved in animated steps, to
270: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
277: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
399:  * The radius for drawing the needle.
401:  * the needle.
409:  * The group elemnt of the needle. Contains all elements that change when the
418:  * The current position (0-1) of the visible needle.
435:  * Animation object while needle is being moved (animated).
488:  *     determines the position of the needle of the gauge.
508:         goog.ui.Gauge.NEEDLE_MOVE_TIME,
792:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
908:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
910:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
916:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
933:   // Draw the needle hinge
934:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
936:   // Clean previous needle
961:   // Draw the needle
500:   if (this.needleValuePosition_ == null) {
502:     this.needleValuePosition_ = valuePosition;
506:     this.animation_ = new goog.fx.Animation([this.needleValuePosition_],
635:   this.needleGroup_ = null;
795:   this.needleRadius_ = r;
806:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */(this.needleValuePosition_));
937:   var needleGroup = this.needleGroup_;
938:   if (needleGroup) {
939:     needleGroup.clear();
941:     needleGroup = this.needleGroup_ = graphics.createGroup();
958:         'center', font, null, fill, needleGroup);
964:   graphics.drawPath(path, stroke, fill, needleGroup);
967:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1008:   delete this.needleGroup_;
962:   var stroke = theme.getNeedleStroke();
963:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/google/closure-builder:third_party/closure-library/closure/goog/ui/gauge.js:[master, ]
406: goog.ui.Gauge.prototype.needleRadius_ = 0;
415: goog.ui.Gauge.prototype.needleGroup_ = null;
424: goog.ui.Gauge.prototype.needleValuePosition_ = null;
82:  * ticks and labels inside the internal border, and a needle that points to
191:  * The length of the needle front (value facing) from the internal radius.
192:  * The needle front is the part of the needle that points to the value.
195: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
199:  * The length of the needle back relative to the internal radius.
200:  * The needle back is the part of the needle that points away from the value.
203: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
207:  * The width of the needle front at the hinge.
212: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
216:  * The width (radius) of the needle hinge from the gauge radius.
219: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
266:  * The maximal size of a step the needle can move (percent from size of range).
267:  * If the needle needs to move more, it will be moved in animated steps, to
271: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
278: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
400:  * The radius for drawing the needle.
402:  * the needle.
410:  * The group elemnt of the needle. Contains all elements that change when the
419:  * The current position (0-1) of the visible needle.
436:  * Animation object while needle is being moved (animated).
489:  *     determines the position of the needle of the gauge.
509:         goog.ui.Gauge.NEEDLE_MOVE_TIME, goog.fx.easing.inAndOut);
794:   // Draw the needle and the value label. Stop animation when doing
888:  * Draw the elements that depend on the current value (the needle and
906:   // Compute the needle path
907:   var frontRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
908:   var backRadius = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
914:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
931:   // Draw the needle hinge
932:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
934:   // Clean previous needle
958:   // Draw the needle
501:   if (this.needleValuePosition_ == null) {
503:     this.needleValuePosition_ = valuePosition;
508:         [this.needleValuePosition_], [valuePosition],
639:   this.needleGroup_ = null;
797:   this.needleRadius_ = r;
808:   this.needleValuePosition_ = e.x;
898:   var r = this.needleRadius_;
904:       /** @type {number} */ (this.needleValuePosition_));
935:   var needleGroup = this.needleGroup_;
936:   if (needleGroup) {
937:     needleGroup.clear();
939:     needleGroup = this.needleGroup_ = graphics.createGroup();
955:         needleGroup);
961:   graphics.drawPath(path, stroke, fill, needleGroup);
964:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1005:   delete this.needleGroup_;
959:   var stroke = theme.getNeedleStroke();
960:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/googlemaps/js-v2-samples:fusiontables/script/closure/closure/goog/ui/gauge.js:[gh-pages, ]
399: goog.ui.Gauge.prototype.needleRadius_ = 0;
408: goog.ui.Gauge.prototype.needleGroup_ = null;
417: goog.ui.Gauge.prototype.needleValuePosition_ = null;
76:  * ticks and labels inside the internal border, and a needle that points to
184:  * The length of the needle front (value facing) from the internal radius.
185:  * The needle front is the part of the needle that points to the value.
188: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
192:  * The length of the needle back relative to the internal radius.
193:  * The needle back is the part of the needle that points away from the value.
196: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
200:  * The width of the needle front at the hinge.
205: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
209:  * The width (radius) of the needle hinge from the gauge radius.
212: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
259:  * The maximal size of a step the needle can move (percent from size of range).
260:  * If the needle needs to move more, it will be moved in animated steps, to
264: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
271: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
393:  * The radius for drawing the needle.
395:  * the needle.
403:  * The group elemnt of the needle. Contains all elements that change when the
412:  * The current position (0-1) of the visible needle.
429:  * Animation object while needle is being moved (animated).
481:  *     determines the position of the needle of the gauge.
501:         goog.ui.Gauge.NEEDLE_MOVE_TIME,
773:   // Draw the needle and the value label. Stop animation when doing
870:  * Draw the elements that depend on the current value (the needle and
888:   // Compute the needle path
890:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
892:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
898:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
915:   // Draw the needle hinge
916:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
918:   // Clean previous needle
943:   // Draw the needle
493:   if (this.needleValuePosition_ == null) {
495:     this.needleValuePosition_ = valuePosition;
499:     this.animation_ = new goog.fx.Animation([this.needleValuePosition_],
626:   this.needleGroup_ = null;
777:   this.needleRadius_ = r;
788:   this.needleValuePosition_ = e.x;
880:   var r = this.needleRadius_;
886:       /** @type {number} */(this.needleValuePosition_));
919:   var needleGroup = this.needleGroup_;
920:   if (needleGroup) {
921:     needleGroup.clear();
923:     needleGroup = this.needleGroup_ = graphics.createGroup();
940:         'center', font, null, fill, needleGroup);
946:   graphics.drawPath(path, stroke, fill, needleGroup);
949:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
995:   delete this.needleGroup_;
944:   var stroke = theme.getNeedleStroke();
945:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/google/csp-evaluator:closure-library/closure/goog/ui/gauge.js:[master, ]
406: goog.ui.Gauge.prototype.needleRadius_ = 0;
415: goog.ui.Gauge.prototype.needleGroup_ = null;
424: goog.ui.Gauge.prototype.needleValuePosition_ = null;
82:  * ticks and labels inside the internal border, and a needle that points to
191:  * The length of the needle front (value facing) from the internal radius.
192:  * The needle front is the part of the needle that points to the value.
195: goog.ui.Gauge.FACTOR_NEEDLE_FRONT = 0.95;
199:  * The length of the needle back relative to the internal radius.
200:  * The needle back is the part of the needle that points away from the value.
203: goog.ui.Gauge.FACTOR_NEEDLE_BACK = 0.3;
207:  * The width of the needle front at the hinge.
212: goog.ui.Gauge.FACTOR_NEEDLE_WIDTH = 0.07;
216:  * The width (radius) of the needle hinge from the gauge radius.
219: goog.ui.Gauge.FACTOR_NEEDLE_HINGE = 0.15;
266:  * The maximal size of a step the needle can move (percent from size of range).
267:  * If the needle needs to move more, it will be moved in animated steps, to
271: goog.ui.Gauge.NEEDLE_MOVE_MAX_STEP = 0.02;
278: goog.ui.Gauge.NEEDLE_MOVE_TIME = 400;
400:  * The radius for drawing the needle.
402:  * the needle.
410:  * The group elemnt of the needle. Contains all elements that change when the
419:  * The current position (0-1) of the visible needle.
436:  * Animation object while needle is being moved (animated).
489:  *     determines the position of the needle of the gauge.
509:         goog.ui.Gauge.NEEDLE_MOVE_TIME,
794:   // Draw the needle and the value label. Stop animation when doing
890:  * Draw the elements that depend on the current value (the needle and
908:   // Compute the needle path
910:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_FRONT);
912:       Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_BACK);
918:   var distanceControlPointBase = r * goog.ui.Gauge.FACTOR_NEEDLE_WIDTH;
935:   // Draw the needle hinge
936:   var rh = Math.round(r * goog.ui.Gauge.FACTOR_NEEDLE_HINGE);
938:   // Clean previous needle
963:   // Draw the needle
501:   if (this.needleValuePosition_ == null) {
503:     this.needleValuePosition_ = valuePosition;
507:     this.animation_ = new goog.fx.Animation([this.needleValuePosition_],
637:   this.needleGroup_ = null;
797:   this.needleRadius_ = r;
808:   this.needleValuePosition_ = e.x;
900:   var r = this.needleRadius_;
906:       /** @type {number} */(this.needleValuePosition_));
939:   var needleGroup = this.needleGroup_;
940:   if (needleGroup) {
941:     needleGroup.clear();
943:     needleGroup = this.needleGroup_ = graphics.createGroup();
960:         'center', font, null, fill, needleGroup);
966:   graphics.drawPath(path, stroke, fill, needleGroup);
969:   graphics.drawCircle(cx, cy, rh, stroke, fill, needleGroup);
1010:   delete this.needleGroup_;
964:   var stroke = theme.getNeedleStroke();
965:   var fill = theme.getNeedleFill(cx, cy, rh);
github.com/google/pepper.js:examples/mouselock/mouselock.cc:[master, ]
268: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
22: // view.  These values are used to determine which 2D quadrant the needle lies
269:                                    uint32_t needle_color) {
328:         *image->GetAddr32(pp::Point(x, y)) = needle_color;
217:   DrawNeedle(&image, kForegroundColor);
271:     Log("DrawNeedle with NULL image");
github.com/google/paco:Paco-Server/ear/default/web/bower_components/ace-builds/src/keybinding-emacs.js:[develop, ]
481:     this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) {
547:     this.convertNeedleToRegExp = function() {
553:     this.convertNeedleToString = function() {
15:         if (!options.needle) return false;
75:         if (!session || !options.needle) return [];
432:         this.$options.needle = '';
469:         this.$prevNeedle = this.$options.needle;
470:         this.$options.needle = '';
485:             options.needle = needleUpdateFunc.call(this, options.needle || '') || '';
487:         if (options.needle.length === 0) {
509:         return this.highlightAndFindWithNeedle(false, function(needle) {
510:             if (!isRegExp(needle))
511:               return needle + s;
512:             var reObj = regExpToObject(needle);
519:         return this.highlightAndFindWithNeedle(false, function(needle) {
520:             if (!isRegExp(needle))
521:               return needle.substring(0, needle.length-1);
522:             var reObj = regExpToObject(needle);
532:         return this.highlightAndFindWithNeedle(true, function(needle) {
533:             return options.useCurrentOrPrevSearch && needle.length === 0 ?
534:                 this.$prevNeedle || '' : needle;
548:         return this.highlightAndFindWithNeedle(false, function(needle) {
549:             return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig');
554:         return this.highlightAndFindWithNeedle(false, function(needle) {
555:             return isRegExp(needle) ? regExpToObject(needle).expression : needle;
562:         msg += 'isearch: ' + options.needle;
484:         if (needleUpdateFunc) {
336:         iSearch.convertNeedleToRegExp();
github.com/google/paco:Paco-Server/ear/default/web/bower_components/ace-builds/src-noconflict/keybinding-emacs.js:[develop, ]
481:     this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) {
547:     this.convertNeedleToRegExp = function() {
553:     this.convertNeedleToString = function() {
15:         if (!options.needle) return false;
75:         if (!session || !options.needle) return [];
432:         this.$options.needle = '';
469:         this.$prevNeedle = this.$options.needle;
470:         this.$options.needle = '';
485:             options.needle = needleUpdateFunc.call(this, options.needle || '') || '';
487:         if (options.needle.length === 0) {
509:         return this.highlightAndFindWithNeedle(false, function(needle) {
510:             if (!isRegExp(needle))
511:               return needle + s;
512:             var reObj = regExpToObject(needle);
519:         return this.highlightAndFindWithNeedle(false, function(needle) {
520:             if (!isRegExp(needle))
521:               return needle.substring(0, needle.length-1);
522:             var reObj = regExpToObject(needle);
532:         return this.highlightAndFindWithNeedle(true, function(needle) {
533:             return options.useCurrentOrPrevSearch && needle.length === 0 ?
534:                 this.$prevNeedle || '' : needle;
548:         return this.highlightAndFindWithNeedle(false, function(needle) {
549:             return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig');
554:         return this.highlightAndFindWithNeedle(false, function(needle) {
555:             return isRegExp(needle) ? regExpToObject(needle).expression : needle;
562:         msg += 'isearch: ' + options.needle;
484:         if (needleUpdateFunc) {
336:         iSearch.convertNeedleToRegExp();
github.com/foam-framework/foam:apps/power/power.js:[master, ]
585: var NeedleMeter = Model.create({
589:    name: 'NeedleMeter',
android.googlesource.com/platform/external/opencv3:modules/cudalegacy/src/needle_map.cpp:[master, ]
50: void cv::cuda::createOpticalFlowNeedleMap(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&) { throw_no_cuda(); }
63: void cv::cuda::createOpticalFlowNeedleMap(const GpuMat& u, const GpuMat& v, GpuMat& vertex, GpuMat& colors)
70:     const int NEEDLE_MAP_SCALE = 16;
72:     const int x_needles = u.cols / NEEDLE_MAP_SCALE;
73:     const int y_needles = u.rows / NEEDLE_MAP_SCALE;
58:         void NeedleMapAverage_gpu(PtrStepSzf u, PtrStepSzf v, PtrStepSzf u_avg, PtrStepSzf v_avg);
75:     GpuMat u_avg(y_needles, x_needles, CV_32FC1);
76:     GpuMat v_avg(y_needles, x_needles, CV_32FC1);
78:     NeedleMapAverage_gpu(u, v, u_avg, v_avg);
82:     const int num_arrows = x_needles * y_needles * NUM_VERTS_PER_ARROW;
59:         void CreateOpticalFlowNeedleMap_gpu(PtrStepSzf u_avg, PtrStepSzf v_avg, float* vertex_buffer, float* color_data, float max_flow, float xscale, float yscale);
95:     CreateOpticalFlowNeedleMap_gpu(u_avg, v_avg, vertex.ptr<float>(), colors.ptr<float>(), max_flow, 1.0f / u.cols, 1.0f / u.rows);
android.googlesource.com/platform/packages/wallpapers/MusicVisualization:src/com/android/musicvis/vis5/Visualization5RS.java:[master, ]
45:     private int mNeedlePos = 0;
46:     private int mNeedleSpeed = 0;
48:     private int mNeedleMass = 10;
185:         mTextures[4] = Allocation.createFromBitmapResource(mRS, mResources, R.drawable.needle,
188:         mScript.set_gTvumeter_needle(mTextures[4]);
342:         // There are several forces working on the needle: a force applied by the
348:         // be induced by the movement of the needle.
349:         // The force from the spring is proportional to the position of the needle.
350:         // The friction force is a function of the speed of the needle, but so is
351:         // the current induced by the movement of the needle, so we can combine
356:         // of the needle more realistic
358:         // mNeedleSpeed * 3 is for the movement of the needle, which induces an opposite current
360:         // mNeedlePos + mSpringForceAtOrigin is for the force of the spring pushing the needle back
361:         int netforce = volt - mNeedleSpeed * 3 - (mNeedlePos + mSpringForceAtOrigin) ;
362:         int acceleration = netforce / mNeedleMass;
363:         mNeedleSpeed += acceleration;
364:         mNeedlePos += mNeedleSpeed;
365:         if (mNeedlePos < 0) {
366:             mNeedlePos = 0;
367:             mNeedleSpeed = 0;
368:         } else if (mNeedlePos > 32767) {
369:             if (mNeedlePos > 33333) {
372:             mNeedlePos = 32767;
373:             mNeedleSpeed = 0;
379:         mWorldState.mAngle = 131f - (mNeedlePos / 410f); // ~80 degree range
android.googlesource.com/platform/packages/wallpapers/MusicVisualization:src/com/android/musicvis/vis4/Visualization4RS.java:[master, ]
45:     private int mNeedlePos = 0;
46:     private int mNeedleSpeed = 0;
48:     private int mNeedleMass = 10;
127:         mTextures[4] = Allocation.createFromBitmapResource(mRS, mResources, R.drawable.needle,
130:         mScript.set_gTvumeter_needle(mTextures[4]);
219:         // There are several forces working on the needle: a force applied by the
225:         // be induced by the movement of the needle.
226:         // The force from the spring is proportional to the position of the needle.
227:         // The friction force is a function of the speed of the needle, but so is
228:         // the current induced by the movement of the needle, so we can combine
233:         // of the needle more realistic
235:         // mNeedleSpeed * 3 is for the movement of the needle, which induces an opposite current
237:         // mNeedlePos + mSpringForceAtOrigin is for the force of the spring pushing the needle back
238:         int netforce = volt - mNeedleSpeed * 3 - (mNeedlePos + mSpringForceAtOrigin) ;
239:         int acceleration = netforce / mNeedleMass;
240:         mNeedleSpeed += acceleration;
241:         mNeedlePos += mNeedleSpeed;
242:         if (mNeedlePos < 0) {
243:             mNeedlePos = 0;
244:             mNeedleSpeed = 0;
245:         } else if (mNeedlePos > 32767) {
246:             if (mNeedlePos > 33333) {
249:             mNeedlePos = 32767;
250:             mNeedleSpeed = 0;
256:         mWorldState.mAngle = 131f - (mNeedlePos / 410f); // ~80 degree range