PHP Work out colour saturation
Hi there, lets say i have the following RGB values: R:129 G:98 B:87 Photoshop says the saturation of that colour is 33% How would i work out that percentage using PHP and the RGB values? ...
Hi there, lets say i have the following RGB values: R:129 G:98 B:87 Photoshop says the saturation of that colour is 33% How would i work out that percentage using PHP and the RGB values? ...
Hi, ive searched everywhere and cannot find how to post data using vb.net So i was wondering if someone can convert this curl code I made into vb.net :) $useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_...
All, I am working on a Zend Framework based web application. We keep encountering out of memory errors on our dev server: Allowed memory size of XXXX bytes exhausted (tried YYYY... We keep increasing memory_limit in php.ini, but it is now up over 1000 megs. What is a normal memory_limit value? What are the usual suspects in php/Ze...
I am currently working on a PHP application that puts me in the desperate need of all the Countries, States and Cities in the world. In the application, when you select a Country from the drop down menu, it loads up all the States in the selected Country into another drop down menu. When you then select a State from the newly generated ...
my pages ref this line require_once(LIBDIR."client.php"); where and how do I define the LIBDIR variable? thanks ...
Is there an Eclipse plug-in that will allow me to graphically generate a data model, and produce from it a MySQL Database Script for generation of that database, and generate PHP code for simple add/change/delete methods? This way I can focus on programming the business logic, instead of fussing with the details of the SQL code. ...
Hi, I'm trying to write a wrapper around Image_Graph bar charts. I actually wrote the whole thing but in the end didn't work, so now I'm back to the basics. This code below is taken directly from the ImageGraph website as a bar chart example. I just wrapped it in a function (where $data is ignored for now). This function works fine if ...
I want to build a website that allows user sign in with Openid, especially Google account. I wanna use Google Federated Login with Hybrid protocol. I found that link: http://code.google.com/intl/vi-VN/apis/accounts/docs/OpenID.html But I didnt find any link to download the source code. Anybody can help me? Thank you so much. P/S: I only ...
Right, so I've got a query that looks like this: $bestof_query = "SELECT * FROM physicians p JOIN (awards a, categories c, awardLevels l) ON (a.id = p.id AND c.id = a.category AND l.id = a.level) ORDER BY a.category, a.level ASC "; $query = mysql_query($bestof_query); while($result = mysql_fetch_array($query)) { extract($result); ech...
if i have a date such as 10/10/10 how do i display (in date format) 2 weeks after that? i think it has to do with strtotime but i dont know how to write it. im looking at the php.net site and cant figure it out.thnx ...
I've been adding CMS functionality to a site using modx Evolution 1.0.2. I've been doing this on my local dev server (MAMP) and recently put up a copy of the site on a shared host (Bluehost) and everything seems to be working fine except that new users cannot login (wrong username/password combination). Users that were created on my loca...
I have the following function from the php.net site to determine the # of bytes in an ASCII and UTF-8 string: <?php /** * Count the number of bytes of a given string. * Input string is expected to be ASCII or UTF-8 encoded. * Warning: the function doesn't return the number of chars * in the string, but the number of bytes. * ...
SELECT airline, airports.icao_code, continent, country, province, city, website FROM airlines FULL OUTER JOIN airports ON airlines.iaco_code = airports.iaco_code FULL OUTER JOIN cities ON airports.city_id = cities.city_id FULL OUTER JOIN provinces ON cities.province_id = provinces.province_id FULL OUTER JOIN countries ON cities.countr...
Hi Ok dealing with Partial Loops I want to do several things Perhaps pass in extra variables - seen it done like this echo $this->partialLoop('Loop.phtml', array('data' => $data, 'var1' => foo)); But this does not seem to work - I can not extra the data using $this->var $this->data->var or $data->var not sure how to access the data ...
I am developing a website and the images from the websites should come from different server. It is good point that the images are in the different server but the server were the images are coming is too slow. Is there a way that I can cache the images coming from different server to my site. specially creating a physical images in my se...
I have just installed centos, apache and php when I visit my site http://domain.com/myapp/, it says "forbidden" by default its not loading the index.php file. When I visit http://domain.com/myapp/index.php, it works fine. Any idea how to fix that issue ? ...
Anybody know how to get around this with wampserver2? I'm trying to use this thumbnail generator http://phpthumb.gxdlabs.com/ ...
I'm trying to use this php thumbnail generator http://phpthumb.gxdlabs.com/ and i keep getting the error below. Warning: imagejpeg() [function.imagejpeg]: Unable to open 'Images/uploaded/thumbnails/' for writing: No such file or directory in D:\Data\Websites\wamp\www\StephsSite\PHP\phpThumb\GdThumb.inc.php on line 672 Here's my script ...
I need to store the current time as long integer into a database table, there are maybe better ways to store date/time in database, but here long integer is the requirement. In PHP, I can get the current time in integer with time(), in Java, is there any function or simple code that do the same trick? Thank you ...
function fullJoinTest() { $con = ModelBase::getConnection(); $sql = "SELECT airline, airport FROM airlines LEFT JOIN airports on airlines.icao_code = airports.icao_code"; $query = $con->prepare($sql) or die("Error preparing sql in Search (test) "); $query->execute() or die("Error executing query i...