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
The parameter weekday is True if it is a weekday, and the parameter vacation is True if we are on vacation. We sleep in if it is not a weekday or we're on vacation. Return True if we sleep in. | |
sleep_in(False, False) → True | |
sleep_in(True, False) → False | |
sleep_in(False, True) → True |
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
There is a Hare and | |
a tortoise. | |
The hare and tortoise race. | |
The hare thinks that he is fast | |
and the tortoise is slow. | |
He decided to take a nap. | |
But he slept for too long and the tortoise passes him. | |
And the tortoise won the race. |
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
/^((\+\d+)*(\d+)[- ])*\d{3,}[- ]*\d{3,}$/ |
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
root (hd0, 5) | |
kernel /vmlinuz root=/dev/sda6 | |
initrd /initrd.img | |
boot |
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 | |
/** | |
* Will take given parameters, query and return a list of listings for given params | |
* | |
* PARAMETERS | |
* =================== | |
* | |
* q Search string. Default = null (optional) | |
* build Car's build type Default = null (optional) | |
* make Manufacturer Default = null (optional) |
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 | |
/** | |
* MMJDB Google docs form embedding | |
**/ | |
function mmjdb_some_form(){ | |
if(is_page('page_slug')){ | |
echo '<iframe src="https://docs.google.com/spreadsheet/embeddedform?formkey=dE1GWmZYTDNpSG5CSkVRZWgtc0JyWHc6MQ" width="906" height="790" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>'; | |
} | |
} |
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 | |
// Let's say $result is the data that you want to show with pagination. | |
//First get all the NRs of the result | |
$nr = Set::extract("{n}.AF.NR", $data); | |
//Then get the names of all the companies for the given NR | |
$companies = $this->FIRMA->find('list', array('conditions' => array("NR" => $nr) ) ); | |
?> |
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 | |
class MCAPI { | |
var $version = "1.3"; | |
var $errorMessage; | |
var $errorCode; | |
/** | |
* Cache the information on the API location on the server | |
*/ |
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
The following was taken from Firebug's Net panel's POST tab. | |
This is how flash posted the data for entries/customize | |
--kysqyjqwoxedwqdyyutnftnihuuproui | |
Content-Disposition: form-data; name="title" | |
title | |
--kysqyjqwoxedwqdyyutnftnihuuproui |
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 java.util.*; | |
import java.io.*; | |
import java.util.StringTokenizer; | |
public class UserAccessLogTest extends GenericTest | |
{ | |
private String filePath =""; | |
public UserAccessLogTest(String args[]) | |
{ |