I am trying to make a script that will replace backslashes in a file, but only if the occurance is a pathname. In the file, there are a lot of regular expressions as well, so I'm trying to preserve the integrity of those regular expressions, but convert Windows relative paths. I'm using bash and... (1 Reply)
I have a process run weekly where I must convert data formats for about thirty files. I read a text file that provides all of the filenames and switch settings.
My perl code is:
for ($j = 1; $j <= $k; $j++)
{
open(FIN2,$fin2) || die "open: $!";
do other stuff
}
Every once in... (2 Replies)
Hi ,
My requirement is that i need to search for a number of strings in a log file and print them with line numbers.The search should be date wise.
The sample log file is :
Jan 17 02:45:34 srim6165 MQSIv500: (UKBRKR1P_B.LZ_
BENCHMARKS)BIP2648E: Message backed out to a queue; node... (6 Replies)
Hello, I'm a computer science major and I'm having problems dealing with file names with spaces in them. Particularly I'm saving a file name in a variable and then using the variable in a compare function i.e.
a='te xt.txt'
b='file2.txt'
cmp $a $b
If anyone could help me with this particular... (10 Replies)
Hello, I am working on a coding project for a class and to test the program I have created, I have come up with 100 different test cases. The program takes four text files as input, so each of the test cases is contained in a folder with four files.
I have a folder called 'tests', within which... (1 Reply)
Hi Friends,
I have two files as input with data that looks like this:
file1.txt
1
2
3
4
file2.txt
a,aa
b,bb
c,cc
d,dd
e,ee
f,ff
instead of me doing 2 while loops to get the combinations
while read line_file1 (2 Replies)
Can someone please help me to learn how to deal with loops, arrays and grep?
I have two arrays (lets say I and j) each in a separate file
And have file with lines of data I need to extract, such as
Ruby Smith: some text here
Ruby Smith: some other text here
Ruby Brown: some text here
Ruby... (10 Replies)
Korn Shell
I have hundreds of small files like below created every day. A midnight cron job moves them to the location /u04/temp/logs
But sometimes I have to manually move these files based a certain dates or time.
I have two basic requirements
1.Using mv command I want to move all .dat... (2 Replies)
Is there a reliable way to deal with whitespace in array indicies?
I am trying to annotate fails in a database using a table of known fails.
In a begin block I have code like this:
# Read in Known Fail List
getline < "'"$failListFile"'"; getline < "'"$failListFile"'"; getline <... (6 Replies)
I am passing multiple files in awk & since one of the file is empty(say file3) so the same gets skipped & logic goes for toss. Need suggestion/help in checking and putting additional checks for the same
awk -F, 'FNR==1 {++filecounter}
filecounter==1 {KRL=$2;next}
filecounter==2... (8 Replies)
Discussion started by: siramitsharma
8 Replies
LEARN ABOUT MOJAVE
mpsimagestatisticsmeanandvariance
MPSImageStatisticsMeanAndVariance(3) MetalPerformanceShaders.framework MPSImageStatisticsMeanAndVariance(3)NAME
MPSImageStatisticsMeanAndVariance
SYNOPSIS
#import <MPSImageStatistics.h>
Inherits MPSUnaryImageKernel.
Instance Methods
(nonnull instancetype) - initWithDevice:
(nullable instancetype) - initWithCoder:device:
Properties
MTLRegion clipRectSource
Additional Inherited Members
Detailed Description
The MPSImageStatisticsMeanAndVariance computes the mean and variance for a given region of an image. The mean and variance values are
written to the destination image at the following pixel locations:
o mean value is written at pixel location (0, 0)
o variance value is written at pixel location (1, 0)
Method Documentation
- (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device
NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know
which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device
instead.
Parameters:
aDecoder The NSCoder subclass with your serialized MPSKernel
device The MTLDevice on which to make the MPSKernel
Returns:
A new MPSKernel object, or nil if failure.
Reimplemented from MPSUnaryImageKernel.
- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device
Specifies information to apply the statistics mean operation on an image.
Parameters:
device The device the filter will run on
Returns:
A valid MPSImageStatisticsMeanAndVariance object or nil, if failure.
Reimplemented from MPSUnaryImageKernel.
Property Documentation
- clipRectSource [read], [write], [nonatomic], [assign]
The source rectangle to use when reading data. A MTLRegion that indicates which part of the source to read. If the clipRectSource does not
lie completely within the source image, the intersection of the image bounds and clipRectSource will be used. The clipRectSource replaces
the MPSUnaryImageKernel offset parameter for this filter. The latter is ignored. Default: MPSRectNoClip, use the entire source texture.
The clipRect specified in MPSUnaryImageKernel is used to control the origin in the destination texture where the mean value is written.
Author
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSImageStatisticsMeanAndVariance(3)