index

How to create an index for Wildcard search on an Int Column in SQL Server ?

I've got a table with millions of rows. The PK of that table is an Int column. User wants to be able to do wildcard search on rows of that table by that PK. When doing this query the trivial way, it will be horribly slow, as Sql server does an implicit conversion of the column value from int to char in order to apply the wildcard every s...

What is the difference between composite non clustered index and covering index

SQL Server 2005 includes "covering index" feature which allows us to select more than one non key column to be included to the existing non clustered index. For example, I have the following columns: EmployeeID, DepartmentID, DesignationID, BranchID Here are two scenarios: EmployeeID is a primary key with clustered index and the re...

How would you access Eclipse JDT index?

How do I access the index that eclipse uses to do Java search, import, etc? ...

Can't *copy* an index from list to another with a twist in Python

I'm pretty new to python and am trying to grab the ropes and decided a fun way to learn would be to make a cheesy MUD type game. My goal for the piece of code I'm going to show is to have three randomly selected enemies(from a list) be presented for the "hero" to fight. The issue I am running into is that python is copying from list to l...

How to also change the location of index files when changing the default build location in Xcode?

I'm using Xcode version 3.2.2. If I follow these steps with Xcode: create a new Cocoa application called "Test" in Info change the "Build Products Path" to "_build" build project I find that there is still a "build" directory being created called: build/Test.build/Test.pbxindex/<various files> These look like the files that Xcode...

Choosing a solr/lucene commit strategy

I have 120k db records to commit into a Solr index. My question is: should I commit after submitting every 10k records, or only commit once after submitting all the 120k records? Is there any difference between these two options? ...

is there a way find substring index through regual expression in python?

i want to find a substring 's index postion,but the substring is long and hard to expression(multiline,& even you need escape for it ) so i want to use regex to match them,and return the substring's index, the function like str.find or str.rfind , is there some package help for this? ...

Optimize query with AVG() and group by on a big table?

I am wondering if there is a way to optimize this query: SELECT Avg(selloff1), YEAR(dt), weekno FROM bbproduct GROUP BY YEAR(dt), weekno Table schema is: CREATE TABLE `bbproduct` ( `id` bigint(20) NOT NULL, `CUSTNO` decimal(6,0) unsigned zerofill NOT NULL default '000000', `DEPTNO` decimal(1,0) uns...

Sharepoint SPTHEMES.xml Custom Themes Index Array issue

Hello All, New to the site and loving it so far. Here's my issue in Sharepoint 2007 MOSS 2007 3.0 I've been creating custom themes for sharepoint by: 1) adding new theme folder under C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES 2) updating the themes .INF file. 3) Adding the new theme in SP...

Getting index of li which has a class and incrementing

I've been all around with hasClass, is(), if then etc. What I'd like to do is when "btn" is clicked, look through a list of li's, find the one that has the class of "on" and get its index value. Depending on that value, run function x, add the class "on" to the next li and remove the class from the current li. I want to avoid running ...

C#: How do I find the index of an item when only part of the item name is known

Firstly, sorry if the title sounds confusing. How do I find the index of an item in a list string when only a substring of that item is known? Like, I have a list called directories. It has C:\test, C:\new and C:\files (3 items). Using the word "new" only, how can I find the index number of C:\new (that is 1) in directories? I am usi...

How to read values from the ArrayList of Structures?

I am using the following code in C#. I am adding the values into the arraylist by using index. Now I want to read the values from the arraylist by using the index only. In the following example I am simply reading all the values from the arrylist but I want to read the values from the arrylist based on index( for e.g Customer_Details[i]...

MySQL query optimization is driving me nuts! Almost same, but horribly different

I have the following two queries (*), which only differ in the field being restricted in the WHERE clause (name1 vs name2): SELECT A.third_id, COUNT(DISTINCT B.fourth_id) AS num FROM first A JOIN second B ON A.third_id = B.third_id WHERE A.name1 LIKE 'term%' SELECT A.third_id, COUNT(DISTINCT B.fourth_id) AS num FROM first A JOIN second...

c# getting current index of generic list

Hi, How can i get index of generic list from form page? For example; aspx.cs List<string> names = new List<string>(); names.Add("a"); names.Add("b"); names.Add("c"); repeaterNames.datasource = names; repeaterNames.DataBind(); aspx <form> <repeater> <itemtemplate> **<%# Eval(?)%>** </itemtemplate> </repeater> </form> ...

MySQL FullText search without FULLTEXT index

Hi, Within one of our systems we have an option that switches the search system between a LIKE search, or a FullText search with either IN BOOLEAN MODE or WITH QUERY EXPANSION For some reason, the FULLTEXT index was missing but when the system was set to be IN BOOLEAN MODE the query still worked, in the case of WITH QUERY EXPANSION the ...

WPF DataBinding specifying array index in Binding not working

I am facing a problem with DataBinding in WPF:::: The below code is working: <TextBox Text="{Binding ProcessStepBlock.ProcessStep[2].ProcessDescription}"></TextBox> <TextBox Text="{Binding ProcessStepBlock.SelectedIndex}" ></TextBox> The below code is not working:It gives me a binding error BindingExpression path error: '[ ]' prope...

Testing user input against a list in python

Hi, i need to test if the user input is the same as an element of a list, right now i'm doing this cars = ("red","yellow","blue") guess = str(input()) if guess == cars[1] or guess == cars[2]: print ("success!") But i'm working with bigger lists and my if statement is growing a lot with all those checks, is there a way to refe...

Filtered index vs normal non clustered index.

Hi, I have 270 million records in a table. Currently I have a non clustered index in it on a date column. 99% of time I use rows with date > 1/1/2008..that means 140 million out of it. I am using SQL server 2008.In this situation will it be beneficial to use filtered index other than normal non-clustered index ? Also if I use "date" da...

C Program - Build an index file from another file

I have a .bin file that contains records in CSV format what I want to do is assign each record in the bin file a sequence number. So the first record in the bin file would be assigned 0 and so on. These will be placed into a bianry index file such as (username, seq #). If I have the bin file already created with records in it, how d...

Iphone tableView index position/setting

Hi all, Sorry if I missed anything about this but I have a table view with 2 large sections and an index to navigate between sections: - (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView { NSMutableArray *listArray = [[NSMutableArray alloc] init]; listArray = [NSArray arrayWithArray:[@"S|H"componentsSeparatedBy...