|
Imagine the following class that is inherited from std::vector
template<typename ObjType>
class myclass : public std::vector<ObjType*>
{ ... fancy stuff ... }
This class is basically an extended vector; it compiles fine under VS 2005, but fails to compile under Linux. It always throws an error about missing type specifiers when using an iterator, like iterator it = begin(); .
Anyone has an idea what the cause might be? I think it is trying to use std::iterator, even though the function exists in myclass, and so it should have the iterator type (if I don't include using namespace std; , the code fails with an unknown type "iterator", that's why I'm assuming the above).
Again, it compiles fine under Windows.
|
|
|
|
|
Hello All,
I am using the imap_search function and I want to return a list of all mail ids flagged as important. I am using the function this way.
$rst = imap_search($mbox,"FLAGGED");
if($rst===false)
{
echo "miss";
}
else
{
$cnt = count($rst);
for ($i=0; $i<$cnt; $i++)
{
echo "Match found in Msg#: $rst[$i]\n";
}
}
The output from above produces "miss".
I suspect my search string is wrong, but for all my searching I can not find a valid example of its propper usage. The mailbox I am using has 5 email messages in it with one marked as important.
Any ideas?
Thanks in advance!
|
|
|
|
|
nm, I was looking for the wrong thing to begin with. I needed to find emails witha return receipt so I can move them to a different folder.
Do this was easy enough with the strpos function looking for "Return-Receipt-To" in the returned string from imap_fetchheader().
From here it is easy enough to use the imap_mail_move() function (also using the imap_expunge before you close the imap connection).
...cause I share
|
|
|
|
|
Hi,
In a nut shell I'm trying to post some data to a file on a server, and I am having problems.
Since this is a project from a college class that finished on Friday, I need some help to finish it before I forget what the assignment was about. It is somewhat goofy what we were doing, so I will leave most of what already works out of my story.
We are supposed to take a file that is nothing but a text file and is a list of some data. The Perl/CGI file reads that data, constructs a web page that shows that data using a form and input tags. It also, using JavaScript, shows the data in a tree structure. All that code works great and is not my problem.
We are supposed to use the same Perl/CGI file to update the text file on the server using a POST by saving to that text file any changes we make to our data. I can not get the post to work. I do not know if my form is the problem or the problem is in the Perl Script code that detects when I need to make the changes to the text file. I think it is in the form, but I am not sure what properties I need to declare in the form tag except for method="POST".
I could include the code, but it is unnecessary to do so right now. If you could suggest a good tutorial on what you need to do to make a post using perl that would even be ok. I will post the code if nothing else is working for me. Thanks.
PS - In other words, I don't want you to write my code, just explain to me what steps I need to take or guide me to the right solution. Thanks.
|
|
|
|
|
Additional---
I kept trying different things and I have now got everything to work except the file is appended data to the txet file. Here is the code I am using:
open (myCourses, "+<courses.txt") or="" die="" $!;
i="" read="" the="" file="" into="" an="" array="" using="" this="" code:
="" my="" @lines="&<myCourses">;
I then manipulate the data and write it back to the same file inside a foreach loop using the @lines variable. What I get is a duplication of the existing data. I want the data to be removed from the file and then new data added back. The instructor said we are suppossed to use the open statement above, not a read and then a write. Should not this line behave the same as using an open read, and then an open write? I have tried everything, I think. Please help.
|
|
|
|
|
The code is:
open (myCourses, "+<courses.txt") or die $!;
my @lines = <myCourses>;
Sorry for the mess up.
|
|
|
|
|
Not really sure if this will help you,
perl docs - open
"You can put a '+' in front of the '>' or '<' to indicate that you want both read and write access to the file; thus '+<;' is almost always preferred for read/write updates--the '+>;' mode would clobber the file first. You can't usually use either read-write mode for updating textfiles, since they have variable length records."
|
|
|
|
|
Hi every one,
I am getting Gateway Timeout Error when running php script.Script was running fine before after some hours it is giving this error.Don't know why.The script was to connect to DB and insert some data into tables.It is getting timeout even before connecting to DB.
Can any one tell me any reason why this happening.
Regards,
Pavan,Independent Programmer.
|
|
|
|
|
a quick google came up with this...
504 Gateway Timeout
ErrorDocument Gateway Timeout | Sample 504 Gateway Timeout
The server was acting as a gateway or proxy and did not receive a timely request from the upstream server.
If the script was working fine and then it is not, I would look into newly installed software and/or changes to the server configuration.
|
|
|
|
|
Hello sir,
i have some knowledge of C
but can u tell me how can i Start programing for software and Internet Application software....and OS making software ? Which programing languages are best for me to start.
and other program....
Please gave me some support.
Thank you for your support
|
|
|
|
|
Buy a book on <insert language="" here="">
I prefer C++, C, C# and VisualBasic.Net
|
|
|
|
|
thank you for your response and help.
|
|
|
|
|
Can anyone show me a short perl test script to print a crystal report?
Thanks,
Steve
|
|
|
|
|
|
How to do kickstart without using the linux booting cd........?
|
|
|
|
|
Careful you may hurt your toes!
|
|
|
|
|
hi, thnx for ur reply.....
but please do know about the subject before replying......
|
|
|
|
|
|
hi, thnx for ur reply...
please let me know how could we process from the LAN connections.
|
|
|
|
|
Hi. I a'm writting a simple application on php 5 and zend_framework. I need to create two dropdown lists that depends on each other. Cities and streets for example. I select a new city at my client page and want that my application post me at the other dropdown list streets related to this city in the database. Which would be the better way to do it?
|
|
|
|
|
simple is relative but I would write an ajax call to a php server side script that returned the street data. All of this would started by using a onchange event of the city select from the display page.
|
|
|
|
|
Tnx. Now i know where to look. Big tnx.
|
|
|
|
|
Hi there !
Im using Joomla 1.5 to build my site.
My component(query data from database of website) work well if i don't install joomfish.
After i installed Joom!Fish 2.0.4 Stable into my site for translation my component does not work(with error).
My code of component as bellow:
$query='select * from jos_content where sectionid=11 and state=1
order by catid ';
$database->setQuery( $query );
$result=mysql_query($query);
while($row=mysql_fetch_object($result)){
echo 'data'.$row->title;
}
And i see these bellow warnings if i refer to my component.
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\so\components\com_products\products.php on line 131
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\so\components\com_products\products.php on line 131
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\so\components\com_products\products.php on line 137
Any ideas !
Thanks in regards !
|
|
|
|
|
sharkbc wrote: Access denied for user 'ODBC'@'localhost' (using password: NO)
Check your configuration file as it appears you can't connect to the database using your credentials. Your new install probably overwrote the config file.
|
|
|
|
|
Dear Marc Firth !
The configuration file has no change(I checked).
My website "works well" except my component.
Thanks anyway !
|
|
|
|