search

Search filesystem for filepath using VBA

喜夏-厌秋 提交于 2019-12-24 21:52:11
问题 I am looking for a way to search a specific folder for a subfolder containing a certain string. Below I have listed a function I typed off the top of my head to see if it would work. Well, it does work but when I am talking about searching through 6,000 folders on a network drive it just isn't fast enough. I'm sure that there is a better way to do it but I can't seem to dig anything up on Google. Is there an object that allows me to leverage the windows built in file system searching and

Class Issues involving an Array

拈花ヽ惹草 提交于 2019-12-24 21:50:27
问题 I'm attempting to make an array of WordCount s, then iterate through a file line by line separating it into tokens using a split method. Then for each token, if it's in wordList , increment count , and if it's not in wordList just simply add it to the list. Hmwk class - public class Hmwk { public static void main(String[] args) throws FileNotFoundException { int n=0; WordCount[] wordList= new WordCount[10000]; Scanner words = new Scanner(new File("input.txt")); while (words.hasNextLine() && n

Match tags in MYSQL

妖精的绣舞 提交于 2019-12-24 20:50:19
问题 I wanted to know how can you search in tags p.s. I have a table where there is a column for tags "bar,barmen,drink". In search for example people search for barmen drink, how do I match this, I tried LIKE, INSTR() but no luck, the point is that tags column content doesn't have spaces between. It's like "bar,barmen,drink" not like "bar, barmen, drink" Any help..? 回答1: This is a problem inherent with this type of design. Short of changing how you store the data, you'd have to do a search like

Python complete search in one pass function

倾然丶 夕夏残阳落幕 提交于 2019-12-24 20:29:22
问题 I am writing a program that takes in a list of start and end times for farmers milking cows and determines both the longest time where >=1 cow is being milked and the longest time where no cows are being milk. In it, I've tried using this function. It's an exercise on complete search, but this isn't fast enough when there's a lot of data (I think because there are n^2 iterations). timesIS is simply a list of the times in increasing start order, and timesDE is a list of the same times by

iOS: How to parse XML for real-time search

∥☆過路亽.° 提交于 2019-12-24 19:33:28
问题 For now I am parsing a XML file like the example from Apple (LazyTableImages). Everything works fine. I'd like to add a real-time search (UISearch) which has to parse another XML file (specially programmed for the search). How can I parse this file without freezing the screen? 回答1: You use a GCD and dispatch a block to do this while parsing in the background (and maybe showing a spinner). Your XML parser delegate should be looking at a "cancel" flag, so if the user does something like hit

Searching through ListView item and database on Android

。_饼干妹妹 提交于 2019-12-24 19:24:21
问题 I tried this code but it's too time-taking to iterate through all the list item. item_all is a list which contains data I got from the database. et_Search.addTextChangedListener(new TextWatcher() { int textlength; long time = System.currentTimeMillis(); @Override public void onTextChanged(CharSequence s, int start, int before, int count) { textlength = getSearchText().length(); item_filtered = new ArrayList<StockItem>(); long time = System.currentTimeMillis(); int i = 0; do { int startpost =

Finding sum of average sub aggregations

萝らか妹 提交于 2019-12-24 19:20:35
问题 I'd like to get the sum of a sub aggregation. For example, I'm grouping by smartphones, then by carrier, and then I'm finding the average price of each carrier for that particular smartphone. I'd like to get the sum of the average prices for all carriers for each smartphone. So essentially, I want something like this: { "aggs": { "group_by_smartphones": { "terms": { "field": "smartphone", "order": { "_term": "asc" }, "size": 200 }, "aggs": { "group_by_carrier": { "terms": { "field": "carrier"

SQL Algorithm Trouble - for loop to add and filter results

邮差的信 提交于 2019-12-24 19:18:57
问题 I am struggling yet again with SQL with my search function. Basically I want a stored proc that splits up a string into words then for each word I want to check using Full Text Search if it is in any of 2 tables. If results are found in these tables it should add them to any results it found for the other words and return a set where the record is in both these sets. So here is my algorithm if null return all restaurants declare results = empty for each word if in restaurant.name or cuisine

Oracle Nested Table predicate in where clause

。_饼干妹妹 提交于 2019-12-24 19:03:27
问题 I have a table that supposed to be searched with multiple columns, which can have multiple values create table t as select * from all_objects; create bitmap index IDX_DATA_OBJECT_ID on T (DATA_OBJECT_ID); create bitmap index IDX_LAST_DDL_TIME on T (LAST_DDL_TIME); create bitmap index IDX_OBJECT_NAME on T (OBJECT_NAME); create bitmap index IDX_OBJECT_TYPE on T (OBJECT_TYPE); create or replace type strarray as table of varchar2(4000) CREATE OR REPLACE PROCEDURE p_search(op_cursor out SYS

Find and replace by a dictionary, using keys only once

强颜欢笑 提交于 2019-12-24 18:02:10
问题 This is a follow-up of Find multiple keywords within a dictionary. My questions are... The first is: I believe this matches words that are not whole. Like if short is in my dictionary it matches the word shortly. How would I stop this? And the second not so important but would be nice is: How would I make it so it only matches once per content? So short doesn't get defined twice within the same content area. Thanks! 回答1: I have implemented the following additional requirements: Do not match