Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Everything posted by dreamwest

  1. So i read on a blog google converts an image to base64 string to avoid copywrite. Is this true? Even though it still looks like the original ..... its well - text.
  2. I have a few prices and need to find the median of them, the problem is there is sometimes one really high price that distorts the median. Is there a way to normalize the figures? Example numbers 76 87 95 78 104 1098 Normally i would do it this way but it gives a distorted view of the median number $lowest = 76; $highest = 1098; $mid = (($lowest - highest) / 2) + $lowest; // echos 511
  3. Its a "rollscanhardly" .... Rolls down the hill, can hardly get back up
  4. Ill spend extra 20% of my time including extra stuff just for ie ...
  5. Most of my friends are married and in the same boat. They tell me "why did i get married?" and i laugh like a hyena .... sorry like a hyena on weed. Seems like the only one thats happy has married an asian chick 20+years his junior - aint it great
  6. Trying to get the percentage of rent for a property in php. Im completely lost .... <?php $purchase = 44000; $rent = 9860; $percent = $purchase * $rent; //this is wrong, it returns 4.3 but should be over 18 echo "Percentage is {$percent}%"; ?>
  7. Yep already did it, just added the extra key and merged it with the original array
  8. Simple array_replace() but it throwing an error, can anyone see what ive done wrong? while($row2 = mysql_fetch_assoc( $res2 )){ $title2 = "replace desc"; //$row2 prints array( l_desc => title ) $row2 = array_replace($row2, array('l_desc' => $title2)); print_r($row2); $show[] = $row2; }//end while Fatal error: Call to undefined function array_replace() in ..... Im using PHP 5+
  9. haha one of my friends said it was when all the worlds information is floating around in the air up amongst the clouds - i laughed sooo damn hard http://en.wikipedia.org/wiki/Cloud_computing
  10. Thanks. I used a id instead. <form name='x'> <input type="radio" name="type" value='1' id='T1' /> Renovation <br> <input type="radio" name="type" value='2' id='T2' /> Buy and hold (Rental)<br> <input type="radio" name="type" value='3' id='T3' /> Development <br> <br /> <input type='button' onclick="if(!document.getElementById('T1').checked && !document.getElementById('T2').checked && !document.getElementById('T3').checked) { alert('Select a Property Type'); } else { alert('ok'); }" value='Continue &#187;' /> </form>
  11. I want to check if a radio button has been selected, but the following doesnt work. <form name='x'> <input type="radio" name="type" value='1' /> Renovation <br> <input type="radio" name="type" value='2' /> Buy and hold (Rental)<br> <input type="radio" name="type" value='3' /> Development <br> <br /> <input type='button' onclick="if(document.x.type.checked == false) { alert('Select a Property Type'); } else { alert('Checked'); }" value='Continue &#187;' /> </form>
  12. Has anyone had any experience with elastic search, it supposed to be super powerful compared to cassandra and Solandra http://www.elasticsearch.org/ http://stackoverflow.com/questions/3486140/massive-database-w-fulltext-search-sphinx-lucene-cassandra-mongodb-couchd
  13. $q = urlencode("hollywood cal"); $data = @file_get_contents("http://www.google.com/ig/api?weather={$q}"); $n_data = @new SimpleXmlElement($data, LIBXML_NOCDATA); if($n_data){ $show_img2 = "http://www.google.com{$n_data->weather->current_conditions->icon->attributes()->data}"; $show .= "<div style='float:left;padding:10px;border-right:1px solid grey;width:180px'> <h3>{$n_data->weather->forecast_information->city->attributes()->data} weather</h3><br> <div style='float:left;padding:10px;'> <img title='{$n_data->weather->current_conditions->condition->attributes()->data}' src='{$show_img2}'><br> </div> {$n_data->weather->current_conditions->temp_f->attributes()->data} F | {$n_data->weather->current_conditions->temp_c->attributes()->data} C<br> <nobr>{$n_data->weather->current_conditions->humidity->attributes()->data}</nobr><br> <nobr>{$n_data->weather->current_conditions->wind_condition->attributes()->data}</nobr> </div>"; if(!$n_data->weather->current_conditions->icon->attributes()->data){ $show = ''; } foreach ($n_data->weather->forecast_conditions as $md) { $show_img = "http://www.google.com{$md->icon->attributes()->data}"; $show .= "<div style='float:left;padding:10px'>{$md->day_of_week->attributes()->data}<br> <img title='{$md->condition->attributes()->data}' src='{$show_img}'><br> <span title='Low' style='color:grey;'>{$md->low->attributes()->data}</span> <span title='High'>{$md->high->attributes()->data}</span> </div>"; }//end foreach echo "<div style='padding:10px;min-height:100px'>{$show}</div>"; }//end if array
  14. Asians!!! Thats all a real man needs, a good cleaner and cook
  15. dreamwest

    one ..

    one builds a database ... one tracks the searches with ips ... one makes a search with chrome ... one finds google bot is making the exact search a few minuets later ... one assumes chrome browsers are sending all form input straight to googlebot for indexing ... one ...
  16. Better off making youtube videos, even the ones only getting ~10,000 views are getting full time income
  17. RewriteRule ^articles/([a-zA-Z0-9_-]+)$ articles/article.php?slug=$1 [L,QSA,NC]
  18. I did it, finally i beat chess titans on level 2!! After only 118 loses Damn thing is MEAN!
  19. change the value inside stuff() to your query
  20. Up to you, they both post to the same place
  21. Yes you just send the value though Http Request <input type='checkbox' onclick='stuff(100);' />, and have a div as the callback, in php just echo the result back. function init() { if (window.XMLHttpRequest){ return new XMLHttpRequest(); }else if(window.ActiveXObject){ return new ActiveXObject("Microsoft.XMLHTTP"); }else{ document.getElementById('err').innerHTML = "Your browser seems to be out of date, Please update!"; return; } }//end init function stuff(amount){ var req = init(); req.open("GET", "url.php?id="+amount, true); req.onreadystatechange = function() { if (req.readyState == 4) { if (req.status == 200) { document.getElementById('callback_div').innerHTML = req.responseText; } } }; req.send(); }//end related <span id='callback_div'></span>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.