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
| /** | |
| * Return the pair numbers of a list given, positive or negative ones. | |
| */ | |
| function pair(list) { | |
| var val = 0; | |
| var tmp = []; | |
| for (i=0; i<list.length; i++) { | |
| val = list[i]; | |
| for (j=0; j<list.length; j++) { |
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 | |
| class SoapClient extends \SoapClient { | |
| function __doRequest($request, $location, $action, $version, $one_way = null) { | |
| $headers = array( | |
| 'Method: POST', | |
| 'Connection: Close', | |
| 'User-Agent: PHP Soap Client', |
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 | |
| // text | |
| $fieldset->addField('title', 'text', array( | |
| 'label' => Mage::helper('form')->__('Title3'), | |
| 'class' => 'required-entry', | |
| 'required' => true, | |
| 'name' => 'title', | |
| 'onclick' => "alert('on click');", | |
| 'onchange' => "alert('on change');", |
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
| Name Character Entity | |
| Copyright © © | |
| Registered ® ® | |
| Trademark ™ ™ | |
| Curly Open Double Quote “ “ | |
| Curly Closed Double Quote ” ” | |
| Curly Open Single Quote ‘ ‘ | |
| Curly Closed Single Quote ’ ’ | |
| Big Bullet/Dot • • |
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 | |
| function hook_transliterate($string) { | |
| $string = str_replace("á", "á", $string); | |
| $string = str_replace("é", "é", $string); | |
| $string = str_replace("í", "í", $string); | |
| $string = str_replace("ó", "ó", $string); | |
| $string = str_replace("ú", "ú", $string); | |
| $string = str_replace("ñ", "ñ", $string); | |
| $string = str_replace("ä", "a", $string); | |
| $string = str_replace("ë", "e", $string); |
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 | |
| /** | |
| * Adding this script to functions.php | |
| */ | |
| add_filter( 'wp', 'disable_plugin_assets' ); | |
| function disable_plugin_assets(){ | |
| if(strpos($_SERVER['REQUEST_URI'], '/page-slug/') === FALSE) { | |
| //Disable facturacom plugin's assets | |
| //Javascript |
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 | |
| //Para visualizar el documento en el navegador, agregamos este header. | |
| header("Content-Type: text/plain"); | |
| //Incluímos la clase OrderItems | |
| require_once "OrderItems.php"; | |
| /* | |
| Creamos una instancia de la clase DOMDocument de PHP. | |
| Aquí establecemos la versión de XML y la codificación del documento. |
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 | |
| /** | |
| * Clase OrderItems de inicialización | |
| */ | |
| class OrderItems | |
| { | |
| public $sku; | |
| public $name; | |
| public $price; | |
| public $qty; |
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
| CREATE TABLE `users` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `username` varchar(255) NOT NULL, | |
| `password` varchar(255) NOT NULL, | |
| `ip_address` varchar(48) NOT NULL, | |
| `reg_time` varchar(10) NOT NULL, | |
| `reg_date` varchar(20) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InooDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; |
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 | |
| //Registramos nuestras clases utilizando el autoloader | |
| spl_autoload_register(function($class_name){ | |
| include $class_name . '.php'; | |
| }); | |
| $users = new ManageUsers(); | |
| echo 'Registros creados: ' . | |
| $users->registerUsers('paul', 'temporalpwd', '127.0.0.1', '12:00', '21-09-2016'); |
NewerOlder