index

Can someone explain this example of deleting elements from a matrix in MATLAB?

The following example appears in the MATLAB tutorial: X = [16 2 13; 5 11 8; 9 7 12; 4 14 1] Using a single subscript deletes a single element, or sequence of elements, and reshapes the remaining elements into a row vector. So: X(2:2:10) = [] results in: X = [16 9 2 7 13 12 1] Mysteriously, the entire 2nd ro...

Javascript for/in loops through properties, not indexes and returns strings.

Ok, I have this code: var room = [ { time: 0, people: 0 } ]; and then: time = 5; for( var i in room ) { if( room[i].time < time ){ spliceIndex = i + 1; } } console.log(spliceIndex); And the console reads: 01 - Which means the 1 is concatenated which further means that i is a string, and not an integer as expected. Casting t...

Full text catalog population always in progress, never actually populated

Hi, I have created a full text index on my dev server on a view that returns few rows. The population schedule is currently set to run once a day. However the full text index is returning no results as though it is not populated. If I run SELECT FULLTEXTCATALOGPROPERTY('My Catalog', 'PopulateStatus'), the result is always 1, indicatin...

How to index and search .doc files

I have an application that needs to have .doc files uploaded to it. These documents should then be index and the whole collection of documents should be searchable. This will run on a Windows Server, without Word installed, using IIS and SqlServer, but I'd rather not be tied to SqlServer's full text indexing. I was thinking of using Luc...

Why, when I append to an empty array in PHP, is the index 2?

I have a method in a class that will append an item to an array member of the class. When the array member is empty (but previously had two items in it at index 1 and index 2) and I call the method, the item is inserted at index 2. Why is that? If anyone doesn't know right off the bat, I can provide MANY more details. ...

sql server avg_user_impact

In the DMV sys.dm_db_missing_index_group_stats, there is a field named avg_user_impact. Per BOL, this shows the Average percentage benefit that user queries could experience if this missing index group was implemented. The value means that the query cost would on average drop by this percentage if this missing index group was implem...

INDEX in Postgres?

What does the INDEX-expression do? An example at the end: CREATE TABLE tags ( tag_id varchar(255) NOT NULL, "{Users}{userID}question_id" int4 NOT NULL, tag varchar(20), CONSTRAINT tag PRIMARY KEY (tag_id)); CREATE INDEX tags_tag ON tags (tag); ...

How to get list of all search keyword in Lucene?

I need the list of all search keyword(term) i.e. indexed in lucene index. I googled for it. but, i didn't get the solution. Is it possible to get the list of all search term? ...

MySQL not using index with JOIN, WHERE and ORDER

We have two tables resembling a simple tag-record structure as follows (in reality it's much more complex but this is the essance of the problem): tag (A.a) | recordId (A.b) 1 | 1 2 | 1 2 | 2 3 | 2 .... and recordId (B.b) | recordData (B.c) 1 | 123 2 | 666 3 | 124...

What should i add to my site to make google index the subpages as well

I am a beginner web developer and i have a site JammuLinks.com, it is built on php. It is a city local listing search engine. Basically i've written search pages which take in a parameter, fetch the records from the database and display it. So it is dynamically generating the content. However if you look at the bottom of the site, i have...

MySQL indices and order

This is a question that I've had forever. As far as I know the order of indices matter. So an index like [first_name, last_name] is not the same as [last_name, first_name], right? If I only define the first index, does it mean that it will only used for SELECT * FROM table WHERE first_name="john" AND last_name="doe"; and not for SELEC...

Workaround for missing descending index feature in MySQL

Hello! We have a problem with our production environment which uses a modified version of jBPM that has support for priorities. Indices present are: | JBPM_TIMER | 1 | JBPM_TIMER_DUEDATE__PRIORITY_ | 1 | PRIORITY_ | A | 2 | NULL | NULL | YES | BTREE | | | JBPM_TIMER | ...

Why does MySQL use the wrong index?

Hello! I have another question regarding optimizing mysql indices for our prioritizing jBPM. The relevant indices look like this: | JBPM_TIMER | 1 | JBPM_TIMER_REVERSEPRIORITY__DUEDATE_ | 1 | REVERSEPRIORITY_ | A | 17 | NULL | NULL | YES | BTREE | | | JBPM_TIMER | ...

Two columns in Mysql with uniqueness constraint between column1 and column2

Hi, Let us consider a user table: Username,email1,email2 Now, I want to make sure that no two rows in this table have any common email address. What would be the best way to ensure this ? E.g.: If table has row: "Bill,[email protected],[email protected]", then trying to insert a row like "Billy,[email protected],[email protected]" should give an ...

(Rails) In-place editing of attributes via an "index" page.

Hi All, I'm looking to use "in_place_editor_field" on an "Index" page of items. Basically I want to mimic spreadsheet functionality for pre-existing line items in order to edit their attributes. However, none of the "in_place_editor" examples I've seen provide any useful real-world application of this nature. Also, a lot of the exi...

DataGridView CurrentRow excludes new row

I want to get the index of the current row of my DataGridView. The problem is, that if the current row is the new row, CurrentRow is set to the last row that is not the new row. I cannot check for the rows to be selected because if a row is selected that doesn't mean it is the current row and the current row isn't necessarily selected. ...

Naming a page index.html changes it?

I restarted my laptop and it was fine. Thankyou for the replies The problem is, I have two pages and they have exactly the same code, the only difference are the file names, which is index and index2, but for some reason index header div is smaller than the index2 header div, even though there is no difference between them. ...

Type Conversion in Persisted Computed Column

Hi everybody I'm working with 2 related tables in a Microsoft SQL Server 2008 environment which are connected via a GUID. In one table, the field has the type varchar(50), the other one is properly types as uniqueidentifier. This is obviously bad but I can't change this now because it's given by a legacy piece of software. The conversi...

MySQL slow query in rare cases even though index is being used

Hi, I have a query in a large MySQL table (>4 million rows). This query is used in a stored procedure and it searches by surname and another numeric field. When I use different combinations of these search parameters, I get quick results (between 1 and 2s) but with some particular values, I get a query which takes 9s to return results o...

MySQL "set unique_checks", "set foreign_key_checks" vs. "alter table disable keys"

We're having a problem where a mysqldump script is spending 90% of it's time populating a small handful of the tables it deals with. Eliminating FK's and indexes eliminates the speed problem, but is not an acceptable solution. The dump script DOES have: /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET ...