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 sublime, sublime_plugin, random | |
class ShuffleCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
regions = self.view.sel() | |
selections = [self.view.substr(s) for s in regions] | |
selections = [shuffle_string(s) for s in selections] | |
for i in range(len(selections)): | |
self.view.replace(edit, regions[i], selections[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
<?php | |
/** | |
* Simple PHP class encapsulating file upload related functions. | |
* @author qur2 | |
*/ | |
class FileUpload { | |
private $name; | |
public $messages = array( | |
1 => 'Entry size exceeds upload_max_filesize limit : %s', | |
2 => 'Entry size exceeds max_file_size limit : %s', |
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
<xsl:call-template name="pagination"> | |
<xsl:with-param name="pagination" select="pagination" /> | |
<!-- build an url that holds every get params, except the page --> | |
<xsl:with-param name="pagination-url"> | |
<xsl:value-of select="/data/params/root" /> | |
<xsl:value-of select="/data/params/parent-path" /> | |
<xsl:text>?</xsl:text> | |
<xsl:for-each select="/data/params/*[contains(name(), 'url-')]"> | |
<xsl:if test="not(name(.) = 'url-page')"> | |
<xsl:value-of select="concat(substring-after(name(), 'url-'), '=', text())" /> |
NewerOlder