Programming :: Unable To Understand The Highlighted Code/syntax?

Mar 4, 2011

I am unable to understand the highlighted code/syntax here and what do variable names starting with an underscore represent?

Code:
#include <iostream>
template <class Class, typename ReturnType, typename Parameter>

[code]....

View 14 Replies


ADVERTISEMENT

General :: Run A Headless Gvim To Get Syntax Highlighted Code Converted To HTML?

Jul 25, 2011

I want to generate HTML files in batch to show some gvim colorschemes in action. I took my current solution from the script at but this will open open a gvim window for each colorscheme I want to process. So far, the only way I have found to avoid the annoying new windows that pop up every second is to start a VNCserver and set the DISPLAY environment variable to that of the VNCserver so that all gvim windows are sent to the display within the VNC session.However, I would like to know if there is a way I can avoid the whole VNC setup and just run a headless gvim instance that does the conversion and exits, with no windows ever being actually displayed.

View 1 Replies View Related

Programming :: MySQL Syntax And Code Errors

Feb 10, 2010

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?

View 5 Replies View Related

Programming :: Parse Error: Syntax Error, Unexpected '@' In Php Code

Jun 14, 2011

Parse error: syntax error, unexpected '@' in C:xampphtdocsminippromail.php on line 8 .......its not recognizing the '@' symbol. heres the code im working with

<?php $receiver = myfriend@ourmail.co.in; $subject = wish; $content = Hi! My dear friend how are you.; $sender = myself@ ourmail.co.in ; $headers = From: $sender; mail($receiver,$subject, $content,$headers); echo Mail has been sent successfully.; ?>

View 1 Replies View Related

Programming :: Unable To Fix Syntax Error In Finding Ip Address Of A Host Name?

Apr 27, 2010

Writing a program that finds the IP address of a host name. Sorry forgot to include the line numbers, but where the $$$ is where the syntax error is. The errors are syntax error before "{" token and syntax error before "if". I've looked throught the code for a couple hours and can't figure out what's causing it. The code is attached below.

#define WIN
#include <stdio.h>
#include <stdlib.h>

[code]....

View 8 Replies View Related

Ubuntu :: Fortran Syntax Highlighting And Code Folding Editor Wanted?

Jul 27, 2011

I am looking for a text editor that does 1) syntax highlighting2) code folding3) it would be a bonus if I could set which macros were defined and it would show me the source I have tried geany, and codeblocks. Both incorrectly code fold around preprocessor #ifdef and #endif. The gedit plugin doesn't seem to work at all

View 7 Replies View Related

Programming :: Programmers And People That Understand The OS?

Apr 24, 2011

Well I get my other 2 questions answered , I have one last question that has been buggy me.Anyone know why windows use so many files just to keep the OS going and so bloated? The under line of files of windows is messy and loads self every where and very bloated with windows and windows vista and windows 7 very much so.I'm not sure if Linux /Mac OS X is like this or not .

I know windows needs to support alot more software and hardwar but is that not where drivers come in for the hardware.And programmers need to write the software for windows or Linux / Mac OS X.

View 14 Replies View Related

Programming :: Can't Understand Return Value Of Gawk?

Mar 10, 2010

I write a little script by bash.

#!/bin/bash
a=`gawk '/Iterations /{print $0}' hoge.log | gawk 'BEGIN{FS=" "}{print ($4)}'`
a=`expr 3 '*' $a`

[code]...

View 13 Replies View Related

Programming :: Trying To Understand This Function In JavaScript

Dec 9, 2010

In my book, this is an example of a recursive algorithm:

var reverseArray = function(x,indx,str) {
return indx == 0 ? str : reverseArray(x,--indx,(str+= " " + x[indx])) ;; }
var arr = new Array('apple','orange','peach','lime');
var str = reverseArray(arr,arr.length,"");
alert(str) ;

I'm trying to understand it, I'm stuck at the (str+= " " + x[indx])) part - that part of the function definition expects an ARGUMENT, am I right? What's being passed to it is a bit of PROGRAM, the str+= stuff. So - how is it working?

View 7 Replies View Related

Programming :: Cannot Understand Invalid Read Error

Aug 25, 2010

I have just started using Valgrind,which really is great. Most of the reported errors look kinda weird, though I can't really understand what's going on here, for example:

==00:00:02:52.033 7754== Invalid read of size 4
==00:00:02:52.033 7754== at 0x80B0987: MyCls::MyPrintf(long, char*, ...) (MyCls.cpp:270) ...
==00:00:02:52.033 7754== Address 0x47a5ee8 is 0 bytes after a block of size 296 alloc'd ...
==00:00:02:52.033 7754== by 0x809A6C1: ClsMain::taskRun(int, char**) (ClsMain.cpp:177)
==00:00:02:52.033 7754== by 0x816CFE8: main (main-C.cpp:2060)

==7754== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- Y
==00:00:02:57.410 7754== starting debugger with cmd: /usr/bin/gdb -nw /proc/7765/fd/1014 7765
GNU gdb Red Hat Linux (6.5-25.el5rh)
Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as
"i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

Attaching to program: /proc/7765/fd/1014, process 7765
MyCls::MyPrintf (this=0x47a5dc0, iPrm=3,
sMsg=0x6974320 "blablabla"...) at MyCls.cpp:270
270 cout<<endl<<"m_FilePtr="<<hex<<m_FilePtr<<dec<<endl;

Basically, Valgrind reported the "Invalid Read" error at line 270 of file MyCls.cpp, which is simply a cout of the m_FilePtr variable, which is a member variable of the MyCls class. It's a FILE* variable I use to write repeatedly on a text file. The address reported (0x47a5ee8) is 296 bytes after the "this" pointer (0x47a5dc0),as Valgrind correctly tells me but I honestly don't understand that. And of course, I need to read that variable, not only for the cout (indeed,the error is reported at every reading attempt). Besides, the application doesn't crash, but still I would like to understand if I really have to worry about this "error".

View 10 Replies View Related

Programming :: Can't Understand The Value Returned By Semctl Using GETPID Option

Oct 18, 2010

I have got a program using semctl(). I cant understand the value returned by semctl using GETPID option and its difference with the actual pid obtined by getpid()as in the following code:

Code:

int semid,retval;
semid=semget(0*20,1,0666 | IPC_CREAT);
retval = semctl(semid,0,GETPID,0);

[code]....

View 4 Replies View Related

Programming :: Yacc Conflicts - How To Understand Grammar Conflict

Jun 4, 2010

I am getting shift/reduce and reduce/reduce conflict in my yacc grammar code. yacc generates (i.e yacc -d -v parser.y) its grammar and state information in the parser.output file.

How can i interpret the below information and understand which grammar state is conflicting with other grammar state? Please help me to understand.

State 159 conflicts: 1 shift/reduce
State 1863 conflicts: 1 shift/reduce
State 1865 conflicts: 1 shift/reduce
State 1960 conflicts: 1 shift/reduce

View 6 Replies View Related

Fedora :: Unable To Connect To Homehub / Understand Trace Route Output

Sep 19, 2010

I have be unable to access my bt homehub from another (external) ip address recently. I didtrace route to see what is happening to the connection and got the following.

It bounces around as it gets out my offices network and then seems to get to BT's servers and then I get stars. what that means?

1 - 8 bouncing round office network:
9 linx3.ukcore.bt.net (195.66.224.11) 19.405 ms 19.424 ms 19.381 ms
10 core2-pos0-1-5-0.ilford.ukcore.bt.net (62.6.201.121) 20.774 ms 21.099 ms 19.986 ms

[Code].....

View 4 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 :: Can't Get The Syntax Right In This Pyqt3 Command?

Mar 14, 2010

Code:
x = self.spinbox37.value() * 40
y = self.spinbox38.value() * 40

[code]...

View 1 Replies View Related

Programming :: Syntax Error - Pascal ?

Apr 29, 2010

I have an error, which I have no idea why appears. All brackets seems ok.

error:

Code:

Code:

View 13 Replies View Related

Programming :: Validate XML File For Its Syntax?

Jan 25, 2011

I am having an XML file,i want to verify the file for its syntax,

View 14 Replies View Related

General :: Can't Open File/abcd/configFiles/vim/syntax/syntax.vim?

Mar 7, 2011

When ever i open vim, i get the error that the following error: E484: Can't open file/abcd/configFiles/vim/syntax/syntax.vim There was a .vimrc file in my home folder that i have removed.

Still i keep getting the same error. Presently in my home folder there is no .gvimrc or .vimrc file.

But still i keep getting the same error. I am not too sure where this file is mentioned.

Background info: The SHELL has been changed from tcsh to bash Earlier i had created a .vimrc file in tcsh, i have removed the .vimrc in bash SHELL.

View 1 Replies View Related

Programming :: Bash Syntax To Translate From Csh Scripts?

Jan 1, 2011

I am setting some environmental variable in my .bashrc , the sample code I was provided with is for CSH but I am using bash, and there are some syntax differences between them ... I got most of the script to work, but I am getting an error at this part :

Code: if ($RMSTREE == $RMANTREE) then
set path=($path $RMANTREE/bin)
else

[code]...

View 2 Replies View Related

Programming :: Sed - Syntax Error Near Unexpected Token

Mar 9, 2011

#by executing bash file
#!/bin/sh
sed -i 's/if (IEexec || domExec) document.write('<iframe id="IdMyIframe" '+IframePropriedades+'></iframe>');//g' *.php

Output is:
line 4: syntax error near unexpected token `<'
line 4: 'sed -i 's/if (IEexec || domExec) document.write('<iframe id="IdMyIframe" '+IframePropriedades+'></iframe>');//g' *.php'

View 6 Replies View Related

Programming :: Syntax Error Near Unexpected Token

Jun 18, 2010

I'm fairly new to shell scripting and am having the hardest time figuring out why this simple script is giving me an error

The error is "syntax error near unexpected token `else'

I'm using TextEdit on OSX (sorry I'm limited to this). The only thing I can think of is that it's reading some return character and getting thrown off. I've tried saving the script using different encoding types but the same error pops up.

I also get an error at line 2 because it does not regonize as a command

View 5 Replies View Related

Programming :: Syntax Not Clear In A Kernel Patch?

Apr 2, 2010

I was going through init/calibrate.c.url

I am not clear with use of + sign before function names. If any one here is aware of this syntax let me know.
They have used + and - signs before some lines I am not sure of what they are?

View 2 Replies View Related

Programming :: Syntax For Passing Arguments In Csh Aliases?

Mar 22, 2009

I want to write a little time-saving alias for my .cshrc file that will move files and then cd to the directory I've moved them to. What I can't quite figure out is the syntax to say 'move all the arguments except the last one.' Here is what I have:

alias follow 'mv !:1-$-1 !:$; cd !:$'

This actually seems to work, but it also gives me an irritating error:

mv: cannot stat `destinationdirectory/-1': No such file or directory

Similarly, I tried:

alias follow 'mv !:*$#argv-1 !:$; cd !:$'

Again the move and cd are successful, but again there is an error:

mv: cannot stat `destinationdirectory/0-1': No such file or directory

View 1 Replies View Related

Programming :: Write SSH Terminal - Syntax Error

Mar 23, 2010

I am writing a code in bash script, in my ubuntu command terminal. The program should send the message, "Hello John!!" 5 times to john's terminal (assuming he is logged on to the server). But I keep getting this error: Syntax error: end of file unexpected (expecting "done").

#!/usr/bin/sh
clear
x=1 # this sets up the flag so we can have it send a limited amount
while [ $x -le 5 ]
do
write jdouglas << EFO
>Hello John!!
>EFO
x=$(( $x + 1 ))
done

View 1 Replies View Related

Programming :: X86 Syntax - Understanding Assembly Instruction

Jan 6, 2011

I'm reading "Understanding the Linux Kernel" and came upon this assembly instruction:
movl $(__KERNEL_CS << 16), %eax
I am curious as to what "<<" means/does. I tried to gooogle, but google doesn't search for "<<".

View 7 Replies View Related

Programming :: Find Syntax Exclude Certain Extensions And Filter By Age

May 26, 2010

I'm trying to find all the files in a specified directory that do NOT end in .archived or .error and are older than 30 mins. Currently I have: Code: find /opt/edi/incoming -type f ! ( -name "*.archived" -name "*.error" ) -cmin 30 But I keep returning files that end in those extensions and I'm not sure if I'm using -cmin correcty? If there is a better way to do this (perl, etc) I'm open to options, this is for a nagios check.

View 2 Replies View Related

Programming :: Bash Syntax \ See 1 If The Exit Value Of Diff Is 0, And Otherwise Wanna See 0?

Dec 26, 2010

I'm new to scripting and I have a trouble with if statement syntax. The code is: Code: #there is a diff command here, and it does what i want but#i wanna see 1 if the exit value of diff is 0, and otherwise i wanna see 0.#the problem is here: (syntax error near unexpected token "then")

if["$?"==0];
then
echo 1

[code].....

View 1 Replies View Related

Programming :: Bash Script Cannot Run Functions - No Syntax Errors

Apr 23, 2011

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.

phoneEdi() {
directory=~/phonepro/directory
loop="y"
clear
tput cup 4 4; echo "Record Editor" .....

View 1 Replies View Related

Programming :: Awk Syntax For Calculating Average And Standard Deviation

Apr 20, 2011

I have a data in a column.

Code:

I want to calculate average and standard deviation. As first step I want to calculate average for the data than calculate (del=data - avg) for all the data.

I suppose get

Code:

For this I use AWK and the code goes like this

Code:

But I get different answers.

Code:

Why the answers are so different? since this is wrong I can not continue calculating the standard deviation.

View 6 Replies View Related

Programming :: Bash - Syntax For ((<arithmetic Expression>)) Usage ?

Mar 18, 2010

I do not understand bash' syntax regarding the use of ((<arithmetic expression>)). $((<arithmetic expression>)) is tokenised to a single word. OK.

Code:

In isolation

Code:

It may not be used where a word is expected. This generates a syntax error. Why?

Code:

View 6 Replies View Related







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