// jQuery
$(document).ready(function() {
// code
})
<!DOCTYPE html> | |
<html<?php print $html_attributes; ?>> | |
<head> | |
<?php print $head; ?> | |
<title><?php print $head_title; ?></title> | |
<?php print $styles; ?> | |
<?php print $head_scripts; ?> | |
</head> | |
<body<?php print $body_attributes;?>> |
git config --global user.name "name" | |
git config --global user.email "email" | |
#---------------------- aliases -------------------- | |
git config --global alias.st status | |
git config --global alias.ci commit | |
git config --global alias.di diff | |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.lol log --pretty=oneline --abbrev-commit --graph --decorate |
<?php | |
// Machine name for our custom node | |
define('NODE_NAME', 'the_node_machine_name'); | |
// Machine name for our custom taxonomy | |
define('TAXONOMY_NAME', 'the_taxonomy_machine_name'); | |
function module_install() { | |
_create_taxonomy(); | |
_create_content_type(); | |
} |
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array
it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array
part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't:
dependencies[] = ctools | |
; Views Handlers | |
files[] = views/mymodule_handler_handlername.inc |
server { | |
server_name [host]; | |
root /var/www/[document_root]; ## <-- Your only path reference. | |
# Enable compression, this will help if you have for instance advagg module | |
# by serving Gzip versions of the files. | |
gzip_static on; | |
location = /favicon.ico { |
IMPORTANT | |
Please duplicate this radar for a Safari fix! | |
This will clean up a 50-line workaround. | |
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072) | |
////////////////////////////////////////////////////////////////////////////// | |
(Now available as a standalone repo.) |
/* | |
* jQuery Double Tap | |
* Developer: Sergey Margaritov (github.com/attenzione) | |
* License: MIT | |
* Date: 22.10.2013 | |
* Based on jquery documentation http://learn.jquery.com/events/event-extensions/ | |
*/ | |
(function($){ |