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
#!/usr/bin/env python | |
from itertools import chain | |
from sys import exit | |
def num_to_bin(): | |
try: | |
original_number = int(input('Chose the number: ')) | |
basis = int(input('Chose the basis (up to 32): ')) | |
if(basis > 32): |
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
$(document).on('chartusEditor.load', function() { | |
var paragraphsCount = 2, | |
loremIpsum = new goog.text.LoremIpsum(); | |
loremParagraphs = []; | |
for(var i = 0; i < paragraphsCount; i++) { | |
loremParagraphs.push( | |
'<p>', loremIpsum.generateParagraph(), '</p><br />' | |
); | |
} | |
window.ChartusEditor.setHtml( |
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 | |
return array( | |
'connectionString' => 'mysql:host=localhost;dbname=YOUR_DATABASE_NAME', | |
'emulatePrepare' => true, | |
'username' => 'YOUR_DATABASE_USERNAME', | |
'password' => 'YOUR_DATABASE_PASSWORD', | |
'charset' => 'utf8', | |
'tablePrefix' => 'tbl_', | |
'enableProfiling' => true, | |
); |
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 | |
header('Content-Type: text/plain; charset=ISO-8859-1'); | |
ini_set('memory_limit', '512M'); | |
ini_set('max_execution_time', '0'); | |
defined('DS') OR define('DS', DIRECTORY_SEPARATOR); | |
setlocale(LC_ALL, 'en_US.ISO-8859-1'); | |
function clearUTF($s) { | |
$r = ''; | |
$s1 = iconv('ISO-8859-1', 'ASCII//TRANSLIT', $s); | |
for ($i = 0; $i < strlen($s1); $i++) { |
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 | |
$userAgents = array( | |
// Mozilla Firefox: | |
'Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0', | |
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101211 Namoroka/3.6.13', | |
'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101230 Mandriva Linux/1.9.2.13-0.2mdv2010.2 (2010.2) Firefox/3.6.13', | |
'Mozilla/5.0 (Windows; U; Windows NT 6.1; nl; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13', | |
// Google Chrome: | |
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16', | |
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Chrome/5.0.322.2 Safari/533.1', |
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 | |
$username='h2odev'; | |
$password='likewater'; | |
$location='http://h2odev.law.harvard.edu/playlists/151'; | |
$baseUrl = 'http://h2odev.law.harvard.edu/'; | |
$currDir = dirname(__FILE__) . DIRECTORY_SEPARATOR; | |
$userAgent = require($currDir . 'cuseragent.php'); | |
$ch = curl_init (); |
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 | |
/** | |
* In /protected/views/book/view.php ln. 52 | |
*/ | |
$this->widget('ext.widgets.jui.JuiDialog', array( | |
'id'=>'book-dialog', | |
// additional javascript options for the dialog plugin | |
'options'=>array( | |
'title'=>'Dialog box 1', | |
'autoOpen'=>false, |
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 | |
return array( | |
'connectionString' => 'mysql:host=localhost;dbname=book_import_db', | |
'emulatePrepare' => true, | |
'username' => 'sp1222', | |
'password' => '2221ps', | |
'charset' => 'utf8', | |
'tablePrefix' => 'tbl_', | |
'enableProfiling' => true, | |
'class'=>'CDbConnection', |
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 | |
return array( | |
'turned-on'=>false, | |
'port'=>28000, | |
'notifications'=>array( | |
'turned-on'=>false, | |
) | |
); |
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
{ | |
"kind": "books#volumes", | |
"totalItems": 1215, | |
"items": [ | |
{ | |
"kind": "books#volume", | |
"id": "W5lvCBqgPGkC", | |
"etag": "e587On094FY", | |
"selfLink": "https://www.googleapis.com/books/v1/volumes/W5lvCBqgPGkC", | |
"volumeInfo": { |
OlderNewer