PHP regexp to match a URL
June 18th, 2009http://snipplr.com/view/2371/regex-regular-expression-to-match-a-url/
$url = preg_replace(’@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@’, ‘$1‘, $url);
http://snipplr.com/view/2371/regex-regular-expression-to-match-a-url/
$url = preg_replace(’@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@’, ‘$1‘, $url);
The way this works depends on the server having the drivers for the printer on the machine you are rdp-ing too.
When connecting via rd make sure the Printers tick box is ticked in the local resources tab of your remote desktop settings (for that particular account)
Connect via rd and your printer should appear in Printers and Faxes.
I have had a case of this now where the printer does not connect (I believe after installing a new printer on the remote network). I remote desktop-ed into the server and added a new (dummy) printer of the type I needed to print from on my local machine. After doing this the drivers appeared to be reloaded and I then had two printers - the one I had manually added and now the session based printer I actually wanted to print too. I deleted the manually added printer and it’s been fine since.
rpm -qa | grep firefox
(searching for firefox for example)
SELECT * FROM `role_capabilities` WHERE `roleid` = 7 and capability LIKE ‘%forum%’ ORDER BY `role_capabilities`.`capability` ASC
find / -type f -size +50000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’
UPDATE resource SET alltext = replace(alltext,””,”"), name=replace(name,””,”"), summary=replace(summary,””,”")
UPDATE assignment SET description = replace(description,””,”")
UPDATE block_search_documents SET title = replace(title,””,”")
UPDATE cache_text SET formattedtext = replace(formattedtext,””,”")
UPDATE course_sections SET summary = replace(summary,””,”")
UPDATE event SET description = replace(description,””,”")
UPDATE forum SET intro = replace(intro,””,”")
UPDATE forum_posts SET message = replace(message,””,”")
UPDATE glossary_comments SET entrycomment = replace(entrycomment,””,”")
UPDATE glossary_entries SET definition = replace(definition,””,”")
UPDATE label SET name = replace(name,””,”"), content = replace(content,””,”")
UPDATE lesson_pages SET contents = replace(contents,””,”")
UPDATE message SET message = replace(message,””,”")
UPDATE message_read SET message = replace(message,””,”")
UPDATE question SET questiontext = replace(questiontext,””,”"), generalfeedback = replace(generalfeedback,””,”")
UPDATE question_answers SET feedback = replace(feedback,””,”")
UPDATE quiz_feedback SET feedbacktext = replace(feedbacktext,””,”")
TAGS - moodle - strange characters - search and replace
Try these:
post_max_size = 16M
upload_max_filesize = 16M
memory_limit = 16M
(memory_limit only affects this if you have configured
php with –enable-memory-limit)
vi /etc/php.ini
if ($string1 eq $string2) { # equal too
print”\$string1 is equal to \$string2\n”;
} elsif ($string1 lt $string2) { # less than
print”\$string1 is less than \$string2\n”;
} elsif ($string1 gt $string2) { # greater than
print”\$string1 is greater than \$string2\n”;
}
if ($string1 ne $string2) { # not equal too
print “\$string1 is not equal to \$string2\n”;
}