Search some code: Max results:

Found 13191 results in 400 files (72MB index data, 21317954 ngram matches, 783 docs considered, 461 docs (18MB) loaded, 100 docs skipped): for
(and substr:"class" case_substr:"Needle") with options &zoekt.SearchOptions{EstimateDocCount:false, Whole:false, ShardMaxMatchCount:250, TotalMaxMatchCount:1000000, ShardMaxImportantMatch:2, TotalMaxImportantMatch:100, MaxWallTime:10000000000}
in 1.634195852s (queued: 1.731┬Ás)

android.googlesource.com/platform/superproject:external/clang/lib/Sema/AnalysisBasedWarnings.cpp:[master, ]

591:   const DeclRefExpr *Needle;
62:   class UnreachableCodeHandler : public reachable_code::Callback {
121: class LogicalErrorHandler : public CFGCallback {
179:     // Skip function calls which are qualified with a templated class.
586: /// ContainsReference - A visitor class to search for references to
589: class ContainsReference : public ConstEvaluatedExprVisitor<ContainsReference> {
596:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
597:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
608:     if (E == Needle)
899:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1360: class UninitValsDiagReporter : public UninitVariablesHandler {
1472: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1742: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
259:   // templated classes.
727:     switch (Term ? Term->getStmtClass() : Stmt::DeclStmtClass) {
734:     case Stmt::IfStmtClass: {
744:     case Stmt::ConditionalOperatorClass: {
754:     case Stmt::BinaryOperatorClass: {
774:     case Stmt::WhileStmtClass:
781:     case Stmt::ForStmtClass:
791:     case Stmt::CXXForRangeStmtClass:
804:     case Stmt::DoStmtClass:
813:     case Stmt::CaseStmtClass:
818:     case Stmt::DefaultStmtClass:
1182:     switch (S->getStmtClass()) {
1183:     case Stmt::ForStmtClass:
1184:     case Stmt::WhileStmtClass:
1185:     case Stmt::CXXForRangeStmtClass:
1186:     case Stmt::ObjCForCollectionStmtClass:
1188:     case Stmt::DoStmtClass: {
1277:   // Classify the current code body for better warning text.
1280:   // FIXME: Should we use a common classification enum and the same set of
1315:     // Classify the weak object being accessed for better warning text.
1935:       .setAlwaysAdd(Stmt::BinaryOperatorClass)
1936:       .setAlwaysAdd(Stmt::CompoundAssignOperatorClass)
1937:       .setAlwaysAdd(Stmt::BlockExprClass)
1938:       .setAlwaysAdd(Stmt::CStyleCastExprClass)
1939:       .setAlwaysAdd(Stmt::DeclRefExprClass)
1940:       .setAlwaysAdd(Stmt::ImplicitCastExprClass)
1941:       .setAlwaysAdd(Stmt::UnaryOperatorClass)
1942:       .setAlwaysAdd(Stmt::AttributedStmtClass);
github.com/google/rekall:rekall-gui/manuskript/static/bower_components/markdown/test/fixtures/Markdown-from-MDTest1.1.mdtest/Markdown_Documentation_-_Syntax.json:[master, ]
15:         "class": "selected",
264:     ["pre", ["code", "    <div class=\"footer\">\u000a        &copy; 2004 Foo Corporation\u000a    </div>\u000a"]],
266:     ["pre", ["code", "<pre><code>&lt;div class=\"footer\"&gt;\u000a    &amp;copy; 2004 Foo Corporation\u000a&lt;/div&gt;\u000a</code></pre>\u000a"]],
149:     ["p", "in your anchor tag ", ["code", "href"], " attribute. Needless to say, this is easy to\u000aforget, and is probably the single most common source of HTML validation\u000aerrors in otherwise well-marked-up web sites."],
github.com/fuchsia-mirror/third_party-cmake:Source/cmTarget.cxx:[master, ]
565:   const cmSourceFileLocation& Needle;
581:   const cmSourceFileLocation& Needle;
160: class cmTargetInternals
568:     : Needle(needle)
574:     return loc.Matches(this->Needle);
585:     : Needle(needle)
595:                    CreateLocation(this->Needle.GetMakefile()));
598:                         LocationMatcher(this->Needle)) != locations.end();
android.googlesource.com/platform/external/clang_35a:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
577:   const DeclRefExpr *Needle;
63:   class UnreachableCodeHandler : public reachable_code::Callback {
121: class LogicalErrorHandler : public CFGCallback {
192:         // Skip function calls which are qualified with a templated class.
572: /// ContainsReference - A visitor class to search for references to
575: class ContainsReference : public EvaluatedExprVisitor<ContainsReference> {
580:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
582:       FoundReference(false), Needle(Needle) {}
593:     if (E == Needle)
885:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1331: class UninitValsDiagReporter : public UninitVariablesHandler {
1454: class ThreadSafetyReporter : public clang::thread_safety::ThreadSafetyHandler {
1629: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
229:   // templated classes.
712:     switch (Term ? Term->getStmtClass() : Stmt::DeclStmtClass) {
719:     case Stmt::IfStmtClass: {
729:     case Stmt::ConditionalOperatorClass: {
739:     case Stmt::BinaryOperatorClass: {
759:     case Stmt::WhileStmtClass:
766:     case Stmt::ForStmtClass:
776:     case Stmt::CXXForRangeStmtClass:
789:     case Stmt::DoStmtClass:
798:     case Stmt::CaseStmtClass:
803:     case Stmt::DefaultStmtClass:
1155:     switch (S->getStmtClass()) {
1156:     case Stmt::ForStmtClass:
1157:     case Stmt::WhileStmtClass:
1158:     case Stmt::CXXForRangeStmtClass:
1159:     case Stmt::ObjCForCollectionStmtClass:
1161:     case Stmt::DoStmtClass: {
1251:   // Classify the current code body for better warning text.
1254:   // FIXME: Should we use a common classification enum and the same set of
1291:     // Classify the weak object being accessed for better warning text.
1831:       .setAlwaysAdd(Stmt::BinaryOperatorClass)
1832:       .setAlwaysAdd(Stmt::CompoundAssignOperatorClass)
1833:       .setAlwaysAdd(Stmt::BlockExprClass)
1834:       .setAlwaysAdd(Stmt::CStyleCastExprClass)
1835:       .setAlwaysAdd(Stmt::DeclRefExprClass)
1836:       .setAlwaysAdd(Stmt::ImplicitCastExprClass)
1837:       .setAlwaysAdd(Stmt::UnaryOperatorClass)
1838:       .setAlwaysAdd(Stmt::AttributedStmtClass);
chromium.googlesource.com/native_client/pnacl-clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
579:   const DeclRefExpr *Needle;
63:   class UnreachableCodeHandler : public reachable_code::Callback {
122: class LogicalErrorHandler : public CFGCallback {
203:         // Skip function calls which are qualified with a templated class.
574: /// ContainsReference - A visitor class to search for references to
577: class ContainsReference : public EvaluatedExprVisitor<ContainsReference> {
582:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
584:       FoundReference(false), Needle(Needle) {}
595:     if (E == Needle)
888:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1325: class UninitValsDiagReporter : public UninitVariablesHandler {
1442: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1713: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
240:   // templated classes.
715:     switch (Term ? Term->getStmtClass() : Stmt::DeclStmtClass) {
722:     case Stmt::IfStmtClass: {
732:     case Stmt::ConditionalOperatorClass: {
742:     case Stmt::BinaryOperatorClass: {
762:     case Stmt::WhileStmtClass:
769:     case Stmt::ForStmtClass:
779:     case Stmt::CXXForRangeStmtClass:
792:     case Stmt::DoStmtClass:
801:     case Stmt::CaseStmtClass:
806:     case Stmt::DefaultStmtClass:
1152:     switch (S->getStmtClass()) {
1153:     case Stmt::ForStmtClass:
1154:     case Stmt::WhileStmtClass:
1155:     case Stmt::CXXForRangeStmtClass:
1156:     case Stmt::ObjCForCollectionStmtClass:
1158:     case Stmt::DoStmtClass: {
1248:   // Classify the current code body for better warning text.
1251:   // FIXME: Should we use a common classification enum and the same set of
1286:     // Classify the weak object being accessed for better warning text.
1903:       .setAlwaysAdd(Stmt::BinaryOperatorClass)
1904:       .setAlwaysAdd(Stmt::CompoundAssignOperatorClass)
1905:       .setAlwaysAdd(Stmt::BlockExprClass)
1906:       .setAlwaysAdd(Stmt::CStyleCastExprClass)
1907:       .setAlwaysAdd(Stmt::DeclRefExprClass)
1908:       .setAlwaysAdd(Stmt::ImplicitCastExprClass)
1909:       .setAlwaysAdd(Stmt::UnaryOperatorClass)
1910:       .setAlwaysAdd(Stmt::AttributedStmtClass);
android.googlesource.com/platform/external/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
duplicate result
github.com/fuchsia-mirror/third_party-clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
618:   const DeclRefExpr *Needle;
57:   class UnreachableCodeHandler : public reachable_code::Callback {
126: class LogicalErrorHandler : public CFGCallback {
184:     // Skip function calls which are qualified with a templated class.
613: /// ContainsReference - A visitor class to search for references to
616: class ContainsReference : public ConstEvaluatedExprVisitor<ContainsReference> {
623:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
624:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
635:     if (E == Needle)
926:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1396: class UninitValsDiagReporter : public UninitVariablesHandler {
1508: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1778: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
264:   // templated classes.
754:     switch (Term ? Term->getStmtClass() : Stmt::DeclStmtClass) {
761:     case Stmt::IfStmtClass: {
771:     case Stmt::ConditionalOperatorClass: {
781:     case Stmt::BinaryOperatorClass: {
801:     case Stmt::WhileStmtClass:
808:     case Stmt::ForStmtClass:
818:     case Stmt::CXXForRangeStmtClass:
831:     case Stmt::DoStmtClass:
840:     case Stmt::CaseStmtClass:
845:     case Stmt::DefaultStmtClass:
1218:     switch (S->getStmtClass()) {
1219:     case Stmt::ForStmtClass:
1220:     case Stmt::WhileStmtClass:
1221:     case Stmt::CXXForRangeStmtClass:
1222:     case Stmt::ObjCForCollectionStmtClass:
1224:     case Stmt::DoStmtClass: {
1313:   // Classify the current code body for better warning text.
1316:   // FIXME: Should we use a common classification enum and the same set of
1351:     // Classify the weak object being accessed for better warning text.
1971:       .setAlwaysAdd(Stmt::BinaryOperatorClass)
1972:       .setAlwaysAdd(Stmt::CompoundAssignOperatorClass)
1973:       .setAlwaysAdd(Stmt::BlockExprClass)
1974:       .setAlwaysAdd(Stmt::CStyleCastExprClass)
1975:       .setAlwaysAdd(Stmt::DeclRefExprClass)
1976:       .setAlwaysAdd(Stmt::ImplicitCastExprClass)
1977:       .setAlwaysAdd(Stmt::UnaryOperatorClass)
1978:       .setAlwaysAdd(Stmt::AttributedStmtClass);
chromium.googlesource.com/external/github.com/kripken/emscripten-fastcomp-clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
duplicate result
chromium.googlesource.com/external/github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
768:   const DeclRefExpr *Needle;
57:   class UnreachableCodeHandler : public reachable_code::Callback {
126: class LogicalErrorHandler : public CFGCallback {
184:     // Skip function calls which are qualified with a templated class.
763: /// ContainsReference - A visitor class to search for references to
766: class ContainsReference : public ConstEvaluatedExprVisitor<ContainsReference> {
773:   ContainsReference(ASTContext &Context, const DeclRefExpr *Needle)
774:     : Inherited(Context), FoundReference(false), Needle(Needle) {}
785:     if (E == Needle)
1076:   class FallthroughMapper : public RecursiveASTVisitor<FallthroughMapper> {
1546: class UninitValsDiagReporter : public UninitVariablesHandler {
1658: class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
1928: class ConsumedWarningsHandler : public ConsumedWarningsHandlerBase {
264:   // templated classes.
904:     switch (Term ? Term->getStmtClass() : Stmt::DeclStmtClass) {
911:     case Stmt::IfStmtClass: {
921:     case Stmt::ConditionalOperatorClass: {
931:     case Stmt::BinaryOperatorClass: {
951:     case Stmt::WhileStmtClass:
958:     case Stmt::ForStmtClass:
968:     case Stmt::CXXForRangeStmtClass:
981:     case Stmt::DoStmtClass:
990:     case Stmt::CaseStmtClass:
995:     case Stmt::DefaultStmtClass:
1368:     switch (S->getStmtClass()) {
1369:     case Stmt::ForStmtClass:
1370:     case Stmt::WhileStmtClass:
1371:     case Stmt::CXXForRangeStmtClass:
1372:     case Stmt::ObjCForCollectionStmtClass:
1374:     case Stmt::DoStmtClass: {
1463:   // Classify the current code body for better warning text.
1466:   // FIXME: Should we use a common classification enum and the same set of
1501:     // Classify the weak object being accessed for better warning text.
2121:       .setAlwaysAdd(Stmt::BinaryOperatorClass)
2122:       .setAlwaysAdd(Stmt::CompoundAssignOperatorClass)
2123:       .setAlwaysAdd(Stmt::BlockExprClass)
2124:       .setAlwaysAdd(Stmt::CStyleCastExprClass)
2125:       .setAlwaysAdd(Stmt::DeclRefExprClass)
2126:       .setAlwaysAdd(Stmt::ImplicitCastExprClass)
2127:       .setAlwaysAdd(Stmt::UnaryOperatorClass)
2128:       .setAlwaysAdd(Stmt::AttributedStmtClass);
chromium.googlesource.com/chromiumos/third_party/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
duplicate result
chromium.googlesource.com/external/llvm.org/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
duplicate result
github.com/llvm-mirror/clang:lib/Sema/AnalysisBasedWarnings.cpp:[master, ]
duplicate result
chromium.googlesource.com/native_client/nacl-toolchain:gdb/sim/common/sim-fpu.h:[master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
chromium.googlesource.com/chromiumos/third_party/gdb:sim/common/sim-fpu.h:[master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
chromium.googlesource.com/native_client/nacl-gdb:sim/common/sim-fpu.h:[master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
github.com/hanwen/artisjokke:needle3d/needle-inserter3.hh:[master, ]
10: class Needle_inserter3 : public Deformation_hook,  public Element_watcher
12:   enum Needle_state {
16:   Needle_state state_;
55:   Needle_inserter3 (Maubach_tree3*, Deformation_state*);
chromium.googlesource.com/chromium/deps/perl:perl/lib/pods/perlobj.pod:[master, ]
600: =head3 Class Names as Strings
772: =head2 The UNIVERSAL Class
168: =head2 A Class is Simply a Package
655: =head2 Invoking Class Methods
36: An object is simply a data structure that knows to which class it
41: A class is simply a package. A class provides methods that expect to
47: (or a package name, for class methods) as the first argument.
59: etc.) that have been explicitly associated with a particular class.
63: class.
70:       my $class = shift;
72:       return bless {}, $class;
81:       my $class = shift;
83:       return bless {}, $class;
88: subroutine that blesses a data structure into a class is a valid
93: and associates the hash with the class in C<$class>. In the simplest
94: case, the C<$class> variable will end up containing the string "File".
100:       my $class = shift;
103:       bless $self, $class;
113:       my $class = shift;
116:       bless $self, $class;
124: store data associated with the object. Typically, code inside the class
126: the class should always treat the object as opaque. This is called
150:   bless $foo, 'Class';
151:   print blessed( $bar );      # prints "Class"
169: X<class> X<package> X<@ISA> X<inheritance>
171: Perl does not provide any special syntax for class definitions. A
173: only difference is that in a class, the subroutines may expect a
174: reference to an object or the name of a class as the first argument.
175: This is purely a matter of convention, so a class may contain both
176: methods and subroutines which I<don't> operate on an object or class.
179: contains a list of that class's parent classes, if any. This array is
193: All classes inherit from the L<UNIVERSAL> class implicitly. The
194: L<UNIVERSAL> class is implemented by the Perl core, and provides
196: The C<UNIVERSAL> class will I<never> appear in a package's C<@ISA>
200: Attribute inheritance is left up the class to implement. See the
209: object or a class name as its first argument.
230: object (or class name), and the right hand side is the method name.
266: When a class inherits from another class, any methods defined in the
267: parent class are available to the child class. If you attempt to call a
268: method on an object that isn't defined in its own class, Perl will also
277: Since we didn't define a C<save()> method in the C<File::MP3> class,
278: Perl will look at the C<File::MP3> class's parent classes to find the
282: In this case, it finds a C<save()> method in the C<File> class. Note
285: class.
287: We can override a parent's method in a child class. When we do so, we
288: can still call the parent class's method with the C<SUPER>
289: pseudo-class.
299: use it for regular subroutine calls or class methods:
303:   SUPER->save($thing);     # FAIL: looks for save() method in class
313: The C<SUPER> pseudo-class is resolved from the package where the call
314: is made. It is I<not> resolved based on the object's class. This is
367: blessed into the C<C> class, the C<speak()> method in the C<B> class
369: parent class of C<B> (i.e the class the method call is in), not in the
370: parent class of C<C> (i.e. the class the object belongs to).
382: To declare multiple parents, you simply need to pass multiple class
403: in the C<Child> class, Perl will look for that method in the C<Parent>
404: class and then, if necessary, in the C<Grandparent> class.
409: When a class has multiple parents, the method lookup order becomes more
416: class's C<@ISA> array and searches from there.
451: C<next> pseudo-class. See the L<mro> documentation for more details on
458: class's parent class or adding subroutines to a class will invalidate
459: the cache for that class.
468: This means that a class must implement its own constructor. A
469: constructor is simply a class method that returns a reference to a new
473: object. Let's write a real constructor for the C<File> class we used
479:       my $class = shift;
485:       }, $class;
494: For our File::MP3 class, we can check to make sure that the path we're
500:       my $class = shift;
506:       return $class->SUPER::new(@_);
509: This constructor lets its parent class do the actual object
524: class, it's considered a best practice to wrap all access to the
537: use the accessors rather than having to know how a parent class is
602: Perl also lets you use a scalar containing a string as a class name:
604:   my $class = 'File';
606:   my $file = $class->new( $path, $data );
645: C<IO::File> class. Once you have an open filehandle, you can call
660: incorrectly. For example, the construct C<< Class->new() >> can be
661: interpreted as either C<< 'Class'->new() >> or C<< Class()->new() >>.
663: named Class(), then call new() as a method on the return value of
664: Class()". If there is a subroutine named C<Class()> in the current
665: namespace, Perl will always interpret C<< Class->new() >> as the second
667: C<Class()>
670: call on the class named "Class") in two ways. First, you can append a
671: C<::> to the class name:
673:     Class::->new()
677: Alternatively, you can quote the class name:
679:     'Class'->new()
681: Of course, if the class name is in a scalar Perl will do the right
684:     my $class = 'Class';
685:     $class->new();
697: This syntax can be used with any class or object method:
705: clear if C<save> is a method provided by the C<File> class or simply a
708: When used with class methods, the problem is even worse. Because Perl
710: whether the bareword after the method is a class name or subroutine
723: You can force Perl to interpret the bareword as a class name by
731: blessed into a class via the C<bless> function. The C<bless> function
734:   my $object = bless {}, $class;
737: In the first form, the anonymous hash is being blessed into the class
738: in C<$class>. In the second form, the anonymous hash is blessed into
759: been blessed into a class named "0". This is a possible, but quite
760: pathological. Don't create a class named "0" unless you know what
765: holds a reference to an object, it will return the name of the class
775: All classes automatically inherit from the L<UNIVERSAL> class, which is
776: built-in to the Perl core. This class provides a number of methods, all
777: of which can be called on either a class or an object. You can also
778: choose to override some of these methods in your class. If you do so,
783: =item isa($class)
787: class in C<$class>, or a member of a subclass of C<$class>.
805: The C<can> method checks to see if the class or object it was called on
806: has a method named C<$method>. This checks for the method in the class
810: If your class responds to method calls via C<AUTOLOAD>, you may want to
819: The C<VERSION> method returns the version number of the class
845: If you call a method that doesn't exist in a class, Perl will throw an
846: error. However, if that class or any of its parent classes defines an
854: C<$AUTOLOAD> package global for your class. Since this is a global, if
885: If your class does have an C<AUTOLOAD> method, we strongly recommend
886: that you override C<can> in your class as well. Your overridden C<can>
900: define a C<DESTROY> method in your class. This method will always be
918: If you define an C<AUTOLOAD> in your class, then Perl will call your
975:       my $class = shift;
978:       return bless \$time, $class;
1018:       my $class = shift;
1020:       my $self = bless \( my $object ), $class;
186: parent classes and make sure that the package doesn't inherit from
189: However the parent classes are set, the package's C<@ISA> variable will
269: look for that method in any parent classes it may have.
307:                            #       classes
406: If Perl cannot find the method in any of these classes, it will die
430: derived classes (i.e. before we tried C<Mother> and
442: terms, "C3" order ensures that shared parent classes are never searched
443: before child classes, so Perl will now search: C<Child>, C<Father>,
450: The C3 order also lets you call methods in sibling classes with the
544: syntax, so classes must provide explicitly written accessor methods.
716: barewords it has previously seen, and other input. Needless to say,
742: of a subclass to reuse the parent's constructor, but you may still run
799: You can also override C<DOES> directly in your own classes. If you
1048: some style guides on constructing both modules and classes.
536: Finally, using accessors makes inheritance much simpler. Subclasses can
github.com/hanwen/artisjokke:needle2d/needle-inserter.hh:[master, ]
13: class Needle_inserter : public Deformation_hook
2:   declare Needle_inserter
54:   Needle_inserter (Maubach_tree*, Deformation_state*);
chromium.googlesource.com/external/github.com/altera-opensource/linux-socfpga:drivers/char/xillybus/xillybus_core.c:[master, ]
64: static struct class *xillybus_class;
1846: 		device = device_create(xillybus_class,
1868: 		device_destroy(xillybus_class, MKDEV(major, i));
1884: 		device_destroy(xillybus_class, MKDEV(endpoint->major, minor));
2085: 	xillybus_class = class_create(THIS_MODULE, xillyname);
2086: 	if (IS_ERR(xillybus_class))
2087: 		return PTR_ERR(xillybus_class);
2091: 		class_destroy(xillybus_class);
2103: 	class_destroy(xillybus_class);
84:  * They are held for short direct memory manipulations. Needless to say,
kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux:drivers/char/xillybus/xillybus_core.c:[master, ]
duplicate result
github.com/gwtproject/gwt:samples/dynatable/src/com/google/gwt/sample/dynatable/server/SchoolCalendarServiceImpl.java:[master, ]
52:   private static final int CLASS_LENGTH_MINS = 50;
34: public class SchoolCalendarServiceImpl extends RemoteServiceServlet implements
146:       int absStopMins = absStartMins + CLASS_LENGTH_MINS;
43:       "Crutcher", "Needler", "Wilson", "Chase", "Edelstein"};
168:     generateRandomSchedule(student.getClassSchedule());
chromium.googlesource.com/chromium/src/codesearch:third_party/perl/perl/lib/pods/perlobj.pod:[master, ]
duplicate result
github.com/fuchsia-mirror/third_party-binutils-gdb:sim/common/sim-fpu.h:[master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
github.com/fuchsia-mirror/third_party-gdb:sim/common/sim-fpu.h:[master, ]
89: } sim_fpu_class;
83:   sim_fpu_class_zero,
84:   sim_fpu_class_snan,
85:   sim_fpu_class_qnan,
86:   sim_fpu_class_number,
87:   sim_fpu_class_denorm,
88:   sim_fpu_class_infinity,
92:   sim_fpu_class class;
346: /* General number class and comparison operators.
46:    Needless to say the results, while better than for a packed 64 bit
297: /* Specific number classes.
chromium.googlesource.com/chromium/codesearch:src:codesearch-gitlink-overlay/third_party/perl/perl/lib/pods/perlobj.pod:[master, ]
duplicate result
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/google/error-prone:check_api/src/test/java/com/google/errorprone/names/NeedlemanWunschEditDistanceTest.java:[master, ]
27: public class NeedlemanWunschEditDistanceTest {
26: @RunWith(JUnit4.class)
25: /** Tests for NeedlemanWunschEditDistance */
34:         NeedlemanWunschEditDistance.getEditDistance(
47:         NeedlemanWunschEditDistance.getEditDistance(
62:         NeedlemanWunschEditDistance.getWorstCaseEditDistance(
github.com/google/error-prone:check_api/src/main/java/com/google/errorprone/names/NeedlemanWunschEditDistance.java:[master, ]
30: public final class NeedlemanWunschEditDistance {
32:   private NeedlemanWunschEditDistance() {
20:  * The Needleman-Wunsch algorithm for finding least-cost string edit distances between pairs of
26:  * <p>See http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm
chromium.googlesource.com/arc/arc:third_party/chromium-ppapi/native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
266: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
46:   RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_KEYBOARD);
348: class MouseLockModule : public pp::Module {
216:   DrawNeedle(&image, kForegroundColor);
269:     Log("DrawNeedle with NULL image");
chromium.googlesource.com/arc/arc:third_party/android/external/chromium_org/native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
duplicate result
chromium.googlesource.com/dart/dartium/src:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
duplicate result
chromium.googlesource.com/ios-chromium-mirror:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
duplicate result
chromium.googlesource.com/chromium/src:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
duplicate result
github.com/google/pepper.js:examples/mouselock/mouselock.cc:[master, ]
268: void MouseLockInstance::DrawNeedle(pp::ImageData* image,
48:   RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE |
49:                      PP_INPUTEVENT_CLASS_KEYBOARD);
355: class MouseLockModule : public pp::Module {
217:   DrawNeedle(&image, kForegroundColor);
271:     Log("DrawNeedle with NULL image");
github.com/googleglass/gdk-compass-sample:app/src/main/java/com/google/android/glass/sample/compass/CompassView.java:[master, ]
341:     private void drawNeedle(Canvas canvas, boolean bottom) {
50: public class CompassView extends View {
217:         drawNeedle(canvas, false);
218:         drawNeedle(canvas, true);
github.com/google/ggrc-core:src/ggrc/assets/mockups/javascript/tree_view.js:[release/0.10-Raspberry, ]
22:       function findNeedle(list, slug) {
11:         var $item = $('<li/>', {'class': 'tree-item'});
109:         var $item = $('<li/>', {'class': 'tree-item'});
34:             result = findNeedle(list[prop].children, slug);
46:         item = findNeedle(this.options.instance.children, {
github.com/google/ggrc-core:src/ggrc/assets/mockups/javascript/info_panel.js:[release/0.10-Raspberry, ]
65:       function findNeedle(list, slug) {
19:       this.element.removeClass('hidden').height(0);
53:       el.find('i').addClass('active').closest('li').siblings().find('i')
54:         .removeClass('active');
77:             result = findNeedle(list[prop].children, slug);
93:       view = findNeedle(tab.children, {
android.googlesource.com/platform/external/chromium_org:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
duplicate result
github.com/bazelbuild/bazel:src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java:[master, ]
139:   private Artifact classJar;
142:   private Artifact genClassJar;
144:   private Artifact resourceClassJar;
870:   public Artifact getGenClassJar() {
882:   public Artifact getResourceClassJar() {
77:  * A helper class for android rules.
82: public class AndroidCommon {
91:       RuleContext ruleContext, Mode mode, final Class<T> classType) {
104:       final Class<T> classType) {
188:         AndroidNeverLinkLibrariesProvider.class)) {
195:           deps, JavaCompilationArgsProvider.class)) {
369:       // Needle index is exhausted, so the needle must match.
388:         ruleContext, Mode.TARGET, NativeLibsZipsProvider.class);
405:         ruleContext.isLegalFragment(AndroidConfiguration.class)
407:                 .getFragment(AndroidConfiguration.class)
426:     // We don't actually use the ijar. That is almost the same as the resource class jar
443:         AndroidRuleClasses.ANDROID_RESOURCES_CLASS_JAR);
450:     // Only build the class jar if it's not already generated internally by resource processing.
470:       // Otherwise, it should have been the AndroidRuleClasses.ANDROID_RESOURCES_CLASS_JAR.
474:                   AndroidRuleClasses.ANDROID_RESOURCES_CLASS_JAR)));
546:     classJar = ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_LIBRARY_CLASS_JAR);
554:               .getProvider(FileProvider.class)
579:       // Use a fast-path R class generator for android_binary with local resources, where there is
580:       // a bottleneck. For legacy resources, the srcjar and R class compiler don't match up
641:         // layout XML up the dependency chain. Say a library's XML references a Java class,
763:       builder.add(GeneratedExtensionRegistryProvider.class, generatedExtensionRegistryProvider);
792:         .add(JavaRuleOutputJarsProvider.class, ruleOutputJarsProvider)
793:         .add(JavaSourceJarsProvider.class, sourceJarsProvider)
795:             JavaRuntimeJarProvider.class,
797:         .add(RunfilesProvider.class, RunfilesProvider.simple(getRunfiles()))
798:         .add(AndroidResourcesProvider.class, resourceApk.toResourceProvider(ruleContext.getLabel()))
800:             AndroidIdeInfoProvider.class,
811:         .add(JavaCompilationArgsProvider.class, compilationArgsProvider)
849:     return prerequisite.getProvider(AndroidResourcesProvider.class);
862:         && ruleContext.getFragment(AndroidConfiguration.class).allowSrcsLessAndroidLibraryDeps();
935:     return context.getConfiguration().getFragment(AndroidConfiguration.class);
943:             OutputGroupProvider.class)) {
966:       // But it's still important to process the deps' .bin files so any Java class references get
1005:       ApkProvider apkProvider = dep.getProvider(ApkProvider.class);
1006:       FileProvider fileProvider = dep.getProvider(FileProvider.class);
49: import com.google.devtools.build.lib.rules.java.ClasspathConfiguredFragment;
53: import com.google.devtools.build.lib.rules.java.JavaCompilationArgs.ClasspathType;
96:         builder.add(ruleContext.getPrerequisites(attr, mode, classType));
109:         builder.add(ruleContext.getPrerequisites(attr, mode, key, classType));
209:       Artifact jarToDex, Artifact classesDex, List<String> dexOptions, boolean multidex,
229:     args.add("--output=" + classesDex.getExecPathString());
235:         .addOutput(classesDex)
423:     // Add the compiled resource jar to the classpath of the main compilation.
425:     // Add the compiled resource jar to the classpath of consuming targets.
494:       // combined resource constants copy needs to come before library classes that may contain
547:     idlHelper = new AndroidIdlHelper(ruleContext, classJar);
589:         // Combined resource constants needs to come even before our own classes that may contain
630:     this.jarsProducedForRuntime = jarsProducedForRuntime.add(classJar).build();
642:         // e.g.: "<variable type="some.package.SomeClass" />". Data binding's annotation processor
643:         // triggers a compile against SomeClass. Because data binding reprocesses bindings
645:         // happens at the top-level binary. Since SomeClass.java is declared in the library, this
653:     helper.addLibrariesToAttributes(javaCommon.targetsTreatedAsDeps(ClasspathType.COMPILE_ONLY));
654:     attributes.setRuleKind(ruleContext.getRule().getRuleClass());
658:         javaCommon.targetsTreatedAsDeps(ClasspathType.BOTH));
681:       // We only want to add a jar to the classpath of a dependent rule if it has content.
682:       javaArtifactsBuilder.addRuntimeJar(classJar);
683:       jar = classJar;
686:     filesBuilder.add(classJar);
688:     manifestProtoOutput = helper.createManifestProtoOutput(classJar);
693:       genClassJar = helper.createGenJar(classJar);
694:       genSourceJar = helper.createGensrcJar(classJar);
695:       helper.createGenJarAction(classJar, manifestProtoOutput, genClassJar);
704:     outputDepsProto = helper.createOutputDepsProtoArtifact(classJar, javaArtifactsBuilder);
705:     helper.createCompileActionWithInstrumentation(classJar, manifestProtoOutput, genSourceJar,
732:         new ClasspathConfiguredFragment(
760:     idlHelper.addTransitiveInfoProviders(builder, classJar, manifestProtoOutput);
773:             .addOutputJar(classJar, iJar, ImmutableList.of(srcJar))
783:     javaCommon.addTransitiveInfoProviders(builder, filesToBuild, classJar, ANDROID_COLLECTION_SPEC);
887:    * Returns Jars produced by this rule that may go into the runtime classpath.  By contrast
888:    * {@link #getRuntimeJars()} returns the complete runtime classpath needed by this rule, including
909:         javaCommon.targetsTreatedAsDeps(ClasspathType.BOTH), ImmutableList.<String>of());
967:       // re-referenced so they don't get filtered out of the compilation classpath by JavaBuilder
968:       // (which filters out classpath .jars that "aren't used": see --reduce_classpath). If data
983:       compileDeps = JavaCommon.defaultDeps(ruleContext, semantics, ClasspathType.COMPILE_ONLY);
985:       runtimeDeps = JavaCommon.defaultDeps(ruleContext, semantics, ClasspathType.RUNTIME_ONLY);
986:       bothDeps = JavaCommon.defaultDeps(ruleContext, semantics, ClasspathType.BOTH);
42: import com.google.devtools.build.lib.packages.SkylarkClassObject;
43: import com.google.devtools.build.lib.packages.SkylarkClassObjectConstructor;
102:   public static final <T extends SkylarkClassObject> Iterable<T> getTransitivePrerequisites(
103:       RuleContext ruleContext, Mode mode, SkylarkClassObjectConstructor.Key key,
258:             .setIdlClassJar(idlHelper.getIdlClassJar())
312:     String packageName = JavaUtil.getJavaFullClassname(nameFragment);
420:       boolean useRClassGenerator)
422:     compileResourceJar(javaSemantics, resourceApk, resourcesJar, useRClassGenerator);
424:     attributes.addDirectJars(NestedSetBuilder.create(Order.STABLE_ORDER, resourceClassJar));
429:     artifactsBuilder.addCompileTimeJar(resourceClassJar);
433:     filesBuilder.add(resourceClassJar);
438:       boolean useRClassGenerator)
441:         AndroidRuleClasses.ANDROID_RESOURCES_SOURCE_JAR);
442:     resourceClassJar = ruleContext.getImplicitOutputArtifact(
451:     if (resourceApk.getResourceJavaClassJar() == null) {
452:       if (useRClassGenerator) {
453:         RClassGeneratorActionBuilder actionBuilder =
454:             new RClassGeneratorActionBuilder(ruleContext)
457:                 .setClassJarOut(resourceClassJar);
461:             javacHelper.createOutputDepsProtoArtifact(resourceClassJar, javaArtifactsBuilder);
463:             resourceClassJar,
472:           resourceApk.getResourceJavaClassJar().equals(
496:       attributes.addRuntimeClassPathEntry(resourcesJar);
550:     ImmutableList<Artifact> bootclasspath;
552:       bootclasspath = ImmutableList.<Artifact>builder()
553:           .addAll(ruleContext.getPrerequisite("$desugar_java8_extra_bootclasspath", Mode.HOST)
559:       bootclasspath =
567:             .setBootClassPath(bootclasspath);
582:       boolean useRClassGenerator = isBinary && !resourceApk.isLegacy();
584:           filesBuilder, useRClassGenerator);
591:         artifactsBuilder.addRuntimeJar(resourceClassJar);
592:         jarsProducedForRuntime.add(resourceClassJar);
600:             resourceApk.getPrimaryResource().getJavaPackage(), resourceClassJar);
628:       jarsProducedForRuntime.add(generatedExtensionRegistryProvider.getClassJar());
698:     srcJar = ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_LIBRARY_SOURCE_JAR);
731:     javaCommon.setClassPathFragment(
736:             helper.getBootclasspathOrDefault()));
766:     if (resourceClassJar != null && resourceSourceJar != null) {
767:       resourceJar = new OutputJar(resourceClassJar, null, ImmutableList.of(resourceSourceJar));
784:     javaCommon.addGenJarsProvider(builder, genClassJar, genSourceJar);
871:     return genClassJar;
883:     return resourceClassJar;
1014:         supportApks.addAll(FileType.filter(fileProvider.getFilesToBuild(), AndroidRuleClasses.APK));
chromium.googlesource.com/experimental/src-pruned-refs:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
duplicate result
chromium.googlesource.com/chromium/chromium:native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[trunk, ]
duplicate result
chromium.googlesource.com/chromium/codesearch:src/native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc:[master, ]
duplicate result
android.googlesource.com/platform/external/swig:Doc/Manual/CPlusPlus11.html:[master, ]
807: <H3><a name="CPlusPlus11_allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object"></a>7.2.24 Allow sizeof to work on members of classes without an explicit object</H3>
11: <div class="sectiontoc">
81: <div class="code"><pre>
82: class MyClass {
96: <div class="code"><pre>
103: <div class="code"><pre>
115: <div class="code"><pre>
116: extern template class std::vector&lt;MyClass&gt;; // explicit instantiation
120: class MyClass {
136: <div class="shell">
144: They often appear in constructors which are overloaded with alternative approaches to initializing a class,
149: <div class="code"><pre>
151: class Container {
160: <p>Alternatively you could modify the class and add another constructor for initialization by some other means,
163: <div class="code"><pre>
165: class Container {
177: <div class="targetlang"><pre>
182: If you are unable to modify the class being wrapped, consider ignoring the initializer-list constructor and using
186: <div class="code"><pre>
199: class Container {
209: The above makes the wrappers look is as if the class had been declared as follows:
212: <div class="code"><pre>
214: class Container {
233: <div class="code"><pre>
237: class Container {
265: <div class="code"><pre>
284: <div class="targetlang"><pre>
298: <div class="code"><pre>
304: <div class="code"><pre>
319: <div class="code"><pre>
333: <div class="code"><pre>
345: <div class="code"><pre>
353: <div class="code"><pre>
365: <div class="targetlang"><pre>
372: <div class="code"><pre>
383: <div class="code"><pre>
384: class A {
398: Constructor inheritance is parsed correctly, but the additional constructors are not currently added to the derived proxy class in the target language. Example is shown below:
405: <div class="code"><pre>
406: class BaseClass {
411: class DerivedClass: public BaseClass {
424: <div class="code"><pre>
448: <p>SWIG parses the new <tt>enum class</tt> syntax and forward declarator for the enums:</p>
449: <div class="code"><pre>
450: enum class MyEnum : unsigned int;
457: <div class="code"><pre>
458: class Color {
459:   enum class PrintingColors : unsigned int {
463:   enum class BasicColors {
467:   enum class AllColors {
476: <div class="code"><pre>
477: class PrintingColors {
483: class BasicColors {
489: class AllColors {
503: <div class="code"><pre>
513: <div class="code"><pre>
514: class U {
519: class V {
524: class TestClass {
549: <div class="code"><pre>
551: class SomeType {
565: <div class="shell">
575: <div class="code"><pre>
583: <div class="shell">
592: <div class="code"><pre>
603: <div class="code"><pre>
626: block, variadic class inheritance and variadic constructor and
629: <div class="code"><pre>
630: template &lt;typename... BaseClasses&gt; class ClassName : public BaseClasses... {
641: <div class="code"><pre>
649: <div class="code"><pre>
662: <div class="code"><pre>
691: <div class="code"><pre>
698: <div class="code"><pre>
706: <div class="code"><pre>
717: <div class="shell"><pre>
726: <div class="code"><pre>
734: <div class="code"><pre>
742: <div class="code"><pre>
754: <div class="code"><pre>
774: <div class="code"><pre>
800: <div class="code"><pre>
813: <div class="code"><pre>
822: <div class="targetlang"><pre>
837: <div class="code"><pre>
883: <div class="code"><pre>
887: template&lt; class F, class P &gt; void g( F f, P t )  { f(t); }
912: <div class="code"><pre>
929: <div class="targetlang"><pre>
939: <div class="code"><pre>
942:   template&lt; class T1, class T2 &gt; int do_it( T1&amp;, T2&amp; )  { /*...*/ }
946:   template&lt; class T1, class T2 &gt; int do_it( T1, T2 )  { /*...*/ }
949: template&lt; class T1, class T2 &gt; int elaborate( T1 A, T2 B ) {
962: <p>SWIG does not wrap the new result_of class introduced in the &lt;functional&gt; header and map the result_of::type to the concrete type yet. For example:</p>
963: <div class="code"><pre>
970: template&lt;class Fun, class Arg&gt;
982: <div class="targetlang"><pre>
39: <li><a href="#CPlusPlus11_allow_sizeof_to_work_on_members_of_classes_without_an_explicit_object">Allow sizeof to work on members of classes without an explicit object</a>
83:   MyClass(MyClass&amp;&amp; p) : ptr(p.ptr) {p.ptr = 0;}
84:   MyClass&amp; operator=(MyClass&amp;&amp; p) {
132: they are intended for compile time initialization of classes using the special <tt>std::initializer_list</tt> type.
248: Needless to say, this approach is very limited, but could be improved upon, but only slightly.
400: The extra constructors provided by the <tt>using</tt> syntax will add the appropriate constructors into the target language proxy derived classes.
401: In the example below a wrapper for the <tt>DerivedClass(int)</tt> is added to <tt>DerivedClass</tt>:
408:   BaseClass(int iValue);
413:   using BaseClass::BaseClass; // Adds DerivedClass(int) constructor
454: This is because SWIG doesn't support nested classes. This is usually not a problem, however, 
474: <p>A workaround is to write these as a series of separated classes containing anonymous enums:</p>
527:         TestClass( U const &amp;val ) { t=val.u; }
529:         explicit TestClass( V const &amp;val ) { t=val.v; }
539: SWIG target languages, because all use their own facilities (eg. classes Cloneable and Comparable in Java)
632:    ClassName (BaseClasses&amp;&amp;... baseClasses) : BaseClasses(baseClasses)... {}
642: %template(MyVariant1) ClassName&lt;&gt;         // zero argument not supported yet
643: %template(MyVariant2) ClassName&lt;int&gt;      // ok
644: %template(MyVariant3) ClassName&lt;int, int&gt; // too many arguments not supported yet
650: const int SIZE = sizeof...(ClassName&lt;int, int&gt;);
851: classes introduced (thread, mutex, locks, condition variables, task). The main reason is that
857: <p>SWIG does not wrap the new tuple types and the unordered_ container classes yet. Variadic template support is working so it is possible to
863: <p>SWIG does not wrap the new C++11 regular expressions classes, because the SWIG target languages use their own facilities for this.</p>
881: <p>The new ref and cref classes are used to instantiate a parameter as a reference of a template function. For example:</p>
901: <p>The ref and cref classes are not wrapped by SWIG because the SWIG target languages do not support referencing.</p>
907: SWIG supports functor classes in some languages in a very natural way.
github.com/google/mysql-protobuf:unittest/gunit/item_like-t.cc:[mysql-5.7.9, ]
218: static const char* falseNeedles[] = {
25: #include "sql_class.h"
39: class ItemLikeTest : public ::testing::Test
91: class ItemLikeTestP : public ::testing::TestWithParam<const char*>
108: class ItemFalseLikeTestP : public ::testing::TestWithParam<const char*>
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)
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;
35: class Visualization5RS extends RenderScriptScene {
51:     static class WorldState {
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;
35: class Visualization4RS extends RenderScriptScene {
51:     static class WorldState {
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
github.com/google/csp-evaluator:third_party/closure-library/closure/goog/ui/gaugetheme.js:[master, ]
127: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
139: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/google/beautiful-audio-editor:third_party/closure_library/closure/goog/ui/gaugetheme.js:[master, ]
128: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
140: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/google/tracing-framework:third_party/closure-library/closure/goog/ui/gaugetheme.js:[master, ]
127: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
139: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the
github.com/karma-runner/karma-closure:test-app/lib/goog/ui/gaugetheme.js:[master, ]
127: goog.ui.GaugeTheme.prototype.getNeedleStroke = function() {
139: goog.ui.GaugeTheme.prototype.getNeedleFill = function(cx, cy, r) {
31:  * A class for the default color theme for a Gauge.
32:  * Users can extend this class to provide a custom color theme, and apply the