tagged [indexing]

Can array indexes be named in C#?

Can array indexes be named in C#? I'm wondering if the index of an array can be given a name in C# instead of the default index value. What I'm basically looking for is the C# equivalent of the follow...

25 Mar at 21:30

Scroll to a postion in a Web Browser using Wpf

Scroll to a postion in a Web Browser using Wpf I cannot seem to programmatcally scroll in WPF in a normal Windows Form I would use the code below but that property does not exist in WPF. Is there an a...

23 Oct at 15:28

How can I remove an element from a list?

How can I remove an element from a list? I have a list and I want to remove a single element from it. How can I do this? I've tried looking up what I think the obvious names for this function would be...

4 Mar at 00:38

Remove index name in pandas

Remove index name in pandas I have a dataframe like this one: How to remove `index name` `foo` from that dataframe? The desired output is like this: ``` In [10]: df Out[10]: Column 1 Apples...

22 Sep at 18:0

Structuring online documentation for a REST API

Structuring online documentation for a REST API I'm building my first Rest API which serialize data to JSON and XML formats. I would like to provide an index page to API clients, where they would be a...

26 Mar at 15:2

How to Remove Array Element and Then Re-Index Array?

How to Remove Array Element and Then Re-Index Array? I have some troubles with an array. I have one array that I want to modify like below. I want to remove element (elements) of it by index and then ...

7 Mar at 09:4

How do I find the index of a character within a string in C?

How do I find the index of a character within a string in C? Suppose I have a string `"qwerty"` and I wish to find the index position of the `e` character in it. (In this case the index would be `2`) ...

29 Jun at 12:35

How to use index in select statement?

How to use index in select statement? Lets say in the employee table, I have created an index(idx_name) on the `emp_name` column of the table. Do I need to explicitly specify the index name in select ...

4 Jul at 04:36

How to choose and optimize oracle indexes?

How to choose and optimize oracle indexes? I would like to know if there are general rules for creating an index or not. How do I choose which fields I should include in this index or when not to incl...

26 Mar at 17:34

Create database index with Entity Framework

Create database index with Entity Framework Say I have the following model: ``` [Table("Record")] public class RecordModel { [Key] [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] ...

Proper terminology, should I say indexes or indices?

Proper terminology, should I say indexes or indices? I had a question about indices on a table and I put it up on Stack Overflow. I got my answer, but someone changed the word `indices` to say `indexe...

2 May at 12:41

How to get row from R data.frame

How to get row from R data.frame I have a data.frame with column headers. How can I get a specific row from the data.frame as a list (with the column headers as keys for the list)? Specifically, my da...

29 Nov at 06:18

Pandas (python): How to add column to dataframe for index?

Pandas (python): How to add column to dataframe for index? The index that I have in the dataframe (with 30 rows) is of the form: The index is not strictly increasing because the data frame is the outp...

4 Nov at 11:12

Type of array index in C#?

Type of array index in C#? What is the type of an array index in C#? For example, in the code below, would the index be cast in an int before accessing the array element (third line)? If not, is it fa...

10 May at 16:14

What does the KEY keyword mean?

What does the KEY keyword mean? In this MySQL table definition: What does the `KEY` keyword mean? It's not a primary key, it's not a foreign key, so is it just an index? If so, what is so special abou...

16 Aug at 10:39

How to print a specific row of a pandas DataFrame?

How to print a specific row of a pandas DataFrame? I have a massive DataFrame, and I'm getting the error: I've already dropped nulls, and checked dtypes for the DataFrame so I have no guess as to why ...

pandas loc vs. iloc vs. at vs. iat?

pandas loc vs. iloc vs. at vs. iat? Recently began branching out from my safe place (R) into Python and and am a bit confused by the cell localization/selection in `Pandas`. I've read the documentatio...

Get the index of the nth occurrence of a string?

Get the index of the nth occurrence of a string? Unless I am missing an obvious built-in method, what is the quickest way to get the th occurrence of a string within a string? I realize that I could l...

12 Jan at 15:16

Rails: Adding an index after adding column

Rails: Adding an index after adding column Suppose I created a table `table` in a Rails app. Some time later, I add a column running: Then I realize I need to add `user_id` as an index. I know about t...

7 Feb at 14:24

Creating string index with Code first

Creating string index with Code first I'm using Entity Framework 6.1 code-first and my domain model is below. When I use update-database for migration, I get the following error. However as far as I r...

datagridview column index

datagridview column index I have a form with a `DataGridView` widget and I need to get the index of the column with the selected name. For example, let's say that I have a table with 2 columns: Name, ...

2 Apr at 12:8

PHP - Get array value with a numeric index

PHP - Get array value with a numeric index I have an array like: So, this native function would return a value based on a numeric index (second arg), ignoring assoc keys, looking for the real position

18 Jun at 13:19

Using an enum as an array index in C#

Using an enum as an array index in C# I want to do the same as in [this question](https://stackoverflow.com/questions/404231/using-an-enum-as-an-array-index), that is: however, I would rather have som...

23 May at 12:17

Does an index of this array exist?

Does an index of this array exist? I've inherited some code at work that has a really bad smell. I'm hoping to find the most painless solution possible. Is there a way to check if some arbitrary numbe...

3 Oct at 13:55

C# third index of a character in a string

C# third index of a character in a string is there a command that can get the third index of a character in a string? For example: In the above sentence, I want to the index of the 3rd colon, the one ...

1 Apr at 09:3