hi
i am trying to set up a home page with an email form, where i can fill out email address and subject and comments and the php page will run
mail -s [email protected] $comments
how can I do this via php to call the linux command?
thanks in advance
I hope this question takes a simple fix, and I am just missing something very small.
I am in my second semester of C++ in college, and we are just getting into OOP. This is my first OOP program, and it is causing me a little problem. Here are the errors I am getting:
Member function must be called or its address taken in function displayGrid(int,Cell ( *)[20])
Member function must be called or its address taken in function Turn(int,int,Cell ( *)[20])
Member function must be called or its address taken in function Turn(int,int,Cell ( *)[20])
Warning: Parameter 'grid' is never used in function displayGrid(int,Cell ( *)[20])
Here is all of my code. I am aware It is much more code than necessary, sorry if it makes it more difficult. I was worried that I might accidentally delete something.
const int MAX=20;
//Struct Cell holds player and their symbol.
class Cell
{
private:
int Player;
char Symbol;
public:
Cell(void);
void setPlayer(int);
void setSymbol(char);
int getPlayer(void);
char getSymbol(void);
};
Cell::Cell(void)
{
Symbol ='-';
}
void Cell::setPlayer(int player_num)
{
Player = player_num;
}
void Cell::setSymbol(char rps)
{
Symbol = rps;
}
int Cell::getPlayer(void)
{
return Player;
}
char Cell::getSymbol(void)
{
return Symbol;
}
void Turn(int, int, Cell[MAX][MAX]);
void displayGrid(int, Cell[MAX][MAX]);
void main(void)
{
int size;
cout << "How big would you like the grid to be: ";
cin >> size;
//Checks to see valid grid size
while(size>MAX || size<3)
{
cout << "Grid size must between 20 and 3." << endl;
cout << "Please re-enter the grid size: ";
cin >> size;
}
int cnt=1;
int full;
Cell grid[MAX][MAX];
//I use full to detect when the game is over by squaring size.
full = size*size;
cout << "Starting a new game." << endl;
//Exits loop when cnt reaches full.
while(cnt<full+1)
{
displayGrid(size, grid); //calls function to display grid
if(cnt%2==0) //if cnt is even then it's 2nd players turn
cout << "Player 2's turn." << endl;
else
cout << "Player 1's turn" << endl;
Turn(size, cnt, grid); //calls Turn do each players turn
cnt++;
}
cout << endl;
cout << "Board is full... Game Over" << endl;
}
void displayGrid(int size, Cell grid[MAX][MAX])
{
cout << endl;
cout << " ";
for(int x=1; x<size+1; x++) // prints first row
cout << setw(3) << x; // of numbers.
cout << endl;
//Nested-For prints the grid.
for(int i=1; i<size+1; i++)
{
cout << setw(2) << i;
for(int c=1; c<size+1; c++)
{
cout << setw(3) << grid[i][c].getSymbol;
}
cout << endl;
}
cout << endl;
}
void Turn(int size, int cnt, Cell grid[MAX][MAX])
{
char temp;
char choice;
int row=0;
int column=0;
cout << "Enter the Row: ";
cin >> row;
cout << "Enter the Column: ";
cin >> column;
//puts what is in the current cell in "temp"
temp = grid[row][column].getSymbol;
//Checks to see if temp is occupied or not
while(temp!='-')
{
cout << "Cell space is Occupied..." << endl;
cout << "Enter the Row: ";
cin >> row;
cout << "Enter the Column: ";
cin >> column;
temp = grid[row][column].getSymbol; //exits loop when finally correct
}
if(cnt%2==0) //if cnt is even then its player 2's turn
{
cout << "Enter your Symbol R, P, or S (Capitals): ";
cin >> choice;
grid[row][column].setPlayer(1);
in >> choice;
}
//officially sets choice to grid cell
grid[row][column].setSymbol(choice);
}
else //if cnt is odd then its player 1's turn
{
cout << "Enter your Symbol r, p, or s (Lower-Case): ";
cin >> choice;
grid[row][column].setPlayer(2);
//checks for valid input by user1
while(choice!= 'r' && choice!='p' && choice!='s')
{
cout << "Invalid Symbol... Please Re-Enter: ";
cin >> choice;
}
//officially sets choice to grid cell.
grid[row][column].setSymbol(choice);
}
cout << endl;
}
Thanks alot for your help!
Using iis7, windows 7, asp.net 3.5. I have in my hosts file
127.0.0.1 mysite
::1 mysite
I forgot why I added the ::1, but I think it was important. Anyone know what the second line is for? Thanks in advance.
Edit
One more question. What happens if I leave it out? The web site I'm working on doesn't address via IPv6, at least, not that I know of.
Hello everyone,
I first need to apologize for my earlier questions. (You can check my profile for them)They seemed to ask more questions than give answers. Hence, I am laying down the actual question that started all them absurd questions.
I am trying to design a chat applet. Till now, I have coded the applet, servlet and communication between the applet and the servlet. The code in the servlet side is such that I was able to establish chatting between clients using the applets, but the code was more like a broadcast all feature, i.e. all clients would be chatting with each other. That was my first objective when I started designing the chat applet. The second step is chatting between only two specific users, much like any other chat application we have. So this was my idea for it:
I create an instance of the servlet that has the 'broadcast-all' code.
I then pass the address of this instance to the respective clients.
2 client applets use the address to then chat. Technically the code is 'broadcast-all', but since only 2 clients are connected to it, it gives the chatting between two clients feature. Thus, groups of 2 clients have different instances of the same servlet, and each instance handles chatting between two clients at a max.
However, as predicted, the idea didn't materialize!
I tried to create an instance of the servlet but the only solution for that was using sessions on the servlet side, and I don't know how to use this session for later communications.
I then tried to modify my broadcast-all code. In that code, I was using classes that implemented Observer and Observable interfaces. So the next idea that I got was:
Create a new object of the Observable class(say class_1). This object be common to 2 clients.
2 clients that wish to chat will use same object of the class_1.
2 other clients will use a different object of class_1.
But the problem here lies with the class that implements the Observer interface(say class_2). Since this has observers monitoring the same type of class, namely class_1, how do I establish an observer monitoring one object of class_1 and another observer monitoring another object of the same class class_1 (Because notifyObservers() would notify all the observers and I can't assign a particular observer to a particular object)?
I first decided to ask individual problems, like how to create instances of servlets, using objects of observable and observer and so on in stackoverflow... but I got confused even more. Can anyone give me an idea how to establish chatting between two clients only?(I am using Http and not sockets or RMI).
Regards,
Mithun.
P.S. Thanks to all who replied to my previous (absurd) queries. I should have stated the purpose earlier so that you guys could help me better.
I am writing a program to grab picture from the Photo Album on the device and automatically send it as attachment to an email address. I want to do this without displaying the MFMailComposeViewController UI (the typical iphone send email compose Window).
Is this possible? thanks much in advance.
Setup:
64bit Linux
64bit SUN Jvm 1.6.0_20
Weblogic 10.3
Is it possible to run Weblogic 10.3 in this setup with a maximum heap size of 8gb? We have recived answers from oracle support that states that it might not be possible to address more than 4gb with this setup.
Please submit any official links that support any statements that it is possible to run this setup with more than 4gb of heap size. We can not find any documentation of any limits of heap size when running with this setup.
Thanx
int sampleArray[] = {1,2,3,4,5};
I understand that the sampleArray now points to the first element of the array.
However, what does it mean when I say &sampleArray ? Does it mean I am getting the address of the sampleArray variable? Or does it mean a two dimensional array variable?
So, i can do this:
int (*p)[5] = &sampleArray?
Thanks
Basically I am trying to do the following but I'm stuck.
How do I get data from the addressbook and add them to a tableView. (no pickers)
I'm only interested in people who have an address in their AddressBook card. (so I want to ignore those entries that only have a telephone, IM, phone, etc).
Thank You
I use simplecartjs to make a shopping cart on my website where you can select element and send it to your cart... next step, will be the checkout process, but for business reason, no checkout process will append, and a simple form with name and email and date for order pickup will be ask. Now the order must be send to an email address (at the company) that will fullfill the order.
The question : how to send the content of the cart to an email body or as attachement ?
I want to read MMS data i have seen the part table in the mmssms.db where the mms entries stored i am using cursor to and i want to know the appropriate URI like i am using "content://mms-sms/conversations" and the Column names of "Address"(Sent to), "Text" or "Subject" and "Data" column name of image.
i have seen the schema of mmssms.db and Their Column of part Table.
Thanks in Advance.
There was no endpoint listening at http;//localhost:8080/xdxservice/xdsrepository that could accept the message. This is often caused by an incorrect address or SOAP action.
INTEL X86 Platform.
My programme run start at 2M absolute address in protected mode,everything seems ok, but when i enable interrupt with "sti", the CPU will restart.
Why? is there any necessary initialization before "enbale interrupt"?
i have setup the idtptr, but it seems no work.
Hello,
I'm trying to use formview in order to do insert of a new entity object (called Customer)
Customer has a reference to another entity called Address.
How can I fill both of them in the same formview?
Thanks.
I am looking to access an online database of real estate information (e.g. tax information and sales history for a particular address, lot size, square footage, BPOs, etc.).
Companies such as RealQuest offer reports as a subscription service, but I'm looking to download the raw data, preferably in XML format (I don't want to parse the output since the presentation could change without notice).
Are there any such services available?
Correct me if I am wrong, but it appears that the SyndicationItem.Content is null some times based on the feed address. When it's null, SyndicationItem.Summary seems to have the text of the blog post.
Is this dependent on whether the feed is RSS or Atom? I am trying to get the blog post's text irrespective of what RSS URL the user inputs.
Can someone clarify? Thanks
I need to lookup the Zip Code for a list of addresses (which include the city/state). Is there a master zip code list for download (that is free) or are there any web services that will return the full postage info for an address.
Ie, lookup query: 386 Bread & Cheese Hollow Rd, Northport, NY ==== 386 Bread And Cheese Hollow Rd, Northport, NY 11768
Thanks!
Not used memcpy much but here's my code that doesn't work.
memcpy((PVOID)(enginebase+0x74C9D),(void *)0xEB,2);
(enginebase+0x74C9D) is a pointer location to the address of the bytes that I want to patch.
(void *)0xEB is the op code for the kind of jmp that I want.
Only problem is that this crashes the instant that the line tries to run, I don't know what I'm doing wrong, any incite?
In my application, I ask the user to enter their cell and select their provider. I append the provider's email and create the message and fire via php.mail()
The problem is that no matter what the header info is, the message comes from '1010100001' on some phones (like AT&T and the iPhone). When testing on my Verizon phone, I get the proper email address as the sender.
Any idea how I can send a clearer message?
Simply, I'm just looking to get a list of connected remote disks.
I have a script right now that compares /Volumes/ to "diskutil -list" but that only gives me the name of the remote disks, not the actual address.
Anyone have ideas as to how I might go about doing this?
Thanks in advance.
int[] arrc = new int[] {1, 2, 3};
System.out.println(new ArrayList(Arrays.asList(arrc)));
prints address, but i desire to use toString as in ArrayList.
Is it possible ?
This website (abc.com) slowed access from our original IP address. How do I implement my own proxy server to hide my IP while browsing abc.com? Do I need special hardware/software combo to achieve this?
If I can generate about 5 proxies and alternate amongst those 5 while browsing abc.com would be awesome. Please suggest. Thanks guys!
I have a Windows XP machine with more than one network adapter. When I receive a UDP broadcast package from another machine that does not yet have a valid IP address, howcan I determine which network adapter received this package?
I need to implement a kind on custom DHCP server...
I have a Rails (2.3.5) application where there are many groups, and each Group has_many People. I have a Group edit form where users can create new people. When a new person is created, they are sent an email (the email address is user entered on the form).
This is accomplished with an observer on the Person model. The problem comes when ActionMailer throws an exception - for example if the domain does not exist. Clearly that cannot be weeded out with a validation.
There would seem to be 2 ways to deal with this:
A begin...rescue...end block in the observer around the mailer.
The problem with this is that the only way to pass any feedback to the user would be to set a global variable - as the observer is out of the MVC flow, I can't even set a flash[:error] there.
A rescue_from in the Groups controller.
This works fine, but has 2 problems. Firstly, there is no way to know which person threw the exception (all I can get is the 503 exception, no way to know which person caused the problem). This would be useful information to be able to pass back to the user - at the moment, there is no way for me to let them know which email address is the problem - at the moment, I just have to chuck the lot back at them, and issue an unhelpful message saying that one of them is not correct. Secondly (and to a certain extent this make the first point moot) it seems that it is necessary to call a render in the rescue_from, or it dies with a rather bizarre "can't convert Array into String" error from webbrick, with no stack trace & nothing in the log. Thus, I have to throw it back to the user when I come across the first error and have to stop processing the rest of the emails.
Neither of the solutions are optimal. It would seem that the only way to get Rails to do what I want is option 1, and loathsome global variables. This would also rely on Rails being single threaded.
Can anyone suggest a better solution to this problem?