C++ Char Array Find / Replace a char

So basically I have an array which looks like this: char array[25]; I have an 'X' put in there, and 24 'O's. I am trying to create a function where I can find the location of 'X' in the array, so then I can move it whenever a control is typed in. ...
more »

2017-10-16 08:10 (4) Answers

vba word: If Then find and replace

in this code, I want to do the following: If the word is finished with a letter M Replace with letter N. If the word ends with a letter N, Replace with letter M. I do not know well using the IF - Then statement. Any help would be greatly appreciate...
more »

2017-10-12 19:10 (1) Answers

Unable to grep the result count

I'm trying to find the specific type of files and grep the string "COMPLETED KO" and if the count is greater than 0 then it'll send the lines containg the string through mail. Below is the script: #!/bin/ksh cd /home/scripts/log FILES=`find . -...
more »

2017-10-12 15:10 (0) Answers

For loop for result of "find" command

I have this find command: $ find . -name '*.jar' -exec grep -Hls BuildConfig {} \; I need to execute this command for each result of command find above: $ zip -d RESULTPATH "*/BuildConfig.class" So can I do this with for loop or not? Can I crea...
more »

2017-10-11 19:10 (2) Answers

BASH: show find all files but not last 2 newest

I have a list of files one time list can contain: 1489247450-filename1 1489248450-filename2 1489249450-filename3 1489249550-filename4 and another time: 1489249450-filename3 1489249550-filename4 and another time: 1489245450-filename1 1489246450...
more »

2017-10-11 18:10 (2) Answers

Search in CSV and count the entries

I have a csv file which imaging my inventory sort and uniq: |Nivcomp Nivelliergerät |Bosch Rotationslaser GRL 300 HV |Renault T440 |Renault Master |Spritzer Silo ... The second CSV file contains the complete inventory. I would like to find and co...
more »

2017-10-10 21:10 (0) Answers

find -print0 -name "* *" (whitespace)

Is there a way to pass all filenames containing whitespace to the pipe, or at least those containing spaces? To that end I attempted: ~/Desktop> find . -type f -mindepth 1 -maxdepth 1 -name "* *" | wc -c 0 ~/Desktop> find . -type f -mi...
more »

2017-10-10 03:10 (1) Answers

Find peaks not larger than a value MATLAB

There is a command in MATLAB2017 as follow: findpeaks() In the documentation has been discussed about the minimum prominence of the peak in the command below: findpeaks(PeakSig,x,'MinPeakProminence',4,'Annotate','extents') There is nothing abou...
more »

2017-10-09 00:10 (0) Answers

Prolog - Need help optimizing my code

I just started learning Prolog and I am doing a school task. I have written the program and it has "passed" all the test cases that have been thrown at it but the program "tester" still fails me because the time limit was exceeded. In other words my ...
more »

2017-10-08 22:10 (0) Answers

Bash: basename inconsistency when run in find

Whole story: I am writing the script that will link all files from one directory to another. New file name will contain an original directory name. I use find at this moment with -execdir option. This is how I want to use it: ./linkPictures.sh 201...
more »

2017-10-08 11:10 (1) Answers

Find element in list that contains unicodes

I have below list, and I would like to know if element "caston" is part of the list. a = [{u'us': u'Running', u'HalfTima': u'1234', u'Boks': u'caston', u'KickoffTime': 1507401900000L, u'AwayName': u'jose'}] I have tried below foudcodes but it does...
more »

2017-10-07 20:10 (3) Answers

Find references to files, recursively

In a project where XML/JS/Java files can contain references to other such files, I'd like to be able to have a quick overview of what has to be carefully checked, when one file has been updated. So, it means I need to eventually have a look at all f...
more »

2017-10-06 11:10 (1) Answers

How can I use grep with all available cores?

Problem: We know the string to look for but do not know which file to look in. for example.. say we have a file that contains the following. blah blah blah.... IMPORTANT NOTE: very important note ..... blah blah blah blah we do not know the ...
more »

2017-10-06 02:10 (2) Answers

excel vba find property with other characters

In the codes, I want to find a specific value's column number in a worksheet and that value will change almost everyday. And sometimes it will contain characters like "İ", "Ş", "#" and other staff. The problem is, find property doesn't work with t...
more »

2017-10-05 10:10 (1) Answers