Programming :: C Code Not Running As Expected / Cause Of It?

Apr 27, 2010

I was wondering why this code only returns me the same value ten times instead of valuate the conta+0.1 value code...

View 6 Replies


ADVERTISEMENT

Programming :: Valac: Compiling Into C Code: Expected Semicolon In The Wrong Place

Oct 20, 2010

Here is my problem: I have a Vala program that includes classes with nested classes. When I try to initialize classes (using the variable type and the variable, followed by the class's arguments [three unsigned 8-bit integers] in parentheses) and try to compile the Vala code to C code what I tried to AVOID doing, as I really wanted to create a shared object file, but now I know I have to use C code as a middleman, the compiler tells me it expects a semicolon between the class variable name and its members.

What?! A semicolon in a bad place, that's for sure! Why would I want to put a semicolon *BETWEEN* the class initialization and its members? Isn't the whole point of a class to *HAVE* different members? Here is my class:

Code:
public class Gtk.rgba : GLib.Object {
public class fg_color : GLib.Object {
private uint8 red;
private uint8 green;
private uint8 blue;
//Constructor
public fg_color(uint8 r, uint8 g, uint8 b) {
[Code].....

View 14 Replies View Related

Programming :: System Getting Hanged While Code Running

Oct 1, 2010

I am using Pthread concept for developing my application Some times my system is getting hanged while the code is running and as soon as I am Pressing CTRL + C it is coming out of the code and system is going to the normal state. but several time only ^C is appearing in the terminal and system is not responding. do any one have the Solution what to do in that case.

View 3 Replies View Related

General :: Error:backend-not-running Backend Not Running As Expected (yumex Will Close)

Mar 9, 2010

i installed yumex:yum -y install yumex, when i start yumex it came with this error:fatal error:backend-not-running backend not running as expected (yumex will close) how can i solve it?

View 10 Replies View Related

Programming :: Selenium Java Code Into Equivalent Php Code?

Mar 30, 2011

I need to rewrite the selenium java code into its equivalent php code.

View 5 Replies View Related

Programming :: Awk Computed Regex Not Working As Expected

May 31, 2011

So those of you that know me will agree that when it comes to awk I don't usually ask a lot of questions ... however this one has me stumped. I am guessing I have missed something obvious but for the life of me (and I have tested at great length) I cannot find it So the scenario is this: The following awk code should identify all versions of libgpg-error within the attached file (see below) and only show one for each version:

[Code]...

View 12 Replies View Related

Programming :: Why The Expected =, ,, ;, Asm Or __attribute__ Before Typedef Error

Feb 2, 2010

Can you tell me why gcc on LINUX is giving me this error (works find on our SCO machine)/us4/prw/include/vv_sys.h:797: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'

797 typedef struct node_struct /*NODE STRUCTURE */
798 {
799 struct node_struct *prev_ndp; /*previous node pointer */

[code]....

View 8 Replies View Related

Programming :: String Comparison - [: =: Unary Operator Expected?

Nov 23, 2010

I would like to compare the nmlookup result of IP's stored in the file ips with a list of PC names stored in the file pcs.

Code:
for line in `cat "ips"`
do

[code]....

View 2 Replies View Related

Programming :: C++ - Snprintf - Inside - For - Doesn't Work As Expected. - Int To Char

Aug 30, 2010

I need to convert an int array into a char* array.

I'm using the following code:

Code:

But it returns me

Code:

View 14 Replies View Related

Programming :: Installing Tcl/tk For Use In C++ / Error Expected Type-specifier Before Exception?

Mar 14, 2011

I have perl/tk installed and working. I tried using c++/tk and had to change the #include path in the headers to find the tk.h and tcl.h. I tried compiling a simple c++ program with g++ to test that the headers are correct. the line i type at console is:

g++ test.c cpptk.cc cpptkbase.cc -o test.bin

I fixed all previous errors, except for the following.

code....

View 2 Replies View Related

Programming :: Sockets - P2 - P3 Http Connection Taking More Time Than The Expected?

Mar 31, 2011

Iam using socket programming in one of my problem. The scenario is like this.

=>one module is working as a socket server(process p1) is able to handle client sockets on that port.
=>one module is working as socket client (process p2) is connected to server socket and Tx/Rx data on this socket. This module has some more threads, based on received data from server socket it will connect to http on other thread and get information...
=>one more module is working as socket client (process p3) is also connected to server socket and doing some other transactions.

Here my problem is when in presence of p2, p3 http connection taking more time than the expected. If we wont start p3(means only one server-client socket) then http connection is fast enough.

View 1 Replies View Related

General :: Running Code That Uses Imake?

Jan 20, 2010

I am new to Linux and have asked several Linux enthusiasts about my problem, however I am wondering at this point if it is a lost cause, since many have been unable to help me solve my problem.

I am unable to run a certain C code which uses the obsolete compilation method 'imake'. I would kindly like to ask if there is any way that I can run this code. Am I required to install anything? Or do I have to change the code in some way so that it could run on a more updated compilation method?

View 1 Replies View Related

Ubuntu Multimedia :: Code Blocks Starts But Not Running 10.04?

Aug 9, 2010

I installed code blocks from .deb files, icon of CB was created but when I click on it to start it, it shows only logo of CB and end, please wehe is error?

View 1 Replies View Related

General :: Get List Of Thread Of Running Process Using C Api (in That Code)?

Jan 29, 2010

In short our required is that we are creating a share library which can be loaded by a process and that share library analysis the process which load it. Since share library is in address space of the process so I need to find out how many threads created by the process and what is status of their stack trace etc.

So I am looking for a way to get list of threads in running process.

View 1 Replies View Related

General :: List The Currently Running Processes Via Code A Shell Script?

Feb 5, 2011

how to list the currently running processes via code a shell script. FYI i now about the top method in the terminal but i need a way to have it via a shell script.

View 4 Replies View Related

Ubuntu :: When Code Start Running On Console No Copy Paste

Oct 3, 2010

i configured the build-essential(for c compilation). and I am unable to get the output.This is what i do.(check the image) Since i wanted to copy the output from one of the tty's I tried GPM service. But i dont know how to copy it. Some says click the middle mouse button and it will copy but when i do some code start running on the console. no copy paste. How can i run JAVA programs.

View 9 Replies View Related

General :: Grep Exits Abnormally With Code 123 When Running Rgrep On Emacs

Oct 7, 2010

I'm running GNU Emacs 23.1.1 on "Ubuntu 10.04.1 LTS" and any search I perform using the built-in M-x rgrep on the standard Linux kernel source code (vanilla) ends prematurely with the following error printed to the emacs echo area:Grep exited abnormally with code 123.I have been seeing it for a while on Redhat systems as well, and with other (large) code bases.

View 2 Replies View Related

Programming :: Suid Disabled From Running All Scripts Or Just From Running Them As Root ?

Sep 4, 2009

Is suid disabled from running all home made bash scripts or just from running them as root or:

Who would know for sure.

I googled several combinations of Mandriva Linux how-to suid disabled setUID etc... so far all I found was "many distributions are disabling suid for security reasons" nothing specific.

View 2 Replies View Related

Programming :: Cron And Fsarchiver Reportedly Running Not Actually Running?

Jun 1, 2010

My root Vixie cron crontab is set to perform a system snapshot via fsarchiver: 0 0 * * * fsarchiver savefs -o -A /backups/p30_root.fsa /dev/sda2 /dev/sda3 The command itself works fine, generating about a 7G snapshot of my Suse server. I then wish to rsync this to a NAS I have located in another building: 0 3 * * * rsync -av -e ssh --delete /backups/ root{at address}:/DataVolume/os_backups/

(yes, I'm rsyncing as root. I absolutely loathe it, but I got thrown into an quasi-SA position with a ridiculous to-do list and no time to do it. I'm having to make things just work and then go back and try to improve them/learn how. I couldn't make it work in a non-root way quick enough, so for now I'm having to cron rsync jobs as root because of all the differing file permissions on this samba/MySql server. I set the NAS to only accepts ssh from the server IP, and we're behind a campus firewall... It's serious trial by fire.) The crontab also has rsync commands for the samba areas, our specialized chemistry software and affiliated MySQL databases............

View 2 Replies View Related

Programming :: Use SSE(2,3) In C/C++ Code?

Jun 6, 2011

I am working on a project with a lot of vector math and I'd like to find a way to speed it up.eading about SSE, but I've found no explanation on how to actually use it in code (was looking for some kind of hello-world example, complete with compilation instructions).Does the gcc compiler automatically make use of SSE, if you add the -sse(2,3) option on the command line? Or are their specific functions/libraries you need to call?

View 12 Replies View Related

Programming :: Code That Will Never Execute

May 23, 2011

Is there, by chance, a fancy name to describe code that must be in a program but will never be executed? In one of my (Haskell) programs, I have some error-handling code that must be in the program to keep the compiler happy (due to the type checking). However I know that, due to the logical structure of the program, it is impossible for the code to be evaluated. I am curious if there is a technical name given to code that must exist but cannot be executed.

View 6 Replies View Related

Programming :: GLX Code Won't Run Anymore?

Jan 14, 2011

I went to compile some "oldish" glx code. The code compiles great but when I go to run it I get a crash. With X Error of failed request: BadMatch (in .....running ddd causes my whole system to lock up when I call the glx function XOpenDisplay. After a few attempts I thought I'd download a demo from the net, I choose nehe opengl tutorial 2, I compiled and ran but even on a net tutorial I get the same error

./lesson02
XF86VidModeExtension-Version 2.2
Got Doublebuffered Visual!

[code]....

View 1 Replies View Related

Programming :: Translating Code To OSX?

Jul 20, 2011

I have the following code:

Code:
#!/bin/bash
function dx {

[Code].....

So essentially, it finds dx files, sorts them by numbers at the beginning, then performs the dx function I made (loops over all of the #-protein.dx and #-water.dx files).

It works fine when I'm running it on Ubuntu 11.04. However, when I try to run it on OSX, I get the following error:

Code:
mh320m01:DA_R02 janickij$ ./MOD_Loop_Tuber_Script.sh
find: illegal option -- t
find: illegal option -- y

[Code]....

View 9 Replies View Related

Programming :: How To Share Code With Others

Jan 5, 2010

I work as a linux sysadmin, and are now and then developing scripts that might be of use for others. I'd like to be able to share these, and for less trivial projects maybe create a central repository or something that others may upload updates/patches to etc.

View 10 Replies View Related

Programming :: How To Combine ASM And C Code

Apr 10, 2010

I have a little test program consisting of a NASM source file and a C source file.How do I turn them into a single program?

Code:
section .data
msg db 'Hello, World!', 10

[code]....

View 14 Replies View Related

Programming :: Three Lines Of Code - What Do They Actually Mean

Feb 23, 2011

whichever source code I go through I find these three lines of code written what do they actually mean and what is their function?

[code]...

View 6 Replies View Related

Programming :: How To Use Bash Variable In C Code?

Feb 16, 2011

I want to write a c program with some shell scripts.Now For a simple C program. I am Setting a variable called val2 in bash, now I want to use bash variable val2 in C code. How do I do that?The above doesn't work (coz its spawning a different memory space and when shell script ends the variable dies with it as per my research but how do I keep them in same memory space)Also Is there any Good reference where they teach how to integrate C and Bash Together?

View 5 Replies View Related

Programming :: Alternative For Code: Wc -l Using Grep?

Mar 23, 2011

Can you find an alternative for Code: wc -l using grep?

View 1 Replies View Related

Programming :: Code To Add 5 Numbers In Assembly?

Mar 28, 2011

Looking for code to add 5 numbers in assembly? I want to use array for input of those 5 numbers. No problem if the output is 1 digit(0....9).

View 3 Replies View Related

Programming :: Converting C Code To Assembly

May 17, 2011

I've been converting some C code to assembly for my homework; it was going well but I'm having trouble with a for loop for hours. I could not understand where is the problem and decided to ask. I'm posting the part where I'm having trouble of my C-code and assembly-code; every other part of codes act same and the variable values are same. I'm waiting this two codes to act same, but they don't.

Code:
mov ebx, [result]
mov eax, [i]
mov ecx, [ebx+eax]
mov [j], ecx
mov [ebx+eax], byte '.'

_loop:
mov ebx, [result]
mov eax, [i]
inc eax
mov cl, [ebx+eax]
cmp cl, 'Z'
je _continue

mov ebx,[result]
mov eax,[i]
inc eax
mov ecx, [ebx+eax]
mov [k], ecx
mov ebx, [result]
mov eax, [i]
inc eax
mov ecx, [j]
mov [ebx+eax], ecx
mov ecx, [k]
mov [j], ecx
inc dword [i]
jmp _loop

_continue:
Code:
j=result[i];
result[i]='.';
for(;result[i+1]!='Z';i++){
k=result[i+1];
result[i+1]=j;
j=k;
}

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved