Programming :: C Programming Using Curses?
Apr 28, 2010
I have a Database using C programming and text based screen using curses. When I run the program and select "add a customer". The startcontract and endcontract variable does not appear. Also, when I add a name, it does not display what I have written down. All that appears is some jargon which I don't know how to fix it.
PHP Code:
#include <unistd.h>
#include <stdlib.h>
[code]....
View 3 Replies
ADVERTISEMENT
Nov 8, 2010
When I getch() a key event (UP arrow key), the getch() function return a string of characters that I cannot compare with curses.KEY_UP constant. Here is the code I use :
while True:
w = gb.scrn.getch()
c = chr(w)
otp = 'touche:'+str(w)+' '+str(c)+"
[Code]...
It seems like getch() return three distincts bytes while I would retrieve it with a single ord() instruction in python like describes in curses/python documentation.
View 1 Replies
View Related
Feb 28, 2010
I am trying to compile a program for my assignment at school that uses curses.I have installed libncurses5-dev, and curses.h is now in /usr/include, but I am getting all these errors(it compiles fine at school).
Code:
grcunning@grcunning-desktop:~/school/cs474/assign7$ gcc -o proj7 proj7.c
/tmp/cc2ZFXrs.o: In function `main':
[code]....
View 2 Replies
View Related
Aug 27, 2010
I am interested in learning 3D programming. The thing is, I would hate to put too much effort to learn something that doesn't have future and is dying. My favorite language at the time is Java. My goal is professional programming.
So I have several questions:
1. Should I learn JOGL or start learning C++ and do C++ openGL programming?
2. Is there a big difference between JOGL and C++ openGL programming?
3. Is it worth to learn openGL? Does it have a future?
4. Is it a big difference between openGL and directX coding?
5. If choosing Java, then JOGL or LWJGL?
Why and what is the main difference between them?
View 4 Replies
View Related
Oct 25, 2010
i have installed suse 11.3 and c and c++ programs are running fine but when i try to execute any code with curses.h header included error is shown that curses.h not found what can i do?
View 1 Replies
View Related
Mar 7, 2010
Groovy is an object-oriented programming language for the Java platform. I do not have experience in Java, only perl and shell scripts. Recently I have been asked to maintain a software written in groovy (also to make enhancements). So can I learn groovy without knowing java language. or isit I have to learn java before venturing into groovy.
View 1 Replies
View Related
May 30, 2010
I did searched you tube but my results were not great.I have 2 books on KernelProgramming.I feel I need if some where I can get a video tutorial which can help me to understand how to develop a Linux Device driver that will be great.I had a look at Greg Kroah Hartmans video lecture of developing patches on ......I have been reading books and a lot of stuff.So I wish if I could get a video lecture that would be better
View 1 Replies
View Related
Mar 8, 2011
I have a server listening on incoming client connections. Once the client establishes SSL connection with the server, the server waits on read() from the client. Only Client can disconnect the connection. I want to have a timer in the server program to wait for x secs after read() and then disconnect the Client connection.
View 3 Replies
View Related
Feb 9, 2011
I want that I click with the mouse on the video, it paused.I notice that there is "BaconVideoWidget" which I guess is the video rendering widget but it don't have signal named "clicked":
Code:
vd = totem_object.get_video_widget()
vd.connect("clicked", vd.hide)
[code]....
View 3 Replies
View Related
Apr 16, 2011
Just something I've been curious about. I've been messing a fair bit with some of my own scripts, and in some cases, getting sent an IM would be useful to let me know when a task is done. the ability to set account information in a text file.It'd be okay if I can designate only a single recipient, or set recipients in the config file at the very least, jabber support.Be able to be controlled via standard shell commands - for example I should be able to pipe a message output into the program for example.
View 1 Replies
View Related
May 16, 2011
i have a server program which accept multiple client connection and am using polling. like every 2 secs it will look to client whether any data is received after it binded. i have used setitimer but there is runtime error i got.. the server accept all client connection but doesn't execute any msg which client sent.
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netdb.h>
#include<unistd.h>
#include<pthread.h>
#include<string.h>
[Code]....
View 1 Replies
View Related
Oct 27, 2010
I am learning network programming via a book of Richard Stevens.The sample source codes are given here
http://www.unpbook.com/unpv13e.tar.gz
I downloaded and unzipped the file in /usr/src folder.As per the instructions given in README of downloaded archive I did.
View 5 Replies
View Related
Sep 28, 2010
A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit
View 4 Replies
View Related
Dec 19, 2008
I am unable to find a description of alsa's programing language, this sort of stuff:
[Code]...
I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.
View 2 Replies
View Related
Feb 18, 2011
We have documents on multiple workstations and want to collate them into a single repository to provide text search and download. So far we have implemented rsync to copy files from each workstation under a directory for each workstation on a server (incidentally providing a backup) and have set up text search using Xapian with Omega; users access it via a web browser. Still to do is to set up a system to copy files from each workstation's area on the server to the repository.
Many files are duplicated. In these cases we want to preserve the names but keep a single copy of the file;hard links can be used for that.For each file to be copied from a workstation's area into the collated area we need to check whether it is a duplicate (file size and, if same, MD5 sum) and if so, create a hard link to the original rather than create a copy.A system to detect and replace duplicates in the collated area has been written using ruby and postgresql but the developer cannot commit to continuing this work. It does mean we have a postgresql database populated with "fingerprints" of files in the collated area.My first priority is to get the system working; in the longer term whatever is developed must be maintainable; I do not yet know which language skills are available locally.
I am fluent in bash and competent with awk. Ruby looks nice but I have started to learn python and do think it prudent to learn both at the same time. Python's postgresql capabilities are not settled but may be fine for the simple usage required.What to do? A bash solution would run very slowly but could be developed quickly. Language knowledge aside, I have found it difficult to install ruby on the server (CentOS 5.5;installed rvm but "gem" still not installed; seems a very complex system with its own package management).
View 7 Replies
View Related
May 11, 2011
i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....
Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....
now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..
View 2 Replies
View Related
Apr 11, 2011
I need help as I am not proficient with Linux C++ Programming. There are two parts which I need to do in the coding provided below.
1. Produce the program so it can output the word "Hey there!" and wait two minute and print the word "See you later!".
2. Produce the program that will output the text "Cool" every 20 seconds by setting a periodic task.
Quote:
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
int init_module(void)
{
printk("Hey there!
[Code]...
View 3 Replies
View Related
Jun 28, 2009
I've been working in the real world for a year making some money to go back and finish my masters, and now I'm coming to the end of my contract and am realising how little i remember and how small my scope has become; i basically do shell scripts and perl these days, and its making me uneasy. So instead of bitching about it , I'm going to endevor to complete Project Euler Using randomly generated programming languages for each problem, selected from
And post the fruits of my attempts at my blog (shameless plug) aswell as opening up my svn repository when I'm done. (altho i need to ask in another thread about svn permissions....)To my shame i havent ever touched C#, JavaScript, Ruby or Python, so all in all its going to be very interesting how much i screw up.Anyone have any additional ideas, or languages I'm missing or such? I was considering TCL or Haskell or Erlang at a strech, but i dont know how useful these three would be.
View 14 Replies
View Related
Aug 25, 2010
how to use socket programming in order to implement chatting feature
View 5 Replies
View Related
Jun 30, 2010
I trying to write a UART(interfacing of serial devices) to linux machine but after I execute the following code to receive data I need to enter key (carriage return).... but I don't want to remove carriage return/enter key
[Code]....
View 13 Replies
View Related
Sep 28, 2010
i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.
View 3 Replies
View Related
Mar 27, 2010
I wonder why arrays in the C programming language are pointers to the first element of the array, not the first element of the array itself?
View 14 Replies
View Related
Mar 3, 2010
I need to make a simple GUI or even commandline based theme switcher for my JWM slackware 13-current setup.Basically, to change themes I just use a cp command from menu.However, the more themes, the bigger the menu gets and so it would be nice to have a app/script something that will allow me to click on theme I want and when I hit "apply" it cp's the theme for me.
View 5 Replies
View Related
Jan 17, 2010
I'm reviving an aging Thinkpad X22 by installing Debian and running only in text mode. I've installed wicd to control the wireless network connections. When I run wicd-curses from the cli, it finds the network and I'm able to obtain an IP address. The wireless ESSID that I'm connecting to is encrypted with WPA. I can't seem to figure out how to input the encryption password so I can connect.
View 2 Replies
View Related
Apr 8, 2010
I want to design an audio chat programming in Ubuntu.So how shall I proceed? Any help on this please?I am complete novice in this topic. Currently my aim is to capture audio from microphone.
View 1 Replies
View Related
Mar 31, 2011
I need to rename the resulted searched files from a loopI have the following code:
find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done
basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell
View 10 Replies
View Related
Feb 12, 2011
im trying to build a simple program for my C programming class, this is the source code
#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;
[Code]...
i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?
View 5 Replies
View Related
Mar 13, 2009
Is there any framework available for network programming in c language just like POCO in c++.
View 1 Replies
View Related
Dec 5, 2010
When sending data over the socket, the sending socket includes 0x00 after each sent byte. I wonder how this can be avoided -- I just want to transfer the data in the tx_buffer as it is.
# ./serv &
[1] 6895
# ./EUG 127.0.0.1
EUG: Data to be transmitted: 0x35 0x32 0x30 0xff 0x03 0x31
EUG: Data - #Bytes transmitted: 6
./serv: Here is the message: '5'
[Code]...
View 3 Replies
View Related
Dec 4, 2010
i want to pass variable in mysql qyery in c programming
View 1 Replies
View Related