|
From: Peeyush B. <pee...@re...> - 2007-04-05 08:17:00
|
=0AThanxs a lot...=0A=0AOn Thu, 05 Apr 2007 Zongliang,Quan wrote :=0A>Try= it:=0A>=0A>*nix:=0A>http://www.palfrader.org/code2html/=0A>Windows:=0A>htt= p://www.codeproject.com/Purgatory/CPPtoHTML.asp=0A>=0A>It's really simple. = You can write one using C++.=0A>=0A>Regards.=0A>Quan=0A>=0A>=0A>On 5 Apr 20= 07 07:25:05 -0000=0A>"Peeyush Bishnoi" <pee...@re...> wro= te:=0A>=0A> >=0A> >=0A> > I want to know how to print the output of C++ pro= gram to HTML. Means a utility to convert your C++ code output should be pri= nted to HTML file.=0A> >=0A> > Please give your valuable suggestions.=0A> >= =0A> > Thank you=0A> >=0A> > regards=0A> > Peeyush Bishnoi=0A>=0A>---------= --------------------------------------=0A>Zongliang Quan=0A>quanzongliang@g= mail.com,qua...@ho...=0A>Admin by=0A>http://postgresql.oss.tw= =0A>http://postgresql-chinese.blogspot.com=0A>=0A |
|
From: Peeyush B. <pee...@re...> - 2007-04-05 12:33:19
|
=0AI think that PWM has understand the problem correctly...i want that back= end should be c++ ouput which is real time data & frontend should be HTML i= nterface . So how we will do it..please help me...=0AI gone thru code2html = but it working on c++ source code not on output of c++...=0A=0Aplease help = me ...=0A=0A---=0APeeyush Bishnoi=0A=0A=0AOn Thu, 05 Apr 2007 Per Westermar= k wrote :=0A>But the question here is:=0A>=0A>Is it the source code that sh= ould be converted to HTML format, or do the=0A>OP want to create HTML data = dynamically?=0A>=0A>If it's the second alternative, it is enough to just in= sert HTML tags in=0A>the data that is printed or written to file.=0A>=0A>/p= wm=0A>=0A>On Thu, 5 Apr 2007, Zongliang, Quan wrote:=0A>=0A> > Try it:=0A> = >=0A> > *nix:=0A> > http://www.palfrader.org/code2html/=0A> > Windows:=0A> = > http://www.codeproject.com/Purgatory/CPPtoHTML.asp=0A> >=0A> > It's reall= y simple. You can write one using C++.=0A> >=0A> > Regards.=0A> > Quan=0A> = >=0A> >=0A> > On 5 Apr 2007 07:25:05 -0000=0A> > "Peeyush Bishnoi" <peeyus= hvi...@re...> wrote:=0A> >=0A> > >=0A> > >=0A> > > I want to kno= w how to print the output of C++ program to HTML. Means a utility to conver= t your C++ code output should be printed to HTML file.=0A> > >=0A> > > Plea= se give your valuable suggestions.=0A> > >=0A> > > Thank you=0A> > >=0A> > = > regards=0A> > > Peeyush Bishnoi=0A> >=0A> > -----------------------------= ------------------=0A> > Zongliang Quan=0A> > qua...@gm...,quanz= ong...@ho...=0A> > Admin by=0A> > http://postgresql.oss.tw=0A> > ht= tp://postgresql-chinese.blogspot.com=0A> >=0A> >=0A> > --------------------= -----------------------------------------------------=0A> > Take Surveys. E= arn Cash. Influence the Future of IT=0A> > Join SourceForge.net's Techsay p= anel and you'll get the chance to share your=0A> > opinions on IT & busines= s topics through brief surveys-and earn cash=0A> > http://www.techsay.com/d= efault.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV=0A> > _____________= __________________________________=0A> > Dev-cpp-users mailing list=0A> > D= ev-...@li...=0A> > TO UNSUBSCRIBE: http://www23.brink= ster.com/noicys/devcpp/ub.htm=0A> > https://lists.sourceforge.net/lists/lis= tinfo/dev-cpp-users=0A> >=0A>=0A |
|
From: Reid T. <Rei...@at...> - 2007-04-05 12:40:26
|
Peeyush Bishnoi wrote: > > > I think that PWM has understand the problem correctly...i want that > backend should be c++ ouput which is real time data & frontend should > be HTML interface . So how we will do it..please help me... > I gone thru code2html but it working on c++ source code not on output > of c++... > > please help me ... > google for libcgi and libcgi++ etcetera -- there are numerous libraries that have been developed for such things |
|
From: Albert J. <a_j...@ho...> - 2007-04-05 08:37:15
|
Dear friends,
I am new to C++ programming and I am having some difficulty using a piece of
code I have found on the web. All it does, is sorting an array of pairs
(a,b) in an increasing order. In the present code, the output is also pairs
(a,b) where only the "a" elements are ordered. My question is: How can I
extract from the output only the arrays of "a's" or the array of "b's"
separately?
I would appreciate if you could help me or refer me a specific site where I
could understand better the realated issues.
Regards,
Alberto
// sort.cpp
//
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
using namespace std;
struct associate
{
double num;
int chr;
associate(double n, int c) : num(n), chr(c){};
associate() : num(0), chr('\0'){};
};
bool operator<(const associate &x, const associate &y)
{
return x.num < y.num;
}
ostream& operator<<(ostream &s, const associate &x)
{
return s << "<" << x.num << ";" << x.chr << ">";
}
int main ()
{
vector<associate>::iterator i, j, k;
double *A = new double[5];
int *B = new int[5];
associate arr[5];
for (int a=0; a<5; a++) {
scanf("%lf %d", &A[a], &B[a] );
arr[a] = associate(A[a], B[a]);
}
// Set up vectors
vector<associate> v(arr, arr+5), v1((size_t)5),
v2((size_t)5);
// Copy original vector to vectors #1 and #2
copy(v.begin(), v.end(), v1.begin());
copy(v.begin(), v.end(), v2.begin());
// Sort vector #1
sort(v1.begin(), v1.end());
// Stable sort vector #2
stable_sort(v2.begin(), v2.end());
// Display the results
cout << "Original sort stable_sort" << endl;
for(i = v.begin(), j = v1.begin(), k = v2.begin();
i != v.end(); i++, j++, k++)
cout << *i << " " << *j << " " << *k << endl;
return 0;
}
_________________________________________________________________
Dont waste time standing in linetry shopping online. Visit Sympatico / MSN
Shopping today! http://shopping.sympatico.msn.ca
|
|
From: Jonathan W. <jon...@gm...> - 2007-04-05 08:57:26
|
Hi,
I don't believe there is a built-in way of doing this with custom
structures, so you'll have to do it yourself:
Iterate over the array of associates, and build a vector with the assoc.num=
or
assoc.chr
On the other hand, you might want to look into the STL 'map' class, which
maintains pairs of keys and values
Yours,
Jonathan
On 4/5/07, Albert Jardinier <a_j...@ho...> wrote:
>
>
> Dear friends,
>
> I am new to C++ programming and I am having some difficulty using a piece
> of
> code I have found on the web. All it does, is sorting an array of pairs
> (a,b) in an increasing order. In the present code, the output is also
> pairs
> (a,b) where only the "a" elements are ordered. My question is: How can =
I
> extract from the output only the arrays of "a's" or the array of "b's"
> separately?
> I would appreciate if you could help me or refer me a specific site where
> I
> could understand better the realated issues.
>
> Regards,
>
> Alberto
>
>
>
> // sort.cpp
> //
>
> #include <stdio.h>
> #include <stdlib.h>
>
> #include <iostream>
> #include <algorithm>
>
> #include <vector>
> #include <functional>
>
> using namespace std;
>
> struct associate
> {
> double num;
> int chr;
>
> associate(double n, int c) : num(n), chr(c){};
> associate() : num(0), chr('\0'){};
> };
>
> bool operator<(const associate &x, const associate &y)
> {
> return x.num < y.num;
> }
>
>
> ostream& operator<<(ostream &s, const associate &x)
> {
> return s << "<" << x.num << ";" << x.chr << ">";
> }
>
> int main ()
> {
> vector<associate>::iterator i, j, k;
>
> double *A =3D new double[5];
> int *B =3D new int[5];
>
> associate arr[5];
> for (int a=3D0; a<5; a++) {
> scanf("%lf %d", &A[a], &B[a] );
> arr[a] =3D associate(A[a], B[a]);
> }
>
> // Set up vectors
> vector<associate> v(arr, arr+5), v1((size_t)5),
> v2((size_t)5);
>
> // Copy original vector to vectors #1 and #2
> copy(v.begin(), v.end(), v1.begin());
> copy(v.begin(), v.end(), v2.begin());
>
> // Sort vector #1
> sort(v1.begin(), v1.end());
>
> // Stable sort vector #2
> stable_sort(v2.begin(), v2.end());
>
> // Display the results
> cout << "Original sort stable_sort" << endl;
> for(i =3D v.begin(), j =3D v1.begin(), k =3D v2.begin();
> i !=3D v.end(); i++, j++, k++)
> cout << *i << " " << *j << " " << *k << endl;
>
> return 0;
> }
>
> _________________________________________________________________
> Don't waste time standing in line=97try shopping online. Visit Sympatico =
/
> MSN
> Shopping today! http://shopping.sympatico.msn.ca
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
--=20
<Morpheus> linux, c'est une question de VI ou de MORE
|