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
from masonite.providers import Provider | |
class ZeroMQProvider(Provider): | |
def __init__(self, application): | |
self.application = application | |
def register(self): | |
print("Starting zeromq") | |
import zmq |
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
if (PrimeFaces.widget.DataTable) { | |
PrimeFaces.widget.DataTable.prototype.tabCell = function(celula, frente){ | |
var celulaAlvo = frente ? celula.nextAll("td.ui-editable-column:first") : celula.prevAll("td.ui-editable-column:first"); | |
if (celulaAlvo.length == 0) { | |
var linha = frente ? celula.parent().next() : celula.parent().prev(); | |
celulaAlvo = frente ? linha.children("td.ui-editable-column:first") : linha.children("td.ui-editable-column:last"); | |
} |
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
from django.core import management | |
from pathlib import Path | |
class Command(management.base.BaseCommand): | |
def handle(self, *args, **options): | |
apps = ["core"] | |
models = ["core.ModelA", "core.ModelB"] | |
fixture_name = "audit" |
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
from django.db import models | |
class ZipField(models.Field): | |
def __init__(self, length=8, *args, **kwargs): | |
self.length = length | |
super().__init__(*args, **kwargs) | |
def db_type(self, connection): | |
return f"char({self.length})" |
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 Slugfy{ | |
public static function getSlug($string){ | |
$string = stripslashes($string); | |
$string = preg_replace('/[[:punct:]]+/',' ',$string); | |
$string = preg_replace('/[[:space:]]+/',' ',$string); | |
$string = ltrim($string,". "); |
OlderNewer