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':
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.
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.
I am running Valgrind on my program. It shows me two errors but mentions only addresses against them and not actual code even on a debug build.
The output is
==23002== Memcheck, a memory error detector. ==23002== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==23002== Using LibVEX rev 1575, a library for dynamic binary translation.
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?
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.
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.
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.
I have a general question regarding memory errors. I frequently ran into memory errors such as seg fault, double free, etc. Sometimes I got the following traces for example.
I've generated some srt subtitle files using gocr from pgm files used in DVD's. The ocr program gets confused between lower case L and upper case i and sees them as the same thing. This results in words with capital i's in them instead of lower case L.
What is the best way to automate the correction without a spell checker? I tried sed, but it's difficult to tell between the i's that you want and those that need changing. I figured that any word that consists solely of capital i's is ok, e.g. Roman Numerals, but any capital i not at the beginning of a word needs changing.
I am running a java application on centos. For now I have a gsm modem connected via the the usb cable. Below is the message I get when I type the command dmesg | grep tty
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A usb 2-2: pl2303 converter now attached to ttyUSB0
Here is my program. It asks the user for input and then prints a shape of a certain length. The errors I get when I compile are:
shape.c: In function "main": shape.c:22: error: expected identifier or "(" before "int" shape.c:58: error: expected expression before "return" shape.c:59: error: expected expression before "}" token shape.c:59: error: expected expression before "}" token #include<stdio.h> .....
I am reading Sams Teach Yourself SQL in one hour a day. In this book they work with both Oracle and MySQL to teach you SQL. So I installed mysql on my box and I am creating the empty database they use in this book so I can follow along as I read. I have noticed a few typos in the book and now I have noticed some code errors too. I just don't know enough to fix em. I am working on creating the empty database and I am getting syntax errors when I create certain tables. I have checked both the printed version of the book and the electronic version (which differ slightly) and both give me the same synatax errors. First is Creating the first table of the database. Here is the code given to me to enter. The Electronic version
[code]...
how I can correct this error and create these tables?
In this case what is the return value of mount. I want to run e2fsck only when either mount fails or mount succeeded but with errors . Is there some way to detect this situatin "mounting fs with errors" in code/script .
I have this project which I've been working on essentially nonstop for the past three days and due to work I am running low on time. I'm new to Linux/Unix and my Teacher has assigned us a scripting project, due for Monday. I have All the functions for the project in a separate file which run as a daemon process when I log in. It has no syntax errors but my Script can not run the functions (I'm not sure where they go before or after the body) and I have one function I'd like you guys to take a look at. It has a Second menu leading to a case statement but it does not run after the Search. I'm Kinda tired of looking at the CLI but I have to finish this.
The 2010 CWE/SANS Top 25 Most Dangerous Programming Errors is a list of the most widespread and critical programming errors that can lead to serious software vulnerabilities. They are often easy to find, and easy to exploit. They are dangerous because they will frequently allow attackers to completely take over the software, steal data, or prevent the software from working at all.
The Top 25 list is a tool for education and awareness to help programmers to prevent the kinds of vulnerabilities that plague the software industry, by identifying and avoiding all-too-common mistakes that occur before software is even shipped. Software customers can use the same list to help them to ask for more secure software. Researchers in software security can use the Top 25 to focus on a narrow but important subset of all known security weaknesses. Finally, software managers and CIOs can use the Top 25 list as a measuring stick of progress in their efforts to secure their software.
I have a script that that is supposed to send me an e-mail when a host is not responding to ping:
The script works fine when I execute it directly but when cron executes it, the ping error is never picked up by the script so the if statement is ignored.
I am trying to modify the source code of a C application (quagga) in order to insert data into a mysql table. I have added 2 new source files to the source (neto_mysql, neto_trend) which in turn use mysql.h. I have also modified the Makefile.am file to include the /usr/include/mysql directory.
When trying to compile, i get the following error. What am I missing? I have minimal experience with formal C applications like this. I feel like I may also have to include the mysql.h file in the libbgp? I dont understand why it cant find the mysql functions...
I did a ./configure and make and got this returned about 1/2 hr later:
Code: undefined reference to `glDisable' undefined reference to `glDisable' undefined reference to `glutKeyboardFunc' undefined reference to `glutSpecialFunc' undefined reference to `glReshapeFunc'
And the oddest part is.... I passed --disable-gl to configure!
Please let me know how i will overcome this.I have tried from the past 5 days.
[root@localhost ~]# cc p.cc In file included from p.cc:1: /root/ping.h:2:32: warning: multi-character character constant In file included from p.cc:1: /root/ping.h:4: error: stray in program /root/ping.h:2: error: invalid function declaration
i got this simple example of a code, its basicly Anjuta Gtkmm empty project. [URL] and trying to connect button signal to a function at line 67, however i receive errors during compilation, and i dont know what's wrong error output [URL]
First off, I'm completely new to bash scripting so forgive me if I make any egregious errors. I'm trying to make pop-up reminders for the simple calendar program when. This is what I have so far:
Code: #!/bin/bash # set the time format for when #current="$(date +%I:%M %p)" current="$(date +%-l%p)" today=~/.when/today
[Code]....
When I run the script, gxmessage pops up and displays the correct information, but it does so for each line in "~/.when/today" that contains a time that matches the current system time (which would be three pop-ups at 10PM, according to the example). I want it to display the information only once. How can this be accomplished? Is a while loop even the right job for this?
Created application is working too slow, looks like there are a lot of memory leaks, there are a lot of pointers. Any effective tool for run-time errors and memory leaks detection in Visual Studio C++?
I have a function in perl which I want to use trap all errors a script ocurs which the script does not explicitly handle. These errors are then logged to various places. So I tried to use a eval block but the problem I have is sometimes if you put a die statement in the evaled script it doesn't get handled. What I have so far is: