|
What is the issue?
Compiler issue?
You can use gcc/g++[^] along with gdb[^].
Do not trust a computer...
Always check what computer is doing
regards,
Divyang Mithaiwala
Software Engineer
|
|
|
|
|
Hi,
I have to develop XML parser and i am using c,c++, lex and yacc and there are so many c++ programs are there in one folder and main program is editor.cpp and if i run this program is that ok..
Can i run that any where under any directory.
is there only g++ command to run c++ code or any other method is available.
Thanks for any help...
|
|
|
|
|
No, there is, for example, the Intel compiler set(icc).
However, as long as you assume that "g++ runs c++ code", I would suggest getting an introduction course first. C++ is a compiler, and as such, the binary output of the compiler itself is an executable. The compiler just translates it to machine code.
If you are overwhelmed by the magnitude of the task, you might need to work on the basics first:
What is C++? What is C? What does a compiler do? What does lex do? And yacc? How is an XML-file built? How do you read it? Could you read it yourself? What are the steps involved in reading? How do you write these steps in C? C++? etc.
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
savitha87k wrote: I have to develop XML parser and i am using c,c++, lex and yacc
Are you doing for academic purpose? If not, I would recommend some existing XML libraries like TinyXML rather than reinventing wheel.
Looks like you have no idea about what you are trying to do. Learn some basic stuff. Get a good IDE, Code::Blocks is a good one for beginners. Also learn toolchain[^] before you start some serious programming on LINUX.
|
|
|
|
|
If I understand correctly, the thing you want to do it to create a symlink to your program in some directory that is "in the path".
this can be done as such:
<br />
ln -s PATH_TO_THE_PROGRAM /usr/local/bin<br />
where PATH_TO_THE_PROGRAM would be, for example "/home/username/myprograms/myprogram"
and for "/usr/local/bin" this is dependant on what dist you are using.
writing echo $PATH in the command line will tell you what directories are on the path.
|
|
|
|
|
Hi,
This isn't really specific to linux only, but I couldn't find a messageboard for general command line.
What I am trying to do is change my directory based on a search. Is there any way to do this?
For example, let's say there's a directory:
C:\Windows\RandomDir1\8732434234
and my local directory on the command line is just C:\Windows\RandomDir1\.
Instead of using grep or find to first find 8732434234 and then use cd to change to that directory, can I combine the 2 commands to do this in 1 line?
What I do now is:
dir | find /i "873", then copy result and change dir manually.
Thanks for the help, I'm kind of newbie at this
modified on Saturday, May 16, 2009 2:23 AM
|
|
|
|
|
The linux command line and windows command line are not equivalent. This solution works in Bash, I'm not sure about Windows.
For ceratin commands you can pipe the results from one command to another using | , for example this searches for all directories starting with P and then passes the results to head to display the first one:
find . -name "P*" -xtype d | head -n 1
you can use bacticks `` to execute one command and use its results where the command is placed in another so to change directories we would want to put the search in this:
cd `search command goes here`
so the full command to enter the first directory that starts with P would look like this:
cd `find . -name "P*" -xtype d | head -n 1`
Another way would be to write a shell script (or batch file) to do the searching and directory changing for you.
|
|
|
|
|
Hi,
I have an application where if it runs indivisually could able to execute commands (like system("ls")) and could able to execute tcl script.
Same application if started from health monitor process (From health monitor process my application will be forked), it could not execute the commands from system() and also my tcl script execution failing.
While call to system gives error like "ls: write error: Bad file descriptor" and tcl script execution fails. Could you please tell me why this problem is coming when process is started as child process.
Thanks,
Chandrashekhar
|
|
|
|
|
i am writing a milter which decrypts the email message.
For decryption i am using GMP library...
The code which gives the error is as follows:
mpz_t bigbody,encbody,decbody,n,d,e;
mpz_init_set_str (e, "5", 10);
mpz_init_set_str (n, "81072118814004638617775947138239917744589505176471539666269773100315781097546894455560658571445286325125766632676152452856383447352821337178984474781813475276075048299705214136395672502245955793627681061360075723595075874516950614187016991430293887968216015097675955399134514678660046996064181098182893072761", 10);
mpz_init_set_str (d, "32428847525601855447110378855295967097835802070588615866507909240126312439018757782224263428578114530050306653070460981142553378941128534871593789912725382636961637010791821646038659077539848411532121133465246631106852802485583932352673149866783600963924490576147444236696494852521901563664557493382382127469", 10);
char *STR;
STR=(char*)malloc(1000);
mpz_t array[10];
//mpz_array_init (array, 10, 308);
mpz_t array1[10];
//mpz_array_init (array1, 10, 100000);
char substring[400];
int i=0,lower=0,upper=308;
while(i
{
strncpy(substring, data_buffer + lower, upper);
*(substring+308)='\0';
syslog( LOG_INFO, "conn# %d - substring = %s", cd->connection_num, substring );
lower=upper;
upper=upper+308;
mpz_init_set_str(array[i],substring,10);
mpz_get_str (STR, 10, array[i]);
strcat(STR,"\0");
syslog( LOG_INFO, "conn# %d - Encrypted-Biginteger = %s", cd->connection_num, STR );
mpz_init(array1[i]);
mpz_powm (array1[i], array[i], d, n);
mpz_get_str (STR, 10, array1[i]);
syslog( LOG_INFO, "conn# %d - Decrypted-Biginteger = %s", cd->connection_num, STR );
size_t length;
void *ret;
char *decrypted;
decrypted=(char*)malloc(1000);
ret=mpz_export (decrypted, &length, 1,sizeof(data_buffer[0]), 0, 0, array1[i]);
//ret=mpz_export (decrypted, &length, 1,sizeof(data_buffer[0]), 0, 0, array1[i]);
strncpy(decrypted,ret,length);
*(decrypted+length)='\0';
syslog( LOG_INFO, "conn# %d - size decrypted = %d Decrypted = %s", cd->connection_num,length, (char *)ret );
fflush(stdout);
free(decrypted);
fflush(stdin);
mpz_clear(array[i]);
mpz_clear(array1[i]);
i++;
}
This code executes for 2 iterations and then give segmentation fault at mpz_powm( )
|
|
|
|
|
Hi
I want a php code for change date from gregorian to shamsi (jalali).
by "date(Ymd)" function get the current time (the type of system is gregorian.) and change it to shamsi (jalali) date.
if any body knows, please help me!
Thanks all.
|
|
|
|
|
VB code
<a href="https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4220&lngWId=10">https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4220&lngWId=10</a>[<a href="https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4220&lngWId=10" target="_blank" title="New Window">^</a>]
I'll let you convert it to php.
|
|
|
|
|
or better:
<a href="http://snippets.dzone.com/posts/show/4003">http://snippets.dzone.com/posts/show/4003</a>[<a href="http://snippets.dzone.com/posts/show/4003" target="_blank" title="New Window">^</a>]
<a href="http://www.phpclasses.org/browse/package/4457.html">http://www.phpclasses.org/browse/package/4457.html</a>[<a href="http://www.phpclasses.org/browse/package/4457.html" target="_blank" title="New Window">^</a>]
<a href="http://forum.joomla.org/index.php/topic,126461.msg633319.html">http://forum.joomla.org/index.php/topic,126461.msg633319.html</a>[<a href="http://forum.joomla.org/index.php/topic,126461.msg633319.html" target="_blank" title="New Window">^</a>]
|
|
|
|
|
|
Hi
I have jalali js calender but I want to show current date time ?
|
|
|
|
|
hello!
It gave me a site created by joomla to make the change and administer, but I do not how.
The problem is that all of joomla tutorials are explain how to create a site from zero:
how does it work on an existing site ?
thank you for your help.
|
|
|
|
|
I've not used joomla - but the usual routine is copy all web pages into the new document root (htdocs or wwwroot etc), copy database across (best way is to export import if possible) and edit the config file with the local addresss (http://localhost/), your new database settings (host, username, password).
If you don't have a local server, and joomla is php (which I think it is) then I suggest getting something like XAMPP to let you work on and test the site locally.
|
|
|
|
|
Thank you Marc Firth I followed your advice and it works but I have a problem I can not log to Administrator.
I used the password they gave me it is the same that the password in table jos_users.
|
|
|
|
|
i suggest googling that one
|
|
|
|
|
whats the error? "wrong password"? "database unavailable"?
|
|
|
|
|
password or username incorrect or access level
|
|
|
|
|
I write "SQL queries Templates and perpfocessor" code that is given by Andrei Bozantan. But it was not show anything.
Please, send detail on this project and code.
|
|
|
|
|
Did you notice the bit of the bottom of the article where you could ask questions like this?
Did you download and use the source code supplied?
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
Anyone here has any real experience with eXaro?
I compiled/installed eXaro 1.8, ran the designer, made a simple report, executed it through the designer... It looks ok.
I have a problem when I try to use the report from code.
I was using the example from exaro's site (I even tried it with the example db and report) and I keep getting error that StdReport can't be found.
I figured that StdReport is the report's root element.
I found that the report isn't actually read at all because the varialbe m_reports doesn't contain any reports... And... m_reports is filled only for exaro plugins?
I must be missing something, but I can't figure out what.
Any help?
To hell with circumstances; I create opportunities.
|
|
|
|
|
Hello everyone,
I have a problem regarding special character in internet explorer 7 and above.
i typed ñ but the output is a black diamond(♦). But if i typed it in ie 6, i got it correctly. Confused
any suggestion?
thanks
jyn
|
|
|
|
|
|