Jump to content

sastro

Members
  • Posts

    99
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sastro's Achievements

Member

Member (2/5)

0

Reputation

  1. Here is my code <script type="text/javascript"> function resize(id,va) { document.getElementById(id).width = va ; } </script> <img src="https://www.google.com/logos/classicplus.png" id="img" height="100%"> <script type="text/javascript">resize('img','50%');</script> Its not working to resize the image with % but worked without %. I need to resize image width with persentage. Please help
  2. So, in my case i should use mysql db1,db2,db3,db4 < 4backup.sql or mysql db1 db2 db3 db4 < 4backup.sql I just need to make sure because its need about 10 hours to restore 4backup.sql and knows its result
  3. Hi, I just backup 4 databases (db1,db2,db3,db4) with : mysqldump -uroot -ppassword --databases db1 db2 db3 db4 > 4backup.sql I can not restore via phpMyAdmin because file 4backup.sql about 33 gigabyte large. how to use mysql command to restore it? Thanks in advance
  4. Thank you, thank you and thank you. Works like a charm.. You're the best... I can't found the solved button
  5. Hi, I need help with preg_replace all chars after last " - " . exp. string. my lovely wife - wake up Check Google ban tool - Check adsense ban tool - new tool Need result like this my lovely wife Check Google ban tool - Check adsense ban tool Thanks in advanced
  6. Wrong question... Sory, it my false.
  7. here the script <?php $a='dir/5_cat/big-dog.html dir/0_cat/wild-dog.html dir/1_cat/expensive-dog.html dir/3_cat/expensive-cat.html'; $b='dir/1_cat/expensive-dog.html'; $th=str_replace(array('.','/'),array('\.','\/'),$b); if(preg_match('/'.$th.'/',$a)){ echo 'found'; }else{ echo 'not found'; } ?> It works if $b='dir/1_cat/expensive-dog.html'; but result still found with $b='dir/1_cat/expensive-dog.htm'; Please help
  8. I just removed [mysqld_safe] and it works.
  9. I found that Query cache is disabled from mysqltuner.pl -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.1.50 [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 1G (Tables: 20) [OK] Total fragmented tables: 0 -------- Performance Metrics ------------------------------------------------- [--] Up for: 15s (10 q [0.667 qps], 7 conn, TX: 7K, RX: 633) [--] Reads / Writes: 100% / 0% [--] Total buffers: 24.0M global + 2.7M per thread (151 max threads) [OK] Maximum possible memory usage: 439.2M (17% of installed RAM) [OK] Slow queries: 0% (0/10) [OK] Highest usage of available connections: 0% (1/151) [!!] Key buffer size / total MyISAM indexes: 8.0M/572.8M [!!] Query cache is disabled [OK] Temporary tables created on disk: 0% (0 on disk / 2 total) [!!] Thread cache is disabled [OK] Table cache hit rate: 53% (8 open / 15 opened) [OK] Open file limit used: 1% (16/1K) [OK] Table locks acquired immediately: 100% (18 immediate / 18 locks) [!!] Connections aborted: 14% -------- Recommendations ----------------------------------------------------- General recommendations: MySQL started within last 24 hours - recommendations may be inaccurate Enable the slow query log to troubleshoot bad queries Set thread_cache_size to 4 as a starting value Your applications are not closing MySQL connections properly Variables to adjust: key_buffer_size (> 572.8M) query_cache_size (>= 8M) thread_cache_size (start at 4) Here my my.conf [mysqld] skip-innodb datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql old_passwords=1 [mysqld_safe] key_buffer_size = 570M query_cache_type=1 query_cache_size = 8M query_cache_limit=1048576 thread_cache_size = 4 table_cache = 128 log-error=/var/log/mysql/mysql_error.log log-slow-queries = /var/log/mysql/mysql-slow.log long_query_time = 5 pid-file=/var/run/mysqld/mysqld.pid max_connections=50 MySQL server version 5.1.50 Please help
  10. <?php $url = 'http://www.example.com'; print_r(get_headers($url)); print_r(get_headers($url, 1)); ?>
  11. Try this <?php $destination='aircraft/'.$reg."1.jpg"; $temp_file = $_FILES['image']['tmp_name']; move_uploaded_file($temp_file,$destination); imgresize($destination); $destination2='aircraft/'.$reg."2.jpg"; $temp_file2 = $_FILES['image2']['tmp_name']; move_uploaded_file($temp_file2,$destination2); imgresize($destination); $destination3='aircraft/'.$reg."3.jpg"; $temp_file3 = $_FILES['image3']['tmp_name']; move_uploaded_file($temp_file3,$destination3); imgresize($destination); function imgresize($filename) { $source = imagecreatefromjpeg($filename);; $fullpath = $filename; list($width, $height) = getimagesize($filename); $thumb = imagecreatetruecolor($newwidth, $newheight); imagecopyresampled($thumb,$source,0,0,0,0,200, 133,$width,$height); imagejpeg($thumb, 'images/thumbs/'.basename($filename), 100); } ?>
  12. Need more explain about the result should be
  13. Thanks for reply. Found the solution <script language="Javascript"> var n=""; var x=0; var de=0; for(i=0;i<20;i++){ n=n+'-'+i; x=x+1; if(x==5){ de=de+1000; j=n+' - '; setTimeout(function (x){return function(){alert(x)};}(j),de); x=0; n=""; } } </script>
×
×
  • 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.