Hi,
We have deployed several OpenVPN servers globally and our 8k+ Windows users have OpenVPN GUI installed. Each server is defined in a config file in the program files directory. As we add new servers to the network (we require almost a dozen globally) we would like a slick solution to auto update the config directory with the new conf...
Hey guys, i'm working on a program that gets a postfix expression and calculates it..
I have two functions:
Converts infix to postfix
Calculate the postfix
When I try small expressions, like 1+1 or (1+1)*1, it works fine
but when i use all the operands I get something nasty,
Here is the example:
2*2/2+1-1
gets something like:
222/*...
When I declare this function:
void vLFSR_ParseInput(unsigned char * pucDataArray,unsigned char unCount){}
and try to pass it this array
unsigned char g_ucUSCI_A0_RXBufferIndex = 0x00;
unsigned char g_ucaUSCI_A0_RXBuffer[RXBUFFERSIZE];
with this function call
vLFSR_ParseInput(&g_ucaUSCI_A0_RXBuffer,g_ucUSCI_A0_RXBufferIndex);
...
I have 4 .c files hello.c,here.c,bye.c and main.c.
One header file mylib.h
The contents are as follows
hello.c
#include<stdio.h>
void hello()
{
printf("Hello!\n");
}
here.c
#include<stdio.h>
void here()
{
printf("I am here \n");
}
bye.c
#include<stdio.h>
void bye()
{
printf("Bye,Bye");
}
main.c
#include<std...
I want to define an integer variable in C/C++ such that my integer can store 10 bytes of data or may be a x bytes of data as defined by me in the program.
for now..!
I tried the
int *ptr;
ptr = (int *)malloc(10);
code. Now if I'm finding the sizeof ptr, it is showing as 4 and not 10. Why?
...
I am just trying to add a simple attribute to a device in the /sys filesystem. Seemed pretty straightforward but none of the helper methods mentioned here or here are exported from the kernel so I can't use them from a module? I must be missing something, can anyone provide some insight?
...
Hello all,
what i am try to do is to get my program to enter chroot environment and do some commands and then exit.
For Example
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define ChRoot "sudo chroot \"/\" /usr/bin/env -i HOME=/root TERM=\"$TERM\" PATH=/bin:/usr/bin:/sbin:/usr/sbin:/bin /bin/bash --login +h"
void ...
Why is it that I'm finding the size of int and long int are shown to be 4 bytes? Is it that the int is by default long int?
...
Hello..
I'm writing a simple application in ANSI C. I am using GCC in a Unix environment.
I have the following sample application:
//main.c
#include "foo.h"
int main()
{
int result;
result = add(1,5);
return0;
}
Header:
//foo.h
#ifndef FOO_H_INCLUDED
#define FF_H_INCLUDED
int add(int a, int b);
#endif
...
I have 4 .c files hello.c,here.c,bye.c and main.c.
One header file mylib.h
The contents are as follows
hello.c
#include<stdio.h>
void hello()
{
printf("Hello!\n");
}
here.c
#include<stdio.h>
void here()
{
printf("I am here \n");
}
bye.c
#include<stdio.h>
void bye()
{
printf("Bye,Bye");
}
main.c
#include<std...
Hi everyone. Couple of years ago i found a space filling curve implementation (Hilbert's) written in C designed to plot IP addresses. (I can't seem to find it again). I would like to convert this into PHP, returning a coordinate on an arbitrary grid.
I found this question that is very related.
This is a longshot, but i figured someone ...
I've come across a rather charming bug that I'm trying to wrap my head around.
I feel like I've seen this before, but this time I want to understand why this is happening.
I have:
int i;
int debug = 0;
for(i = 0; i < buf_end; i++) {
do_some_buffer_work();
if(something_is_true()) {
do_something_important();
pr...
Is there any way to create a child window that is resizable only on the right edge and covers up a part of the left side of the parent window? Similar to that of Firefox's History panel.
...
Hi,
I am trying to measure how long a function takes.
I have a little issue: although I am trying to be precise, and use floating points, every time I print my code using %lf I get one of two answers: 1.000... or 0.000.... This leads me to wonder if my code is correct:
#define BILLION 1000000000L;
// Calculate time taken by a reques...
**Updated. Sorry to those whose answers no longer make sense.
So I figured out that no matter what I put on the line after Data_pair_node, after it executes, thats when the thing is reset! WTH? :
int insert(Table *t, const char *key, const char *val){
int dest_bucket_index;
Table *table = t;
Hash_bucket *dest_bucket = NULL;
Data_pa...
Hello,
I have an issue with threads.
I am defining a global variable, a char * that I initialize to NULL, and a mutex.
pthread_mutex_t mutex;
char *minURLTime;
minURLTime = NULL;
Then I initialize my mutex:
pthread_mutex_init(&mutex, NULL);
I then create a new thread:
void *status;
pthread_t t;
pthread_create(&t, NULL, executeTh...
HI,
I'm implementing a classical map-reduce program in which I have a parent that spwans N children(maps) + 1(reduce). The parent sends info, through unnamed pipes, to each one of the N children. The maps process the request and send the result, an int, to reduce. The reduce does a select and sums up every counter writen on the pipes fr...
I have 4 .c files hello.c,here.c,bye.c and main.c.
One header file mylib.h
The contents are as follows
hello.c
#include<stdio.h>
void hello()
{
printf("Hello!\n");
}
here.c
#include<stdio.h>
void here()
{
printf("I am here \n");
}
bye.c
#include<stdio.h>
void bye()
{
printf("Bye,Bye");
}
main.c
#include<std...
I have written a little irc bot application in C. It just writes out the server messages to the screen. This is just accomplished with a while loop that reads from the server filedescriptor. How can I concurrently accept input? I would like to now extend it to accept user input so that it can be used as a client application. I am new to ...
I usually build the application in windows and test /port the application in UNIX using VI
But what is I need to build the application from scratch in unix/linux in shell what option do I have to
Visually debug (break point and such .. ) or syntax helpers? ( c/c++)
...