indexing

Advantage Database Index Collation Sequence

纵饮孤独 提交于 2019-12-20 02:16:24
问题 I am converting a Delphi program from the BDE to Advantage Database. On weekends I work on a Win 7 machine using Delphi XE. During the week I work on a Win XP machine using Delphi 7. Advantage tables work fine on the Win 7 machine but when copied to the XP machine they cannot be accessed - Error 5175 the index was created with a different collation sequence I have searched the net, even gone into the Advantage forums but can't find anything helpful. The XP and Win 7 are both set up the same

How can I delete component from list in R?

不打扰是莪最后的温柔 提交于 2019-12-20 01:59:44
问题 I am trying to remove a component from list in R, but it is not working. I have list like this: > myList [[1]] [[1]][[1]] [1] "Sunny" "Cloudy" "Rainy" [[1]][[2]] [1] "Warm" "Cold" [[1]][[3]] [1] "Normal" "High" [[1]][[4]] [1] "Strong" "Weak" [[1]][[5]] [1] "Warm" "Cool" [[1]][[6]] [1] "Same" "Change" [[2]] [[2]][[1]] [1] "Sunny" "Cloudy" "Rainy" [[2]][[2]] [1] "Warm" "Cold" [[2]][[3]] [1] "Normal" "High" [[2]][[4]] [1] "Strong" "Weak" [[2]][[5]] [1] "Warm" "Cool" [[2]][[6]] [1] "Same" "Change

Subsetting lists via logical index vectors

最后都变了- 提交于 2019-12-19 23:23:21
问题 I have a complex list and need to select a subset from it, based on the value of a boolean element (I need records with hidden value equal to FALSE ). I've tried the following code, based on index vectors , but it fails (as shown at the end of this output): startups <- data$startups[data$startups$hidden == FALSE] Or, alternatively: startups <- data$startups[!as.logical(data$startups$hidden)] Interactive R session proves that the data is there: Browse[1]> str(data$startups, list.len=3) List of

Check if URL is indexed by Google using PHP

一笑奈何 提交于 2019-12-19 23:23:01
问题 I would like to know if it's possible to check if URL is indexed by Google using PHP. Is this against their ToS? 回答1: You can read here (relevant citation below) for an answer to the ToS part of this. Basically, without an API key and their permission, it probably is not a good idea. However, due to the volume they handle, you might be able to get away with it if you're not making TONS of requests. PageRank checking is something else that people often try to do, but they don't place as much

Check if URL is indexed by Google using PHP

99封情书 提交于 2019-12-19 23:22:18
问题 I would like to know if it's possible to check if URL is indexed by Google using PHP. Is this against their ToS? 回答1: You can read here (relevant citation below) for an answer to the ToS part of this. Basically, without an API key and their permission, it probably is not a good idea. However, due to the volume they handle, you might be able to get away with it if you're not making TONS of requests. PageRank checking is something else that people often try to do, but they don't place as much

change index inside a for loop

痞子三分冷 提交于 2019-12-19 21:41:27
问题 Am I able to change the index inside the for loop in java? For example: for (int j = 0; j < result_array.length; j++){ if (item==" ") { result_array[j] = "%"; result_array[j+1] = "2"; result_array[j+2] = "0"; j = j+2; } else result_array[j] = item; } Although it is doing j++ in the for loop, inside the for loop, i am also doing j = j + 3. Is it possible for me to achieve this? 回答1: Yes you can change index inside a for loop but it is too confusing. Better use a while loop in such case. int j

Index a numpy array with another array

余生长醉 提交于 2019-12-19 17:48:48
问题 I feel silly, because this is such a simple thing, but I haven't found the answer either here or anywhere else. Is there no straightforward way of indexing a numpy array with another? Say I have a 2D array >> A = np.asarray([[1, 2], [3, 4], [5, 6], [7, 8]]) array([[1, 2], [3, 4], [5, 6], [7, 8]]) if I want to access element [3,1] I type >> A[3,1] 8 Now, say I store this index in an array >> ind = np.array([3,1]) and try using the index this time: >> A[ind] array([[7, 8], [3, 4]]) the result

How to assign a counter to a specific subset of a data.frame which is defined by a factor combination?

寵の児 提交于 2019-12-19 17:15:08
问题 My question is: I have a data frame with some factor variables. I now want to assign a new vector to this data frame, which creates an index for each subset of those factor variables. data <-data.frame(fac1=factor(rep(1:2,5)), fac2=sample(letters[1:3],10,rep=T)) Gives me something like: fac1 fac2 1 1 a 2 2 c 3 1 b 4 2 a 5 1 c 6 2 b 7 1 a 8 2 a 9 1 b 10 2 c And what I want is a combination counter which counts the occurrence of each factor combination. Like this fac1 fac2 counter 1 1 a 1 2 2 c

How to assign a counter to a specific subset of a data.frame which is defined by a factor combination?

泄露秘密 提交于 2019-12-19 17:14:17
问题 My question is: I have a data frame with some factor variables. I now want to assign a new vector to this data frame, which creates an index for each subset of those factor variables. data <-data.frame(fac1=factor(rep(1:2,5)), fac2=sample(letters[1:3],10,rep=T)) Gives me something like: fac1 fac2 1 1 a 2 2 c 3 1 b 4 2 a 5 1 c 6 2 b 7 1 a 8 2 a 9 1 b 10 2 c And what I want is a combination counter which counts the occurrence of each factor combination. Like this fac1 fac2 counter 1 1 a 1 2 2 c

SQL Server Partitioning - Unique Index Error

一曲冷凌霜 提交于 2019-12-19 16:54:10
问题 I have a table that is partitioned by TRANSACTION_DATE_TIME. Table has a column: ID. I want to create a unique index for ID on partition scheme as: CREATE UNIQUE NONCLUSTERED INDEX [IX_ID_ON_PS_DATETIME] ON [CRD].[TRANSACTION] ( [ID] ASC ) ON [PS_DATETIME_WEEKLY]([TRANSACTION_DATE_TIME]) but SQL says "Partition column for a unique index must be a subset of index key". I really don't need TRANSACTION_DATE_TIME column in this index. How can I create the index without using TRANSACTION_DATE_TIME