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 | |
function pc_permute($items, $perms = array( )) { | |
if (empty($items)) { | |
$res = $perms[0] + 13.0 * $perms[1] / $perms[2] + $perms[3] + 12.0 * $perms[4] - $perms[5] - 11.0 + $perms[6] * $perms[7] / $perms[8] - 10.0; | |
if ($res == 66.0) { | |
print join(' ', $perms) . ": $res\n"; | |
} | |
} else { | |
for ($i = count($items) - 1; $i >= 0; --$i) { |
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
'atom-workspace atom-text-editor:not([mini])': | |
'ctrl-alt-z': 'unset!' | |
'body': | |
'ctrl-alt-o': 'unset!' | |
'ctrl-alt-s': 'unset!' |
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
// ==UserScript== | |
// @name Bidding Status | |
// @namespace leafnode | |
// @include http://allegro.pl/myaccount/bid.php | |
// @version 1 | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js | |
// ==/UserScript== | |
jQuery('#items-list tbody tr').each( function ( i ) { |
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
// ==UserScript== | |
// @name Allegro Watchlist reminders | |
// @namespace leafnode | |
// @description Add button to enable reminders on all auctions | |
// @include http://allegro.pl/myaccount/watch.php | |
// @version 1 | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js | |
// ==/UserScript== |
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
int wyswietl_menu( ) | |
{ | |
int ch; | |
cout << "\n 1. Wyszukiwanie ksiazek" << endl; | |
cout << " 2. Edycja danych" << endl; | |
cout << " 3. Dopisywanie danych" << endl; | |
cout << " 4. Wypożyczanie książek" << endl; | |
cout << " 5. Zwrot książek" << endl; | |
cout << " 6. Koniec\n\n"; | |
cout << "Wybierz polecenie: \n? "; |
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
diff --git a/blipalacz.user.js b/blipalacz.user.js | |
index e781177..fba42b1 100644 | |
--- a/blipalacz.user.js | |
+++ b/blipalacz.user.js | |
@@ -775,6 +775,19 @@ function Dopal() { | |
} | |
} | |
} else { | |
+ | |
+ jQuery('span.respond').each(function(e, v){ |
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 getYoutubeId($url) | |
{ | |
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) | |
{ | |
return $match[1]; | |
} else { | |
return false; | |
} | |
} |
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 re | |
a = u'Brzozowa 4/5' | |
re.split('\W+',a, re.UNICODE) | |
# [u'Brzozowa', u'4', u'5'] | |
a = u'Drzymały 4/5' | |
re.split('\W+',a, re.UNICODE) | |
# chce: [u'Drzymały', u'4', u'5'] | |
# dostaję: [u'Drzyma', u'y', u'4', u'5'] |
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
$jq('input.customtimetable').click( function (e) { if ($jq(this).is(':checked') ) { $jq(this).parent().css('background', '#10a010'); } else { $jq(this).parent().css('background', '#E6E7E9'); } } ); |
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 | |
$str = "Mon Aug 06 00:00:00 BST 2012"; | |
$d = strtotime("$str"); | |
echo date("Y-m-d H:i", $d); | |
// 2012-08-06 01:00 |