Hi everyone,
Is it possible to backup an entire eclipse PDT project (or parts of it), so that it can be restored to that state later?
Ideally this would only save changes from the last backup to save space. If it makes any difference I have Mylyn installed (Maybe you could backup the current task context?) and am using CodeIgniter.
Th...
I have comments enabled on my site and I require users to enter at least 30 characters to publish their comments (Just to get some value because they usualy just submitted "I like it")
But some users now use simple technique to overcome this and enter e.g.:
"I like it. asdsdf dfdsfsdf tt erretrt re"
As you can see the rest of the text...
I am making an image morphing function, however I am encountering problems. I have an unexpected T_STRING at the commented line, which I'm sure is an embarrassingly simple error...
What's wrong? How can I avoid this in the future? Thanks.
function morph($img) {
$tempImg = $img;
$size = getimagesize($tempImg);
$width = $size[0...
I asked this question yesterday: http://stackoverflow.com/questions/3495735/compare-array-of-words-to-a-textarea-input-with-javascript
Now I want to do the same thing with php...
Is there any easy code for this?
Thanks
UPDATE: I would like to test the textarea input against the array, and if match of bad words found, die();
Thanks
...
Hi guys..
I was using curl from shell scripts and was setting -s option
curl -s , to make to make it silent..
please tell how to set this option in php curl..
Thanks
...
Within a Cake application, if a user is submitting a form to edit a record, what do you think would be the best way to outline the specific changes made? I would like to display the values to all of the fields that the user is changing and offer them the option to either confirm the changes or go back and change them. I assume that it wi...
I am working on this PHP project and I have many places that an md5 is being used. I have even used it many times, but still today I am unclear on what the function is doing. I realize it decrypts the value passed in but what about undoing it to get it back to the original. Maybe i am not clear about the whole process and if anyone has i...
Hi!
I want to receive the JSON Response from (Facebook) https://graph.facebook.com for further processing in PHP.
How can I access the JSON
...
Hello,
From the middle of a script I've been able to isolate a (very sudden) issue with querying some data from MySQL using PHP. Using the same connection within the same API in the past, I have been able to do numerous (millions of) individual INSERT queries in the past. Also, I've been able to return and manipulate large SELECT resu...
In a lot of my PHP classes, I have this code:
private $strError = "";
private $intErrorCode = NULL;
private $blnError = FALSE;
public function isError() {
return $this->blnError;
}
public function getErrorCode() {
return $this->intErrorCode;
}
private function setError( $strError, $intErrorCode = NULL ) {
$this->blnError...
I have an encryption/decryption algorithm written in C# - I need to be able to produce the same encryption in PHP so I can send the encrypted text over HTTP to be decrypted on the C# side.
Here is the C# code for the encryption.
this.m_plainText = string.Empty;
this.m_passPhrase = "passpharse";
this.m_saltValue = "saltvalue";
this.m_has...
With Symfony 1.4's Forms, how can I throw a sfValidatorError in the post validator of an embedded form?
My parent form calls the following:
public function configure(){
$this->embedForm('page', $pageLinkForm);
}
And my embedded form:
public function configure(){
$this->validatorSchema->setPostValidator(new sfValidatorCallbac...
I am looking to make my web app adjust itself depentent on the mysql serves load. To do this I am using this query.
SELECT (COUNT(*)-1) P.QUERYCOUNT, SUM(P.TIME) QUERYTIME
FROM information_schema.PROCESSLIST P
WHERE P.COMMAND = 'Query'
However it does not make much sense for all the active sessions to run this query incrementally. Ins...
I have an array, $scans. I want to query MySQL with all the values in that array and get my results back in an array. For example, sample data in scans would be:
E1234
E2244
E3654
The MYSQL table PARTS has fields part, size, length, plate, side, type.
I want to end up with $output["E1234"][0] to be the size result for that part, 1 t...
Hi Guys,
I will first tell you my scenario, in my problem there are two users of the system one who is using the system to register people to it, and another person who use the system to check the registered users in the system.
this is a hospital scenario, people register at the registration desk and in the registration order doctor c...
I'm very new to php and I'm looking to build a community website. It should have support for user profiles, messaging, user photo gallery, authentication and profile comments. I've looked around and narrowed my options:
1-use a social networking package like elgg
2-use a php framework like cakePHP and add required functionality
3-start ...
This tests a textarea input agains bad words...
$bad_words = array('bad', 'words')
foreach( $bad_words as $bad ){
if( stristr($posted, $bad) !== FALSE )
{
$contains_bad_words = TRUE;
}
}
Now is there any way to make this match 'bad', 'BAD', 'Bad', 'BaD' etc without having to write it into the array in all different cases (La...
I'm using Netbeans 6.9.1 and php code completion hints don't see the new code I modified, it only refresh at restart.
For example if I add a constant to a class, it don't appear in the code completion, but if I restart nb, then it appears.
Any fix or way to avoid this?
...
Hello,
We have a wiki that was designed by a 3rd party developer. The problem we have had is that users' who have been made "inactive" still show up in searches. The work around to stop user from being seen is removing properties associated with that user.
To access the user properties, we would make a call to api passing a url encoded...
I'm writing a quiz program using PHP and a bit of Javascript. The questions can be answered correctly when IE or Chrome is used but Firefox refreshes the page and increments the session variable.
Here's a code snippet:
if(isset($_GET['answer1']))
{
if($_GET['answer'] == $_GET['answer1'])
{
include 'config.php';
...