Sponsored Content
Top Forums Shell Programming and Scripting Help w/ Reading Matrix & Storing in dynamic array Post 302896332 by innvert on Sunday 6th of April 2014 06:53:48 PM
Old 04-06-2014
No this is not homework. I'm not even in classes. I am just trying to learn man and have been trying to teach myself. I am just trying to get a grasp on matrix readers, so after I can mess around with tabular manipulation.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Storing pointer array in C

All .. I am having a pointer array . And trying to store the addess into that pointer array . please see below the problem i faced code: int cnt1; char *t_array; char *f_array; for(cnt1=0; cnt1<1000; cnt1++) { t_array =... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

2. Shell Programming and Scripting

storing variables in array.Please help

Hi All, I need some help with arrays. I need to take input from the user for hostname, username and password until he enters .(dot) or any other character and store the values in the variable array. I would further connect to the hostname using username and passwd and copy files from server to... (7 Replies)
Discussion started by: nua7
7 Replies

3. Programming

Creating an array to hold posix thread ids: Only dynamic array works

I am facing a strange error while creating posix threads: Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output. Snippet 1 This works: -------------- int *threadids; threadids = (int *) malloc (num_threads * sizeof(int)); ... (4 Replies)
Discussion started by: kmehta
4 Replies

4. Shell Programming and Scripting

storing records in awk array

hi i have a file as follows: 1 2 3 4 5 6 i want to store all these numbers in an array using awk.. so far i have: awk '{for(i=1;i<=NR;i++) {a=$1}} END {for(i=1;i<=NR;i++) {printf("%1.11f",a)}}' 1.csv > test however, i am getting all values as zero in the "test" file..... (3 Replies)
Discussion started by: npatwardhan
3 Replies

5. Shell Programming and Scripting

Bash: Reading out rows of a file into a dynamic array and check first literal

Hello, i have a file "Movie.ini" looking e.g. like follows * MOVIE A bla bla MOVIE B blubb blubb MOVIE C I'd like to read the file "Movie.ini" with cat and grep and check whether it includes the string MOVIE only with a '*' at the beginnig. By doing "cat Movie.ini| grep MOVIE... (14 Replies)
Discussion started by: ABE2202
14 Replies

6. Shell Programming and Scripting

Reading from a file and storing it in a variable

Hi folks, I'm using bash and would like to do the following. I would like to read some values from the file and store it in the variable and use it. My file is 1.txt and its contents are VERSION=5.6 UPDATE=4 I would like to read "5.6" and "4" and store it in a variable in shell... (6 Replies)
Discussion started by: scriptfriend
6 Replies

7. Shell Programming and Scripting

Extracting columns from a matrix and storing each column in a separate file

Hi All, I have a huge matrix file consisting some some millions rows and 6000 columns. The contents are just floating point numbers in the matrix. I want to extract each column (i.e. 6000 of them) and store each column in a separate file. For example, 1.dat will consist of elements from column... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies

8. Programming

Reading Scientific notation from file and storing in array

Hi, I am trying to read a set of numbers that are in scientific notation into a file so I can do some math on them, but when I display the array contents the numbers aren't the same as the numbers in the file. Could someone explain why? Thanks. int main() { double fArray; ... (3 Replies)
Discussion started by: Filter500
3 Replies

9. Programming

C; storing strings in an array

I am trying to get userinput from stdin and store the lines in an array. If i do this: using a char **list to store strings allocate memory to it #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv) { char *prog = argv; char **linelist; int... (5 Replies)
Discussion started by: tornow
5 Replies

10. Shell Programming and Scripting

how to output the array result into a matrix

I have a file like this: ASSPASVFETQY,hTRBV12-4,hTRBJ2-5,2 ASSPASTGGDYGYT,hTRBV18,hTRBJ1-2,2 ASSPASGDGYT,hTRBV5-1,hTRBJ1-2,2 ASSPASFPEDTQY,hTRBV27,hTRBJ2-3,2 ASSPARVNYGYT,hTRBV5-1,hTRBJ1-2,2 ASSPARTSGGLNEQF,hTRBV6-4,hTRBJ2-1,2 ASSPARQSYNEQF,hTRBV11-1,hTRBJ2-1,2... (3 Replies)
Discussion started by: xshang
3 Replies
Tool(3U)						    InterViews Reference Manual 						  Tool(3U)

NAME
Tool - base class for tool objects SYNOPSIS
#include <Unidraw/Tools/tool.h> DESCRIPTION
Tool is an abstract base class for objects that support direct manipulation of components. Tools employ animation and other visual effects for immediate feedback to reinforce the user's perception that he is dealing with real objects. The user grasps and wields a tool to achieve a desired effect. The effect may involve a change to one or more components' internal state, or it may change the way components are viewed, or there may be no effect at all (if for example the tool is used in an inapropriate context). Conceptually, tools do their work within viewers, in which graphical component views are displayed and manipulated. Whenever a viewer receives an input event (such as a mouse click or key press), it in turn asks the current tool (defined by the enclosing editor object) to produce a manipulator object. A tool implements its CreateManipulator operation to create and initialize an appropriate manipulator, which encapsulates the tool's manipulation semantics by defining the three phases (grasp, wield, effect) of the manipulation. Moreover, a tool can delegate manipulator creation to one or more of the GraphicView objects in the viewer to allow component-specific interaction. A tool's InterpretManipulator operation accesses and analyzes information in the manipulator that characterizes the manipulation and then creates a command that carries out the desired effect. If a tool delegated manipulator creation to a graphical view, then it must delegate its interpretation to the same view. PUBLIC OPERATIONS
virtual Manipulator* CreateManipulator( Viewer*, Event&, Transformer* ) virtual void InterpretManipulator(Manipulator*) Operations that define how the tool reacts when it is used and its ultimate effect. The tool can defer manipulator creation and interpretation to a GraphicView. This allows the same tool to behave differently depending on the component it manipulates. CreateManipulator creates a manipulator that is appropriate for the tool. It receives the viewer in which the manipulation will take place, an event with which to initialize the manipulator if necessary, and the coordinate transformation that maps canvas coor- dinates into the subject's coordinate space. InterpretManipulator is called following manipulation and defines how to construct a command that carries out the manipulation's desired effect. virtual void SetControlInfo(ControlInfo*) virtual ControlInfo* GetControlInfo() Tools use a ControlInfo object to store information from which to build a user interface for engaging the tool. These operations set and get the ControlInfo object. SetControlInfo does not delete the ControlInfo being replaced. virtual Component* Copy() Return a copy of the tool. Subclasses should redefine this operation to return an instance of their type. virtual void Read(istream&) virtual void Write(ostream&) Read and write the tool's contents to a stream to support catalog operations. Read and write typically call first the corresponding operations defined by their parent class, and then they read or write their class-specific state. Note that you must ensure that the objects are read in the same order they are written. virtual ClassId GetClassId() virtual boolean IsA(ClassId) GetClassId returns the unique class identifier for the Tool subclass, while IsA returns whether the instance is of a class or sub- class corresponding to the given identifier. IsA typically checks the given identifier against the instance's own (as defined by its GetClassId operation) and, failing that, calls its parent classes' IsA operation. All subclasses must redefine GetClassId and IsA to ensure that their identifiers are unique and that instances are written and read properly. PROTECTED OPERATIONS
Tool(ControlInfo* = nil) The constructor is protected to prevent instatiation of the abstract base class. The ControlInfo object is optional, but only tools that have no visible manifestion in the interface should omit it. ControlInfo* CopyControlInfo() CopyControlInfo is a convenience function that subclasses may use in their Copy operation. It returns a copy of the tool's Con- trolInfo object if it non-nil, simply checking for a nil argument before calling the corresponding Copy on the ControlInfo object. SEE ALSO
Catalog(3U), Command(3U), ControlInfo(3U), Editor(3U), Event(3I), GraphicView(3U), Manipulator(3U), Transformer(3I), Viewer(3U), classes(3U), istream(3C++), ostream(3C++) Unidraw 24 January 1991 Tool(3U)
All times are GMT -4. The time now is 08:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy