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
+-----+--------------------+------+----------+--------+-----+-----------------+---------+----------+ | |
| No. | Player | Pos. | Ht. (in) | Ht. | Wt. | Prior | Country | NBA Exp. | | |
+-----+--------------------+------+----------+--------+-----+-----------------+---------+----------+ | |
| 2 | Deandre Ayton | C | 83 | 6' 11" | 250 | Arizona | USA | 5 | | |
| 41 | Ibou Badji* | C | 85 | 7' 1" | 240 | Wisconsin Herd | Senegal | 1 | | |
| 13 | Malcolm Brogdon | G | 77 | 6' 5" | 229 | Virginia | USA | 7 | | |
| 10 | Moses Brown | C | 86 | 7' 2" | 245 | UCLA | USA | 4 | | |
| 21 | John Butler Jr.* | F | 84 | 7' 0" | 190 | Florida State | USA | 1 | | |
| 33 | Toumani Camara | G | 80 | 6' 8" | 220 | Georgia | Belgium | R | |
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
import string | |
import random | |
def id_generator(size=11, chars=string.ascii_uppercase + ' '): | |
return ''.join(random.choice(chars) for _ in range(size)) | |
print id_generator() |
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 | |
a.accountId, | |
a.name AS accountName, | |
b.name AS businessName, | |
b.businessId, | |
n.employee_id AS teamUserId | |
FROM | |
Account AS a | |
JOIN Business AS b ON a.accountId = b.accountId AND b.deleted = 0 | |
JOIN user_notes AS n ON n.user_id = a.accountId AND n.deleted = 0 |
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
MISS: 0 | |
HIT: 1 | |
CRITICALHIT: 2 | |
function: attack ROLL:n vs DEFENSE:n { | |
if ROLL = 1 { result: MISS } | |
if ROLL = 20 { | |
if ROLL + ATTACK >= DEFENSE { result: CRITICALHIT } | |
result: HIT | |
} |
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
MISS: 0 | |
HIT: 1 | |
CRITICALHIT: 2 | |
function: attack ROLL:n vs DEFENSE:n { | |
if ROLL = 1 { result: MISS } | |
if ROLL = 20 { | |
if ROLL + ATTACK >= DEFENSE { result: CRITICALHIT } | |
result: HIT | |
} |
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
SET @cutoff = date_add(now(), interval 421 MINUTE); | |
EXPLAIN SELECT | |
wpi.itemId, | |
wpi.label, | |
wpi.note, | |
wpi.dueDate, | |
wp.timeZone, | |
su.email, | |
su.firstName, |
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
"","1234567890","123456789012","default","""Salesperson One"" <1234567890>","SIP/1234-0da1c720","DAHDI/1-1","Dial","DAHDI/g2/1234567890","2010-08-31 21:06:34","2010-08-31 21:07:00","2010-08-31 21:07:00",26,0,"NO ANSWER","DOCUMENTATION" | |
"","1234567890","123456789012","default","""Salesperson One"" <1234567890>","SIP/1234-0da1c720","DAHDI/1-1","Dial","DAHDI/g2/1234567890","2010-08-31 21:06:34",,"2010-08-31 21:07:00",26,0,"NO ANSWER","DOCUMENTATION" | |
Modify this regex to be able to parse the second line, above, that is missing one timestamp: | |
"([^"]*)","([^"]*)","([^"]*)","([^"]*)","""([^"{3}]*)"{2} ([^"]+)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)",([^,]*),([^,]*),"([^"]*)","([^"]*)" |
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
/** | |
* Returns all payments or invoices made within a certain date range. | |
* | |
* @param Zend_Date $start | |
* @param Zend_Date $end | |
* @return System_Db_DataObject_Collection | |
*/ | |
public static function getPaymentsByDateRange(Zend_Date $start, Zend_Date $end) { | |
require_once 'System/Db/DataObject/Collection.php'; | |
$collection = new System_Db_DataObject_Collection(self::getDao(), 'Guide_Invoice_Payment'); |
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 | |
require_once 'Zend/Validate/Abstract.php'; | |
/** | |
* Mo' money, mo' money, mo' money. | |
* | |
* @package System_Form_Validate | |
*/ | |
class System_Form_Validate_Currency extends Zend_Validate_Abstract { |
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 | |
sp.invoiceId as 'InvId', | |
spMin.`date` as 'minDate', | |
spMax.`date` as 'maxDate' | |
FROM Guide_Invoice_ScheduledPayments sp | |
JOIN (SELECT invoiceId, MIN(`date`) as `date` from Guide_Invoice_ScheduledPayments group by invoiceId) as spMin on sp.invoiceId = spMin.invoiceId | |
JOIN (SELECT invoiceId, MAX(`date`) as `date` from Guide_Invoice_ScheduledPayments group by invoiceId) as spMax on sp.invoiceId = spMax.invoiceId | |
group by sp.invoiceId | |
having maxDate > minDate |