If an existing compiled display list is to be recompiled, is it necessary to call glDeleteLists() and glGenLists() first? Or can the display list be recompiled by just calling glNewList() on the existing compiled display list ID?
...
I am a beginner in network programming..
i follow stevens and implementing UDP server with reliability.
i have a question.
when a child is forked what happens to parent socket fd in child ...? i read that they get inherited that means we have two copies of socket fd in parent and child ?? do we need to close the inherited parent socke...
I know it is very easy to implement when you are using it as an ADT in OOP languages.
But what should be done in case of structured language like C?
Should I use a global variable?
Should I keep an extra variable in every node?
Or what?
I have implemented my Dynamic Stack like this.
As you can see there are no capacity checking.
...
I am implemmenting a simulation control program for a CP/for microcomputer.When I run the program, it run without returning any errors.however, I cannot read the file that I create. I am doubtful of my openFile function.If there is anything that is not well implemented, please give me some guidance..
#include<stdio.h>
#include<stdlib.h...
I read recently, in an article on game programming written in 1996, that using global variables is faster than passing parameters.
Was this ever true, and if so, is this still true today?
...
Hi all! I need to convert a GIF image to Jpeg image using C programming language. I searched the web, but I didn't find an example which could help me. Any suggestion are appreciated!
EDIT: I want to do this using an cross-platform open-source library like SDL.
...
What free tools can I use to debug multithreaded programs created using the pthread library in Linux? (Besides pen & paper, of course...)
The usual way of printing debug messages isn't working out very well.
...
I need to log socket usage, and I wrote a LD_PRELOAD library.
The problem is when I override read() and write() than ordinary file operations are get logged too (of course).
So how can I tell ordinary file descriptors and socket descriptors apart?
...
My php application logs into to Gmail via oauth provided access keys and fetch headers for all messages in inbox. The php-imap extension allows only for login/password based authentication. I want to modify the extension so that it support oauth based authentication too. I need to figure out how to make that change inside the extension c...
The method I am doing right now is breaking the string into array of words in NSSet and minus the set of stopwords. Is there a more efficient way?
...
I want to make a GStreamer application which takes a xml file process its content which provides information like image url, its weight and the duration for which it is going to be displayed on the screen.
The xml file can be clearly processed in C using libxml. But how can we create a slideshow of the images using the GStreamer librar...
C++ ANSI ISO IEC 14882 2003 Annex C.1 (page 668):
Change: The result of a conditional expression, an assignment expression, or a comma expression may bean lvalue
Rationale: C + + is an object-oriented language, placing relatively more emphasis on lvalues. For example, functions may return lvalues.
Effect on original feature: Change to s...
I want to display something in an NSOpenGLView, but since there is a total of zero bytes of documentation on it, and the sample code is as big and complex as the documentation should be, I can't get any wise out of it. This is my code so far, and my ANOpenGLView is an NSOpenGLView in a NIB subclassed as ANOpenGLView:
@implementation ANO...
I am trying to smooth text rendering using anti-aliasing.
But it's not anti-aliased.
See the picture http://tinypic.com/r/2h7dy1i/4
First line is a png image created using pango and cairo.
Second line is just an html <span> tag. It's in firefox, Ubuntu with Gnome DE.
The difference can be better understood if you compare "W" and "v"
...
You are to write a program that requests that the user inputs a fraction of the form n/d with d nonzero. Your program then prints out the fraction in reduced form. The program then asks if the user would like to process another fraction and continues to do so as long as the user replies with Y.
A fraction n/d is in reduced form provided...
Dene2.c
int main ( void )
{
fprintf ( stdout , "WAİTİNG for a sec to breath\n" ) ;
#command_go "dene.c"
return 0 ;
}
dene.c
int main ( void )
{
void wait ( int ) ;
getdata ( a );
showdata ( a );
** #command_go "dene2.c" **
wait ( seconds );
return 0;
}
void getdata (...
Hello,
I want to create a simple 3D editor program, and I kind of hate C++ windows programming. But I don't want to mess with managed code when using OpenGL, either. So, it is possible to create in native C++ a control which will host the OpenGL 3D drawing surface, with no other controls, and also with an interface (methods and properti...
I ran into this question while typing man 2 open. It says that there are two kinds of open, one with two args, and one with three! last time i checked we could not overload functions in C. How did they do this? did they write in C++?
int open(const char * pathname, int flags);
int open(const char * pathname, int flags, mode_t mode);
...
I want to open port 5555 on my machine using UPnP to the world. Could you please provide me with such Java sample for any sutable Opensource library. I need A CODE SAMPLE like one I can give you for C# using this lib
using TCMPortMapper;
private void Form1_Load()
{
PortMapper.SharedInstance.Start();
PortMapping pm = new PortMapping...
var1 must hold a string whether it is empty or not or my program will segfault. But gcc complains that the empty string literal is constant while var1 is not. The following is an example of what I am talking about.
How can I fix this ?
warning: assignment discards qualifiers from pointer target type
char *var1 = NULL;
if(var1 == N...