Search Results

Search: Posts Made By: expl
Forum: Programming 02-22-2013
1,015
Posted By expl
It is just called 'debugging'. gdb...
It is just called 'debugging'.



gdb Tutorial (http://www.cs.cmu.edu/~gilpin/tutorial/)



Do not compare a text editing engine with a comercial IDE. Since its just a text editor it only...
Forum: Programming 02-13-2013
1,666
Posted By expl
I see nothing wrong with how you assign packet...
I see nothing wrong with how you assign packet structures or accessing them, I think there is something wrong with how you save/display them. What is 'pktFeatures'? I guess it has to be a global...
Forum: Programming 02-07-2013
4,938
Posted By expl
Well that would depend on what exact 'shared...
Well that would depend on what exact 'shared memory' model you are going to use and frequency of the logging code. Also you might want to consider sampling algorithm if the code runs at very high...
Forum: Programming 01-10-2013
9,326
Posted By expl
You need to paste the source or its hard to...
You need to paste the source or its hard to understand what is happening there just from errors.
Forum: Programming 01-03-2013
2,441
Posted By expl
Preamble, SFD and FCS of ethernet frame are only...
Preamble, SFD and FCS of ethernet frame are only meaningful to the hardware/driver and thats where they are handled. You can not generate them from userworld APIs like raw sockets (and alike). If you...
Forum: Programming 12-04-2012
5,046
Posted By expl
I think its not an issue of what permissions are...
I think its not an issue of what permissions are set on java binary but an issue of what permissions are set on the serial device.
Forum: Programming 11-26-2012
1,387
Posted By expl
change $filename >> output.txt to ...
change

$filename >> output.txt

to

$filename >> $(echo $filename)-output.txt

Will create "$filename-output.txt" for each $filename.
Forum: Programming 11-23-2012
2,057
Posted By expl
Good eye! I haven't really thought it to much...
Good eye! I haven't really thought it to much through, just posted a quick example.
Forum: Programming 11-23-2012
2,057
Posted By expl
You need to do two things: 1. set tty to raw...
You need to do two things:

1. set tty to raw mode otherwise it will buffer input and you will not be able to catch key events unless tty flushes the buffer (after pressing return by default)
2....
Forum: Programming 11-19-2012
1,507
Posted By expl
There are two types of major license types for...
There are two types of major license types for open-source libraries, BSD like and GNU like.
BSD libraries can be simply statically linked to your XCode binary redistributable while GNU licensed...
Forum: Programming 10-26-2012
1,976
Posted By expl
Emm, don't think there is need for example....
Emm, don't think there is need for example. Thread safe function means it can be ran safely in same context by many threads so logically thinking its automatically safe to rerun many times this...
Forum: Programming 10-22-2012
3,185
Posted By expl
strcpy(wwn1,"\x50\x00\x53\x30\x08\x09\x82\x32"); ...
strcpy(wwn1,"\x50\x00\x53\x30\x08\x09\x82\x32");

strcpy() will copy until 0 terminated char is reached and you have 0 char in second position so it will copy only first byte and leave the rest the...
Forum: Programming 10-19-2012
4,763
Posted By expl
Pipe should flush if you close it after writing...
Pipe should flush if you close it after writing to it.



That is correct, it was a typo from me.



Ok looking into this deeper problem seems to be here:

read(ParentRead, &buf, 1);

Do...
Forum: Programming 10-19-2012
4,763
Posted By expl
Well your code is pretty messy, Id sugest you...
Well your code is pretty messy, Id sugest you start from 0 with a better design.
There are plenty of uncontrolled stuff happening specially with string buffer handling like so:


char buf[2] =...
Forum: Programming 10-19-2012
4,763
Posted By expl
If you are going with a terminal interface you...
If you are going with a terminal interface you might want to consider redesigning the whole client to be single threaded. You do not really need to have separate process for handling I/O on a socket,...
Forum: Programming 10-18-2012
3,185
Posted By expl
(i) you are assigning simple ASCII string here...
(i) you are assigning simple ASCII string here that is literally "0x5000533008098217". But since you are defining 'pwwn' to be 8 byte long the string will be striped by compiler to first 8 characters...
Forum: Programming 10-18-2012
3,185
Posted By expl
Using general array assignment unsigned char...
Using general array assignment

unsigned char wwn[8] = {0x50, 0x00, 0x53, 0x30, 0x08, 0x09, 0x82, 0x17};


OR

Using string literal syntax

unsigned char wwn[8] =...
Forum: Programming 10-16-2012
1,403
Posted By expl
When data type is signed it means that the bit...
When data type is signed it means that the bit order represents negative, zero and positive values, when it is unsigned it means it can represent only zero and positive values. For example signed...
Forum: Programming 09-24-2012
27,864
Posted By expl
Because you are always sleeping for a fixed time...
Because you are always sleeping for a fixed time on every case, on a good network you will always have a time loss of the initial sleep even if the socket is ready for use already. It will work, but...
Forum: Programming 09-24-2012
27,864
Posted By expl
Yes you have to connect again to bind socket to a...
Yes you have to connect again to bind socket to a remote port for further communication, in other words connect must return 0 once for the socket.
Forum: Programming 09-24-2012
27,864
Posted By expl
Correct approach is after calling connect() to...
Correct approach is after calling connect() to check if errno is set to EINPROGRESS and if so use select() to see when socket can be written to, also its best not to loop 5 times but set a single...
Forum: Programming 09-20-2012
2,594
Posted By expl
Generally shell/perl scripting knowledge is...
Generally shell/perl scripting knowledge is required for senior linux/unix administrator positions not software engineer.

Need for C/C++ is not that great nowadays and if there are positions, a...
Forum: Programming 09-13-2012
2,578
Posted By expl
Should try Java bindings for BDB (Oracle Berkeley...
Should try Java bindings for BDB (Oracle Berkeley DB Java Edition | Oracle Berkeley DB (http://www.oracle.com/technetwork/database/berkeleydb/overview/index-093405.html))

It will provide interface...
Forum: Programming 06-01-2011
8,399
Posted By expl
Sockets are also not available on EVERY system,...
Sockets are also not available on EVERY system, does not mean you should not use them. The option is available on Windows, Linux and BSDs, haven't checked more.

Go check the POSIX specification...
Forum: Programming 05-31-2011
8,399
Posted By expl
recv() is capable to timeout as it uses select...
recv() is capable to timeout as it uses select syscall internally and timeout is configured with setsockopt(), putting one more select call in front just adds overhead.
Showing results 1 to 25 of 28

 
All times are GMT -4. The time now is 05:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy