Hello!
simonn helped me to code an ordered integer partition function here. He posted two functions: one function simply gives back the count of partitions, the second function gives the partitions as a list.
I've already managed to translate the first function from Java to PHP:
Java version
PHP version
Unfortunately, I can't manag...
Hello folks,
I'm trying to build a searchable database of acronyms and their definitions that are specific to a certain industry. It has been years since I've done any real programming, so I'm a little behind the learning curve.
I'm writing the code in PHP, and I'm using MySQL as the database. If this can be done easier in Postgres, ...
How to access the row which has just been inserted into a DB with PHP/MySQL?
I have:
$sql = 'INSERT INTO `jos_db`.`jos_sections` (`id`, `name`) VALUES (NULL, \'foo\')';
mysql_query($sql, $dbi);
bar();
How do I access the new row in bar()?
...
Hi
I've just been looking at php's autoload() function. Seems a nice idea, but I'm not sure how it handles multiple directories. My current development basically has a library directory structure grouping classes into subdirectories by operation. I'm wondering I have to declare a include() for each directory ... which I really hope I ...
I am passing a GUID as a header and a photo as a body to a php file. The GUID is used to authenticate. If it's not valid, I want to end the call and I do this using
die("GUID was expired");
This works fine, but my issue is that the whole photo is uploading before that gets called. This is bad for the user. I want to read the header a...
I've narrowed my problem down somewhat.
When I run "error_log('hey');" from the command line it dumps to STDOUT. But if I run the same code from my web interface (Apache) it puts the error in the error log.
I've checked both ini files, the one Apache is using, and the one in /private/etc (I'm on a Mac running MAMP). Both error_log variab...
So I have an XML file that I am trying to loop through in order, according to the attribute, "order".
Here is an example:
<page>
<talentTrees>
<tree name="Football" order="2">
<tree name="Baseball" order="0">
<tree name="Frisbee" order="1">
</talentTrees>
</page>
My goal is to loop through each "tree" using foreach, but I want to rea...
I'm new to PHP so I apologize if this is a simple problem...
I am moving a PHP site from one server to another. The new server is IIS 7.0, PHP 5.2.1, with short open tag turned "On", and I don't know how the original server was set-up (I was just given the code).
The following is the very first section of code on one of the pages:
<?...
I am building a self-service group management web-app that will allow users to create and manage groups in our Active Directory under a particular OU.
I have successfully written a PHP application that accomplishes most of this by binding as an admin user and creating new group objects in the appropriate OU, then adding and removing 'm...
i'm builing this php script which displays a given folder 's children folders and files. Files ought to be downloaded.
In order to disclose as little information as possible, each item in the directory is a form with a submit button that contains the html markup. The send method is POST.
IF i click on a directory, it opens that directo...
Multi Part Question:
I am developing a php app that I plan to sell and distribute. I want to control who has access to the apps main functions and installation though some sort of call to my server, which would check to see if the script's install location (example.com) is in a database, maybe even check for a license key of some sort.
...
I am running php 5.2.6 with apache 2.
On my localhost, some pages keep loading forever with Firefox.
Konqueror works fine.
From another computer using Firefox works as well.
I looked at the network with ethereal and 200 ok is send and no more data is transiting.
any ideas ?
Thanks
...
Hi!
I'm building an application in the iPhone where the communication with a PHP server is needed (using XML).
I'm able to receive data from the server and I handle the xml file using the NSXML parser.
I haven't found too much documentation about sending data from the iPhone to the server (via XML).
Any idea, links, and examples w...
how do i pass php array's to ruby script as an argument so that ruby script can read php's array. ?
...
I have a page that will basically be used to concatenate a bunch of xml files, it will act as glue that binds them together. There's a small chance the xml files that are being combined might not be well formed because the user will have access.
I'm trying to basically rewrite a live file if there are no warnings / errors thrown in a sp...
I have a custom built application framework written in PHP which I have been tasked to optimize. This framework is a shared codebase which loads MVC "modules" to provide various functionality. Each module is a directory containing multiple PHP classes for controllers and models and PHP files for views.
The entire framework loads for alm...
I am mulling over whether I should place metadata in an XML file, then creating an object that automates validation. The reasoning behind this is, adding or removing validation for user input would be a matter updating an XML file.
I was curious what the opinions of others were on the usefulness of automating field validation in PHP.
I...
so i have ruby script that simply writes to a test.txt file with "hello"
i have a php script that executes this ruby script, when a user clicks a link.
i find that test.txt is empty.
however when i run by itself
$> ruby sayhi.rb
test.txt is filled with "hello"
...
i have a large php array encoded to JSON, and passing it to a ruby script.
however, it keeps throwing JSON::ParserError.... it is confused by the numerous doublequotes and singlequotes in the array.
i ahve tried
escapeshellarg, escapeshellcmd ..... these are not working.
...
By default a CCK form creation has a title of the form
Create [Your Content Type Name Here]
I want to change mine to
Register for Such and Such
It was suggested that I could use string-override, but I can't find the string to replace. I've also tried writing code to form_alter, but can't seem to figure out how to get the "title" ...