indexer

How to exclude files from Eclipse indexing (Static Code Analysis)?

家住魔仙堡 提交于 2019-11-30 12:29:43
I have a makefile project comprised of many source, header and other files, which I am trying to convert to an Eclipse "native" project. The problem that the Indexer reports errors and warning on files that exist in the directories but are excluded form the build. As a consequence, large parts of my directory tree are marked with the red x sign. How can I make the Indexer to ignore specific file and/or directories? Note: when defining a directory as "Derived" it is excluded form further searches, but unfortunately not from code analysis. Using project Resource Filters does not solve the

Magento Catalog URL rewrites stuck on processing

瘦欲@ 提交于 2019-11-30 04:12:39
问题 As the title says my Catalog URL rewrites indexer is stuck on processing. I've tried everything and I just can't find a solution to this. Does anyone know a solid fix for this? I've tried truncating core_url_rewrite table and deleting the locks but it still sits on processing. When running it through the admin the page just conitnues loading even though it appears to have finished when I so a count of the table. Forgive me for asking this again but I'm at a total loss and after days hunting

Eclipse has two C/C++ indexers (fast & full): what's the difference?

大城市里の小女人 提交于 2019-11-29 09:23:34
Eclipse CDT provides two indexers for C/C++ code (Preferences > C/C++ > Indexer). Does anybody know what the exact difference is between these two? The help file isn't exactly enlightening: "CDT supports the contribution of additional indexers, with 2 indexers being provided with the default CDT release: Fast C/C++ Indexer : provides fastest indexing capabilities - both declarations and cross reference information. This is the recommended indexer. Full C/C++ Indexer : provides even more accurate indexing capabilities at the cost of performance - both declarations and cross reference

Creating a setter method that takes extra arguments in Ruby

自闭症网瘾萝莉.ら 提交于 2019-11-29 09:11:45
I'm trying to write a method that acts as a setter and takes some extra arguments besides the assigned value. Silly example: class WordGenerator def []=(letter, position, allowed) puts "#{letter}#{allowed ? ' now' : ' no longer'} allowed at #{position}" end def allow=(letter, position, allowed) # ... end end Writing it as an indexer works and I can call it like this: gen = WordGenerator.new gen['a', 1] = true # or explicitly: gen.[]=('a', 1, true) But when I try any of the following, the interpreter complains: gen.allow('a', 1) = false # syntax error gen.allow=('a', 1, false) # syntax error

C# Multiple Indexers

南笙酒味 提交于 2019-11-29 07:03:49
问题 Is it possible to have something like the following: class C { public Foo Foos[int i] { ... } public Bar Bars[int i] { ... } } If not, then are what are some of the ways I can achieve this? I know I could make functions called getFoo(int i) and getBar(int i) but I was hoping to do this with properties. 回答1: Not in C#, no. However, you can always return collections from properties, as follows: public IList<Foo> Foos { get { return ...; } } public IList<Bar> Bars { get { return ...; } } IList<T

C# what is the point or benefit of an indexer?

最后都变了- 提交于 2019-11-29 03:43:21
Doing some code reading and stumbled upon this snippet that I haven't seen before: public SomeClass { public someInterface this[String strParameter] { get { return SomeInternalMethod(strParameter); } } } It looks like it is called as follows: SomeClass _someClass = new SomeClass(); SomeInterface returnedValue = _someClass["someString"]; I am interested in where this function would be appropriate or what the intent of writing in this style. For example why would this be preferred over simply calling the function? Eric Lippert See the language specification, section 10.9, which states: An

Implementing an indexer in a class in TypeScript

对着背影说爱祢 提交于 2019-11-29 02:54:05
Is it currently possible to implement an indexer on a class in TypeScript? class MyCollection { [name: string]: MyType; } This doesn't compile. I can specify an indexer on an interface, of course, but I need methods on this type as well as the indexer, so an interface won't suffice. Thanks. You cannot implement a class with an indexer. You can create an interface, but that interface cannot be implemented by a class. It can be implemented in plain JavaScript, and you can specify functions as well as the indexer on the interface: class MyType { constructor(public someVal: string) { } } interface

Eclipse CDT indexer - how to solve unresolved includes

白昼怎懂夜的黑 提交于 2019-11-29 02:51:10
问题 I have a workspace with multiple projects, which all compile with no problems. However, some of the projects are giving a lot of warnings in the editor about unresolved symbols, due to unresolved includes. Most are headers from other projects in the workspace, or third party libraries. Googling suggests this is a problem with the indexer, but I haven't found any coherent explanations of how to fix it - I assume I need to add the paths to these libraries to the indexer's PATH, but I can't see

Android: how to use SectionIndexer

冷暖自知 提交于 2019-11-28 21:34:40
I am trying to find a way to use SectionIndexer , instead of AlphabetIndexer . What I am interested to do is to have elements of a string arrays on the section headers instead of alphabets. I have not been able to find any sample code using section indexer. Here is a sample code for AlphabetIndexer : private AlphabetIndexer indexer; indexer = new AlphabetIndexer(c, c.getColumnIndexOrThrow( DbHelper.COUNTRIES_NAME),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"); Is it possible to pass a stringArray instead of "ABCDEFGHIJKLMNOPQRSTUVWXYZ" to the AlphabetIndexer so I can for example instead of "A", "B", ..."Z" as

When should you use C# indexers?

醉酒当歌 提交于 2019-11-28 10:51:09
I'd like to use indexers more, but I'm not sure when to use them. All I've found online are examples that use classes like MyClass and IndexerClass . What about in a school system where there are Students and Teachers, and each Teacher has a list of Students that they're in charge of - any need for indexers in that scenario? For simplicity's sake: each Student can only belong to one Teacher. Hassan Tareq Indexer is a highly specialized property which allows instances of a class (or struct) to be indexed just like an array(properties can be static but indexers cannot). Why use indexers: -