09-17-2014
BTW, the last version has a bug if there is a blank line in the input file....I meant your first version.
No worry at all!
How much do I owe you?!
Last edited by yifangt; 09-17-2014 at 07:55 PM..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused:
Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies
2. Programming
Hi
i have the following structure
struct S
{
char Mod_num;
char val;
char chr_nm_cd;
}
I am reading a 2GB file and inserting into the structure and writing into a vector.
I feel like only vector will be a right option. I tried with multimap but it is memory intensive and hence i... (1 Reply)
Discussion started by: dhanamurthy
1 Replies
3. UNIX for Dummies Questions & Answers
Can someone tell me how to do this?
Just a thought that entered my mind when learning about structs.
First thought was:
struct one
{
struct two;
}
struct two
{
three;
}
one->two->three
would this be how you would access "three"? (1 Reply)
Discussion started by: unbelievable21
1 Replies
4. Programming
I modified some code I found on Wikipedia concerning maps to see if it would work before applying it to a project I'm working on that has a similar idea.
What I would want is for a user to be able to enter sentences and then be able to distinguish how many times a the person entered a word in a... (4 Replies)
Discussion started by: kcgb20
4 Replies
5. Solaris
Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks.
... (1 Reply)
Discussion started by: aixlover
1 Replies
6. Programming
Hi,
I have received an application that stores some properties in a file. The existing struct looks like this:
struct TData
{
UINT uSizeIncludingStrings;
// copy of Telnet data struct
UINT uSize;
// basic properties:
TCHAR szHost; //defined in Sshconfig
UINT iPortNr;
TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies
7. Programming
Hi all, from my understanding I understand that I can use array in this manner.
struct test
{
int a;
int b;
int c;
};
test testing; //creating an array with the structer type
testing.a=1;
testing.b=2;
testing.c=3;
If I'm not wrong we can use array in this manner,... (12 Replies)
Discussion started by: vinzping
12 Replies
8. Programming
hello guys.
i'm new to c++. i've problem using two dimensional vector.
i've a project of making conway's game of life. this is the code that i have made so far.
my problem is how can i give a two dimensional vector through main.
glider.vec1 = vec; is not correct way to give a two... (2 Replies)
Discussion started by: nishrestha
2 Replies
9. Shell Programming and Scripting
In AWK
For 3 individual vectors of the form:
-2.772 -9.341 -2.857
-5.140 -6.597 -1.823
-2.730 -5.615 1.159
I would like to write a script that parses line by line to (i) normalise, (ii) divide by the norm for *each* vector.
I.e.
sqrt(-2.772^2 + -9.341^2 + -2.857^2)=10.154
... (4 Replies)
Discussion started by: chrisjorg
4 Replies
uio(9s) uio(9s)
NAME
uio - General: Describes I/O, either single vector or multiple vectors
SYNOPSIS
-----------------------------
Member Name Data Type
-----------------------------
uio_iov struct iovec *
uio_iovcnt int
uio_offset off_t
uio_segflg enum uio_seg
uio_resid int
uio_rw enum uio_rw
-----------------------------
MEMBERS
Specifies a pointer to the first iovec structure. The iovec structure has two members: one that specifies the address of the segment and
another that specifies the size of the segment. The system allocates contiguous iovec structures for a given transfer. Specifies the num-
ber of iovec structures for this transfer. Specifies the offset within the file. Specifies the segment type. This member can be set to
one of the following values: UIO_USERSPACE (the segment is from the user data space), UIO_SYSSPACE (the segment is from the system space),
or UIO_USERISPACE (the segment is from the user I space). Specifies the number of bytes that still need to be transferred. Specifies
whether the transfer is a read or a write. This member is set by read and write system calls according to the corresponding field in the
file descriptor. This member can be set to one of the following values: UIO_READ (read transfer), UIO_WRITE (write transfer), or UIO_AIORW
(Alpha I/O read/write transfer).
DESCRIPTION
The uio data structure describes, either singler-vector or multiple-vector I/O. Typically, kernel modules do not manipulate the members of
this data structure. However, the data structure is presented here for the purpose of understanding the uiomove routine, which operates on
the members of the uio structure.
FILES
SEE ALSO
Routines: uiomove(9r)
uio(9s)