Search found 198 matches

by chris
Tue Feb 19, 2013 8:46 pm
Forum: MySQL
Topic: What does /*!40001 SQL_NO_CACHE */ * means
Replies: 1
Views: 25326

Re: What does /*!40001 SQL_NO_CACHE */ * means

This query is almost certainly due to a mysql dump being run on the database. Those are the style of queries it submits to extract the data for the dump. Check for the time when it happens, it might be a backup that is running. # Time: 130219 18:11:35 # User@Host: user[host] @ localhost [] # Query_t...
by chris
Wed Feb 13, 2013 8:10 pm
Forum: General
Topic: Resize script for gimp
Replies: 3
Views: 29506

Re: Resize script for gimp

Some people had problems with GIMP 2.6. So here is the updated version: (define (gimp_test_resize pattern img-width dir prefix) (let* ((filelist (cadr (file-glob pattern 1)))) ;Get list of files (while (not (null? filelist)) (let* ((filename (car filelist)) (new_filename (string-append dir prefix fi...
by chris
Thu Jan 31, 2013 7:04 pm
Forum: General
Topic: Test websites Windows 8with modern.ie
Replies: 0
Views: 63974

Test websites Windows 8with modern.ie

Microsoft has launched a new tool
that test you site for common problems.

Most importantly it check for compatibility issues with Internet Explorer 9 and 10 (and windows 8)

http://www.modern.ie
by chris
Mon Jan 07, 2013 9:14 pm
Forum: HTML
Topic: Difference between DIV-tag and SPAN-tag
Replies: 1
Views: 24010

Re: Difference between DIV-tag and SPAN-tag

<DIV> is more like a paragraph and <SPAN> is not. The DIV element gives you the chance to define the style of whole sections of the HTML. You can define a division of your page as a call out and give that area a different style from the surrounding text. Because the CENTER element has been deprecate...
by chris
Sun Jan 06, 2013 1:52 pm
Forum: MySQL
Topic: Solved: mysqldump: Got errno 28 on write
Replies: 2
Views: 28914

Re: mysqldump: Got errno 28 on write

Basically it means you run out of disk-space.

Liberate some space and try again.
by chris
Tue Nov 13, 2012 8:26 pm
Forum: PHP
Topic: PHP Warning: preg_match(): Compilation failed: missing ) at
Replies: 5
Views: 31999

Re: PHP Warning: preg_match(): Compilation failed: missing

If you still have problems even with

Code: Select all

$pattern="/\b".preg_quote($c_line[1])."\b/i";
Try
$pattern="/\b".preg_quote($c_line[1],'/')."\b/i";
It should escape any 'bad' character.
by chris
Mon Nov 05, 2012 8:39 pm
Forum: SQL
Topic: How to get the id inserted by Auto increment
Replies: 2
Views: 24241

Re: How to get the id inserted by Auto increment

I have good results with mysql_query("INSERT INTO table (product,date_1) values ('item','$today')"); $lastid=mysql_insert_id(); Basically it gets the id generated from the previous insert. If it doesn't work, You can try to get it from table status: $result=mysql_query("SHOW TABLE STA...
by chris
Fri Sep 28, 2012 12:44 pm
Forum: PHP
Topic: Solved: Regular expression for url
Replies: 3
Views: 25150

Re: Regular expression for url

On this site you get a good overview of several patterns,
with there pro's and con's:
http://mathiasbynens.be/demo/url-regex
by chris
Fri Sep 28, 2012 12:00 pm
Forum: PHP
Topic: Solved: Regular expression for url
Replies: 3
Views: 25150

Re: Regular expression for url

I find the following pattern works well for me "@((https?://|ftp://)([-\w\.]+)+(:\d+)?(/([\w/_\.\-\+\~\=\:]*(\?\S+)?)?)?)@" $pattern=array("@((https?://|ftp://)([-\w\.]+)+(:\d+)?(/([\w/_\.\-\+\~\=\:]*(\?\S+)?)?)?)@"); $replace=array("[Somtehing]\\1"); $str=preg_replace(...
by chris
Wed Sep 26, 2012 7:34 pm
Forum: PHP
Topic: php convert text date
Replies: 1
Views: 21096

Re: php convert text date

strtotime() does its job well, but it need to be in the correct order. day month year Use a function to switch the dates: function switch_date($str) { //split string $arr=explode(' ',$str); //put in correct order $new_str=$arr[2].$arr[1].$arr[0].$arr[3]; return date('Y-m-d', strtotime($new_str)); }