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
$(function() { | |
var reFeminine = /([\s,.?!:;()[\]]|^)([A-ZÁČĎÉÍĽŇÓŘŠŤÚÝŽ]\S*)ov(á|é|ou)([\s,.?!:;()[\]]|$)/g; | |
function defeminize(index, elem) { | |
var $elem = $(elem); | |
$elem.html($elem.html().replace(reFeminine, '$1$2$4')); | |
} | |
$('#firstHeading, #mw-content-text p').each(defeminize); | |
}); |
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
/*global mediaWiki, jQuery */ | |
/*jslint browser: true, plusplus: true, white: true */ | |
/*jshint browser:true, laxbreak:false, plusplus:false, white:false, undef:true, unused:true */ | |
( function ( mw, $ ) { | |
'use strict'; | |
if ( /*mw.config.get( 'wgNamespaceNumber' ) || */ !/^(edit|submit)$/.test( mw.config.get( 'wgAction' ) ) ) { |
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
// Načtení/dekódování .zfo souboru vzniklého exportem zprávy z datové schránky | |
// Ve skutečnosti je .zfo soubor PKCS#7 soubor, v normální společnosti označovaný příponou .p7s, | |
// obsahující vyexportovanou zprávu podepsanou certifikátem datových schránek. | |
// Takže jeho načtení je triviální: | |
object DecodeZfo(string zfoFilename) | |
{ | |
var msg = File.ReadAllBytes(zfoFilename); | |
var cms = new SignedCms(); | |
cms.Decode(msg); |
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
/** | |
* @brief | |
* Zobrazit u překladů odkazy na Wikislovníky v jiných jazycích | |
* | |
* @details | |
* V sekci „Překlady“ zobrazí u jednotlivých překladů odkazy na příslušné heslo | |
* ve Wikislovníku v daném jazyce. Nekontroluje existenci cílové stránky. | |
* | |
* @author | |
* [[meta:User:Danny B.]] |
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
$(function() { | |
var $btn = $('<button>').text('Sitematrix!'); | |
$btn.click(function() { | |
var api = new mw.Api(); | |
api.get( { | |
action: 'sitematrix' | |
} ).done ( function ( data ) { | |
var result = []; | |
var matrix = data.sitematrix; |
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
// https://cs.wikipedia.org/wiki/Speciální:ApiSandbox#action=query&list=checkuser&format=json&curequest=ipusers&cutarget=.....&cureason=.....&cutoken=..... | |
dynamic data = JsonConvert.DeserializeObject(File.ReadAllText(@"curesults.json")); | |
var cudata = Enumerable.Select((IEnumerable<object>)data.query.checkuser.ipusers, cu => | |
{ | |
dynamic d = cu; | |
return new { | |
d.end, | |
d.editcount, |
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 linksfromlist.pl_title, (SELECT COUNT(*) FROM pagelinks incominglinks WHERE incominglinks.pl_title=linksfromlist.pl_title AND incominglinks.pl_namespace=linksfromlist.pl_namespace AND incominglinks.pl_from_namespace=0) linkcount | |
FROM pagelinks linksfromlist | |
INNER JOIN page ON linksfromlist.pl_from=page_id | |
WHERE page_namespace=2 AND page_title='Vojtěch_Dostál/Pískoviště3' | |
AND linksfromlist.pl_namespace=0 | |
ORDER BY linkcount DESC |
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
// LINQPad C# Program | |
const int COL_VOLBY = 0; | |
const int COL_OBVOD = 1; | |
const int COL_OBEC = 3; | |
const int COL_K1_VOLICI = 6; | |
const int COL_K1_OBALKY = 7; | |
const int COL_K2_VOLICI = 10; | |
const int COL_K2_OBALKY = 11; |
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 | |
/** | |
* Simple emulation of ICU sortkeys for trivial strings (strings containing [A-Za-z0-9] only) | |
* | |
* See http://userguide.icu-project.org/collation/architecture#TOC-Sort-Keys | |
*/ | |
function simple_sort_key($str) | |
{ |
This file has been truncated, but you can view the full file.
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
using System; | |
using System.Text; | |
class C | |
{ | |
static void Main() | |
{ | |
var c0 = Console.Read(); | |
if (c0 > 0 && c0 != 13) | |
{ |