Sponsored Content
Full Discussion: generate a program
Top Forums Programming generate a program Post 302134449 by namishtiwari on Friday 31st of August 2007 02:34:20 AM
Old 08-31-2007
generate a program

I have created a shell script but i wnt to translate that in c++ program as it is not working that fast.

1 strip=6 tickets
1 ticket has 27 values in that there should be exactly 15 values rest can be filled with zeroes.

1 strip has exactly 90 values.
in a column the entries should be in ascending order and not all entries in a column can be 0.

I am pasting one row for the reference.

00,00,20,33,00,00,63,70,80,06,12,00,34,42,56,00,00,00,00,00,29,00,00,59,69,74,86
04,13,00,32,43,00,65,00,00,00,18,22,00,00,55,00,72,84,09,00,00,38,47,00,67,00,89
01,11,21,00,00,51,00,76,00,00,00,26,30,45,54,00,00,82,00,19,00,00,46,00,61,77,83

There can not be a duplicacy of records.

Thanks
Namish
 

10 More Discussions You Might Find Interesting

1. Programming

How to write to stdin of another program (program A -> [stdin]program B)

Hi, Program A: uses pipe() I am able to read the stdout of PROGAM B (stdout got through system() command) into PROGRAM A using: * child -> dup2(fd, STDOUT_FILENO); -> execl("/path/PROGRAM B", "PROGRAM B", NULL); * parent -> char line; -> read(fd, line, 100); Question: ---------... (1 Reply)
Discussion started by: vvaidyan
1 Replies

2. UNIX for Dummies Questions & Answers

How to write to stdin of another program (program A -> [stdin]program B)

Hi, Program A: uses pipe() I am able to read the stdout of PROGAM B (stdout got through system() command) into PROGRAM A using: * child -> dup2(fd, STDOUT_FILENO); -> execl("/path/PROGRAM B", "PROGRAM B", NULL); * parent -> char line; -> read(fd, line, 100); Question: ---------... (3 Replies)
Discussion started by: vvaidyan
3 Replies

3. Programming

A program to trace execution of another program

Hi, I wanted to know if i can write a program using switches and signals, etc to trace execution of other unix program which calls c program internally. If yes how? If not with signals and switches then are there any other methods apart from debugging with gdb/dbx. (3 Replies)
Discussion started by: jiten_hegde
3 Replies

4. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

5. UNIX for Dummies Questions & Answers

Generate dates

let says, today is my payroll day (7/26), my next payroll day will be 8/9. i want to generate a shell script to extract 8/9, 8/23, 9/6, and so on for 2010. (2 Replies)
Discussion started by: tjmannonline
2 Replies

6. Programming

Python program faster than C++ program.

I wrote a simple program that generates a random word 10,000,000 times. I wrote it in python, then in C++ and compared the two completion times. The python script was faster! Is that normal? Why would the python script be faster? I was under the impression that C++ was faster. What are some of... (2 Replies)
Discussion started by: cbreiny
2 Replies

7. Homework & Coursework Questions

Calling compiled C program with Perl program

Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies

8. Shell Programming and Scripting

Help with excel generate

Hi, I want to calculate the table space usages an this result save as excel. It's saved but header coming two time within one excel file like : TABLESPACE_NAME SIZE_MB FREE_MB USED_MB FREE_% USED_% a 10000 3395.63 6604.37 33 66 b 2048 1330.38 ... (3 Replies)
Discussion started by: mnmonu
3 Replies

9. Programming

How to write a java program that will parse through an XML file and generate a report?

I'm pretty new to Java and I am trying to write a program that will pick up a file from a windows directory adn parse through the XML file to produce a report that will show a total item count and a total paid amount. Any one have any suggestions? Trying to figure out where to start... (4 Replies)
Discussion started by: risarose87
4 Replies

10. Shell Programming and Scripting

Perl program get a response before the program quits

I created a program, so a kid can practice there math on it. It dispenses varies math problems and the kid must input an answer. I also want it to grade the work they have done, but I can't find the best place for it to print out the grade. I have: if ( $response =~ m/^/ ) { $user_wants_to_quit... (1 Reply)
Discussion started by: germany1517
1 Replies
TIFFSTRIP(3T)															     TIFFSTRIP(3T)

NAME
TIFFDefaultStripSize, TIFFStripSize, TIFFVStripSize, TIFFComputeStrip, TIFFNumberOfStrips - strip-related utility routines SYNOPSIS
#include <tiffio.h> uint32 TIFFDefaultStripSize(TIFF* tif, uint32 estimate) tsize_t TIFFStripSize(TIFF* tif) tsize_t TIFFVStripSize(TIFF* tif, uint32 nrows) tstrip_t TIFFComputeStrip(TIFF* tif, uint32 row, tsample_t sample) tstrip_t TIFFNumberOfStrips(TIFF* tif) DESCRIPTION
TIFFDefaultStripSize returns the number of rows for a reasonable-sized strip according to the current settings of the ImageWidth, BitsPer- Sample, SamplesPerPixel, tags and any compression-specific requirements. If the estimate parameter, if non-zero, then it is taken as an estimate of the desired strip size and adjusted according to any compression-specific requirements. The value returned by this function is typically used to define the RowsPerStrip tag. In lieu of any unusual requirements TIFFDefaultStripSize tries to create strips that have approximately 8 kilobytes of uncompressed data. TIFFStripSize returns the equivalent size for a strip of data as it would be returned in a call to TIFFReadEncodedStrip or as it would be expected in a call to TIFFWriteEncodedStrip. TIFFVStripSize returns the number of bytes in a strip with nrows rows of data. TIFFComputeStrip returns the strip that contains the specified coordinates. A valid strip is always returned; out-of-range coordinate val- ues are clamped to the bounds of the image. The row parameter is always used in calculating a strip. The sample parameter is used only if data are organized in separate planes (PlanarConfiguration=2). TIFFNumberOfStrips returns the number of strips in the image. DIAGNOSTICS
None. SEE ALSO
libtiff(3T), TIFFReadEncodedStrip(3T), TIFFReadRawStrip(3T), TIFFWriteEncodedStrip(3T), TIFFWriteRawStrip(3T) October 15, 1995 TIFFSTRIP(3T)
All times are GMT -4. The time now is 06:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy