find

Can anyone improve on the below Fuzzyfind function for VBA?

馋奶兔 提交于 2019-12-12 03:46:19
问题 This function lets you find similar strings from a range without having to do an exact search. The formula looks like this: =FuzzyFind(A1,B$1:B$20) assuming the string you are performing a search for is in A1 and your reference or options table is B1:B20 The code is here: Function FuzzyFind(lookup_value As String, tbl_array As Range) As String Dim i As Integer, str As String, Value As String Dim a As Integer, b As Integer, cell As Variant For Each cell In tbl_array str = cell For i = 1 To Len

Type Find Function Not Called in GStreamer Plugin

谁都会走 提交于 2019-12-12 03:34:26
问题 I have an element that decodes a media type, mytype for example. I want to register the type so that the decodebin element can use my element if needed. I added the code for what I thought would work, but my type_find() function is never called. Any ideas on what I'm doing wrong? Here's what the code looks like: #define MY_CAPS (gst_static_caps_get(&my_caps)) static GstStaticCaps my_caps = GST_STATIC_CAPS("audio/x-mycaps"); static gchar *my_exts[] = { "mtype", NULL }; static void type_find

Find all files and unzip specific file to local folder

我们两清 提交于 2019-12-12 03:34:10
问题 find -name archive.zip -exec unzip {} file.txt \; This command finds all files named archive.zip and unzips file.txt to the folder that I execute the command from, is there a way to unzip the file to the same folder where the .zip file was found? I would like file.txt to be unzipped to folder1. folder1\archive.zip folder2\archive.zip I realize $dirname is available in a script but I'm looking for a one line command if possible. 回答1: @iheartcpp - I successfully ran three alternatives using the

Replacing values closest to Nan with a value, within a matrix, in Matlab

喜欢而已 提交于 2019-12-12 03:33:29
问题 I am new to Matlab and I have a matrix: M =[NaN NaN NaN 2010 5454; NaN NaN 2009 3000 5000 NaN 2011 3256 5454 6000 2009 4000 5666 6545 5555 5000 5666 6000 7000 8000]; I want to replace values closest to Nan with a value of 2010. I know how to do it manually and one by one. Is there any to create a loop to find these values and replace them? The result should look like this: M =[NaN NaN NaN 2010 5454; NaN NaN 2010 3000 5000 NaN 2010 3256 5454 6000 2010 4000 5666 6545 5555 5000 5666 6000 7000

How to extract text and set as variable Batch Code CMD

十年热恋 提交于 2019-12-12 03:29:18
问题 I would like to extract what users are online based on this text file: https://minecraft-statistic.net/en/server/167.114.43.185_25565/json/ I will save it as a text file. Inside that there is something: "players_list":["Raskhol"]["Lukaka"],"map":...etc I would like to extract all the text between "_list": and ,"map" and set it as a variable. So that when I call the variable %Playerlist% , it would say: ["Raskhol"]["Lukaka"] 回答1: similar to @geisterfurz007's answer, this one assumes the you

Is it possible to pass a find command to -exec of another find command?

大憨熊 提交于 2019-12-12 03:26:02
问题 This is just a question of curiosity. I've tried multiple variants, and did research, but can't seem to figure out if this is possible. I want to execute a find command within a find command, something like the following : find /some/dir -type d -exec find -type f -delete {} \; So if we take the example above, this first find command finds directories in a specific folder, and the second find command deletes the files with each of those folders. So, simply put, is it possible in bash to

How to use variable as a path for find command

孤者浪人 提交于 2019-12-12 03:15:40
问题 Can someone give me a hint, how I can make the following bash script run properly: path="/path/" excludepath="! -path \"/path/to/exclude/*\" " find "$path" "$excludepath" -name *."txt" -type f When I try to run it I get: find: `! -path "/path/to/exclude/*"': No such file or directory Thank you in advance. 回答1: Your problem was the fact that "$excludepath" is a single argument, even if it contains spaces. To put several arguments, use an array of strings instead of a string: excludepath=(!

return only 1 element of an array

荒凉一梦 提交于 2019-12-12 03:07:16
问题 I have a mongodb collection structured like this: /* 1 */ { "_id" : ObjectId("551fc02d26a8a48c32000029"), "nome" : "ist1", "username" : "istituzione1", "email" : "some@email.it", "pwd" : "0cc175b9c0f1b6a831c399e269772661", "punti" : [{ "punto_id" : ObjectId("551fc0ca26a8a48c3200002b"), "youtubelink" : "", "immagini" : [{ "name" : "iis-8.png", "imgid" : ObjectId("551fc17426a8a48c3200002f"), "contenttype" : "image/png" }, { "name" : "iis-85.png", "imgid" : ObjectId("551fc17526a8a48c32000031"),

Backbone collection find I want only one result

半城伤御伤魂 提交于 2019-12-12 02:40:40
问题 I'm working with find Backbone and I have 20-30 results, I need the first result and I don't have the id for filter for id. model = coleccion.find( function(e){ return ( e.get('car').category === data_category && e.get('full_empty') === 0 && e.get('idprovider') === data_provider ); } ); 回答1: You can use collection.at(0) if you want to get the first model. Or collection.shift() if you want to get the first model, then remove this model from the collection. Read more at Backbonejs Collection

How can I replace text in RichTextBox form another form?

情到浓时终转凉″ 提交于 2019-12-12 02:27:18
问题 So I have a RichTextBox called richTextBox1 , in a form named XMLEditor I want to be able to rename any chosen word in all parts of the rich text box with anything I want. (Like find and replace in notepad). But I want to use another form called Find (It looks like Find & Replace in notepad) to have functions that will replace the words in the richTextBox1 that is in XMLEditor . The form named Find has a 2 textboxes and 1 button. The first textbox named textBox1 will be used to choose the