I'm currently fighting with Vim, I can't seem to make the indentation options do what I want.
Here are my settings, I put them at the bottom of .vimrc to make sure they take precedence. As you can see I'm going a little crazy, so I tried turning off almost everything:
set cindent
set cinkeys=o,O
set cinoptions=
set cinwords=
set indent...
I have just started programming few days back !
working with C with data structure (array , linked list) and bit Linear Algebra(system of linear equation).
i dont have any definite plan right now... after looking at this chart ( http://bit.ly/cH2Jb1 ), I am bit confused ...
Could anyone suggest me as weather to follow this chart or s...
I've read the first array member of argv will always be the program name.
Is it ever useful to hang on to this? I'm learning, so forgive me please if it is a dumb question.
Do people ever unshift the first member because it is useless (and reset argv to be one less?), or is leaving it there best practice because people expect it will a...
I had a use case for a group chat server where the server had to write a common string to all clients' socket. I had then addressed this by looping through the list of file descriptors and writing the string to each of the file descriptors.
Now I am thinking of finding a better solution to the problem. Is it possible to do this by a sin...
Hello world.
I'm kind of new to unix environment.
I want to have a little chat program that the initial terminal is used for input, and invoke
another terminal for output.
I've been searching the web but without any luck.
Hope I can get some clues here.
Thanks.
Ok, to be more specific, I am writing a chat program over tcp/ip on m...
Well, altough the S of the SNMP stands for Simple, yet, so far I haven't experienced it that way. And now that I am about to deploy my software on around around 180 remote Linux servers and wants to monitor the servers and configure my daemons all from a centralized point.
I simply want you to recommend me the library which you'll confi...
Hello
I am a beginner at programming using system calls in C. I am trying to use the execve call in one of my programs. I have to pass an integer as an argument to the program that is being invoked through execve.
However, reading on the internet and seeing sample code, I can see that we can pass only strings as arguments. So, I tried c...
The file kwcc_config.xml contains definitions and include paths for specific compilers used by our projects.
Due to our different environments for different projects we need different definitions and paths for the projects.
Is there an option to define such file per project? If so, how do I assign kwcc_config.xml file for each project?...
Why is my strtok breaking up my strings after space when I specified my delimiter as ","?
...
I'm writing a fastcgi app for my website in C.
How do I use GD to generate a CAPTCHA image?
I searched for some stuff on google in vain (still search is going on), but it would be nice if someone could give me the basic idea about the procedure.
For random numbers, I will use nanoseconds as seed (or use that itself).
Thanks in advanc...
Hello
I got a situation where the client got 'C' program which does encryption of columns at client application side. And the same is now to be used in DataWarehousing project in one of the script component which supports C#.
Is there a way this C program can be complied to dll and imported into C# [or] do we need to re-write this in ...
#include<stdio.h>
main()
{
char str[50] = "Wel %s";
char dst[50];
snprintf(dst,50,str,"Come");
//Now i want to append "*" to dst string ie "Wel Come*" using snprintf()
printf("str = %s\n",str);
printf("dst = %s\n",dst);
}
please suggest is it possible using snprintf()
Thanks
Surya
...
Hi ,
my code is a mix up of different bits and pieces from older code.
I would like to erase all never used functions in order to keep the code simple.
Is Klocwork the tool? How do I do it?
Thanks,
Moshe.
...
Hello,
I want an option to convert a string to wide string with two different behaviors:
Ignore illegal characters
Abort conversion if illegal character occurs:
On Windows XP I could do this:
bool ignore_illegal; // input
DWORD flags = ignore_illegal ? 0 : MB_ERR_INVALID_CHARS;
SetLastError(0);
int res = MultiByteToWideChar(CP_U...
What will be the complexity of the operation to remove an element from the end of the singly linked list ?
I have implemented linked-list in C. Here is the code for removing a element from the end of linked-list. Now my query is that how to calculate the complexity of this snippet.
What are the factors involved. There are other operation...
Hi all,
I need to convert decimal number stored in an int, to a array of bytes (aka stored in a unsigned char array).
Any clues?
Thanx
...
I would like to code in c ,but use the value in python by compile the c source file to .so file.
...
Hi,
I want to upsample an array of captured (from webcam) OpenCV images or corresponding float arrays (Pixel values don't need to be discrete integer). Unfortunately the upsampling ratio is not always integer, so I cannot figure myself how to do it with simple linear interpolation.
Is there an easier way or a library to do this?
...
If I do not define LINUX_ENV macro,everything goes well(especially,the IPC_RMID cmd return 0).
but if I define LINUX_ENV(I am running on linux system-ubuntu10.04),the last semctl's IPC_RMID cmd return EINVAL,and says Invalid argument, i.e. the semaphore is not removed.
it seems earlier semctl SEM_INFO cmd causes later IPC_RMID cmd return...
Can anyone tell me, why in the blazes GCC (e.g. 4.4.3) does not warn about or error the incorrect call of a nullary function?
void hello() {
}
int main( int argc, char* argv[] ) {
int test = 1234;
hello(test);
return 0;
}
(see also http://bytes.com/topic/c/answers/893146-gcc-doesnt-warn-about-calling-nullary-function-parameters)
...