This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Define google url shortener api | |
*/ | |
define("API_URL", "https://www.googleapis.com/urlshortener/v1/url?key="); | |
class GoogleURL | |
{ | |
/** | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jCarousel - Riding carousels with jQuery | |
* http://sorgalla.com/jcarousel/ | |
* | |
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) | |
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) | |
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. | |
* | |
* Built on top of the jQuery library | |
* http://jquery.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Piggy · CodePen</title> | |
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/normalize.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Adds a view to the post being viewed | |
* | |
* Finds the current views of a post and adds one to it by updating | |
* the postmeta. The meta key used is "tpost_views". | |
* | |
* @global object $post The post object | |
* @global WP_Query $wpdb | |
* @return integer $new_views The number of views the post has |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$rg = "/[0-9]{3}/"; | |
preg_match($rg, '208') //true | |
preg_match($rg, '2098') //false | |
preg_match($rg, 234) //false | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- QUESTION 1 | |
SELECT | |
customer.name, | |
customer.address, | |
software.name, | |
softwares_ordering.quantity | |
FROM | |
customer, software, softwares_ordering | |
WHERE (customer.id_customer = softwares_ordering.id_customer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
Options -MultiViews | |
RewriteEngine On | |
RewriteRule (wordpress/.*) $1 [L] | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.php [L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tutorial | |
======== | |
1. http://mobile.smashingmagazine.com/2013/04/03/build-fast-loading-mobile-website/ | |
2. http://moz.com/blog/15-tips-to-speed-up-your-website | |
3. http://www.aleydasolis.com/en/mobile-web-seo-tools/ | |
4. http://www.netmagazine.com/features/speeding-mobile-html5-experiences | |
5. http://www.socialmediaexaminer.com/5-simple-steps-to-getting-started-with-mobile-marketing/ | |
6. http://stackoverflow.com/questions/9511526/auto-mobile-site-redirect | |
7. http://mobile.smashingmagazine.com/2013/08/12/creating-high-performance-mobile-websites/ | |
8. http://css-tricks.com/which-responsive-images-solution-should-you-use/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('comment_form_default_fields', 'url_filtered'); | |
function url_filtered($fields) | |
{ | |
if(isset($fields['url'])) | |
unset($fields['url']); | |
if(isset($fields['email'])) | |
unset($fields['email']); | |
return $fields; | |
} |
OlderNewer