This file contains 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
show_article: | |
url: /article/:articleCode-:folderCode-:variationCode-:lineCode-:seasonCode-:colorCode | |
class: sfDoctrineRoute | |
options: | |
model: Article | |
type: object | |
segment_separators: [/, -] | |
param: { module: article, action: show, sf_format: html } |
This file contains 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
show_article: | |
url: /article/:articleCode_:folderCode_:variationCode_:lineCode_:seasonCode_:colorCode | |
class: sfDoctrineRoute | |
options: | |
model: Article | |
type: object | |
segment_separators: [/, _] | |
param: { module: article, action: show, sf_format: html } |
This file contains 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
SELECT | |
se.id as id, | |
email.value as email, | |
tessera.value as tessera | |
FROM | |
sym_entries se | |
LEFT JOIN sym_entries_data_119 email | |
ON | |
se.id = email.entry_id |
This file contains 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 | |
public static function generateCardNumber($uid) | |
{ | |
$uid = str_pad(strrev($uid), 6, '0'); | |
$quartine = array(); | |
$quartine[] = str_pad(abs((131071 * $uid + 524287) % 10000), 4, '0', STR_PAD_LEFT); | |
$quartine[] = str_pad(abs((524287 * $uid + 131071) % 10000), 4, '0', STR_PAD_LEFT); | |
$quartine[] = str_pad(abs((8191 * $uid + 131071) % 10000), 4, '0', STR_PAD_LEFT); |
This file contains 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 | |
$arrayCard = array(); | |
for ($i = 100000; $i < 1000000; $i++) | |
{ | |
$num = generateCardNumber($i); | |
echo "id: ".$i." card: ".$num."\n"; | |
if(in_array($num, $arrayCard)) |
This file contains 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
dev: | |
mailer: | |
class: sfMailer | |
param: | |
logging: %SF_LOGGING_ENABLED% | |
charset: %SF_CHARSET% | |
delivery_strategy: realtime | |
transport: | |
class: Swift_SmtpTransport | |
param: |
This file contains 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 | |
/** | |
* ncMAilLogger send mail logs messages. | |
* | |
* @package symfony | |
* @subpackage log | |
* @author alessandro cinelli a.k.a cirpo <alessandro.cinelli@gmail.com> | |
* @version SVN: $Id: sfFileLogger.class.php 10964 2008-08-19 18:33:50Z fabien $ | |
*/ | |
class cMailLogger extends sfLogger |
This file contains 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 | |
if (!$this->config->get('config_customer_approval')) { | |
$customer_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer WHERE LOWER(email) = '" . $this->db->escape(strtolower($email)) . "' AND password = '" . $this->db->escape(md5($password)) . "' AND status = '1'"); | |
} else { | |
$customer_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer WHERE LOWER(email) = '" . $this->db->escape(strtolower($email)) . "' AND password = '" . $this->db->escape(md5($password)) . "' AND status = '1' AND approved = '1'"); | |
} |
This file contains 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
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
export EDITOR=vim | |
export VISUAL=vim | |
alias 'll=ls -lah' | |
alias 'zf=/usr/local/Cellar/php/5.3.3/lib/php/bin/zf.sh' |
This file contains 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
var oggettoX = function(){ | |
var valore = 0; | |
return { | |
increment : function(inc){ | |
valore += inc; | |
}, | |
getValue: function(){ | |
return valore; | |
} |