In this Gist will show you how to get parents of a list of child from an Oracle database.
Let's start with the table below:
Child | Parent |
---|---|
1 | NULL |
2 | 1 |
3 | 2 |
4 | 3 |
<?php | |
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController; | |
class BaseAdminCrudController extends AbstractCrudController | |
{ | |
public function edit(AdminContext $context) | |
{ | |
$event = new BeforeCrudActionEvent($context); | |
$this->container->get('event_dispatcher')->dispatch($event); |
In this Gist will show you how to get parents of a list of child from an Oracle database.
Let's start with the table below:
Child | Parent |
---|---|
1 | NULL |
2 | 1 |
3 | 2 |
4 | 3 |
var buttons = $('div[role=dialog]').find('button:contains(Follow)').filter(function() { | |
return $(this).text().toLowerCase() === 'follow'; | |
}); | |
$.each(buttons, function(idx, itm) { | |
var secondes = Math.floor((Math.random() * 10) + 3); | |
setTimeout(function() { | |
$(itm).trigger('click'); | |
}, duration = secondes * 1000); |
fgrep -vf /path/to/file1 /path/to/file2 |
id,username,fullname,emails,fbPage,externalUrl,biography,followedBy,follows,isPrivate,isVerified,isBusinessAccount,businessCategory,businessEmail,businessPhone,businessAddressStreet,businessAddressZipcode,businessAddressCity,businessAddressRegion,businessAddressCountryCode,hashtags | |
5734709815,tasteititalian,Taste IT,,,https://m.facebook.com/TasteItitaliantakeaway/,"‼️The first independent Italian Gelateria in Greater Manchester ‼️ | |
Stonebaked pizza 🍕 artisan gelato 🍦 baked pasta 🍝 tasty arancini.",430,146,0,0,1,Restaurants,[email protected],441616980410,69 BLACKFRIARS ROAD,M3 7DB,City of Salford,,GB,pizzauk | |
3667203339,mobipizzeria,🇮🇹Mobile Wood Fired Pizza🇬🇧,,,https://www.facebook.com/mobipizzeria/,"Mobile pop-up wood fired pizza UK-wide. | |
We cater for weddings, corporate events, private parties, birthdays, festivals, concerts, fetes, and many more",7486,3492,0,0,1,Restaurants,[email protected],443300100270,,SG191RB,St Neots,,GB,pizzauk | |
2986836082,zialuciapizza,Zia Lucia,,,http://www.zialucia.com/, |
-- Table that store hotels reviews | |
CREATE TABLE hotels_reviews ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | |
review TEXT NOT NULL | |
); | |
-- As SQLite index content on a virtual table, | |
-- We need to create a virtual table for hotels_reviews | |
-- I use the last extension fts5 for full text searching https://www.sqlite.org/fts5.html | |
-- I use the "porter" tokenizer, check this link for definition: https://www.sqlite.org/fts3.html#tokenizer |
var secondes = Math.floor((Math.random() * 10) + 3); | |
var duration = secondes; | |
$('#activity-popup-dialog-body').find('.not-following').find('button.follow-button').each(function() { | |
var _this = this; | |
setTimeout(function() { | |
$(_this).trigger('click'); | |
}, duration * 1000); | |
duration += secondes; |
.mar-left-5 { | |
margin-left: 5px; | |
} | |
.mar-left-10 { | |
margin-left: 10px; | |
} | |
.mar-left-15 { | |
margin-left: 15px; |
<?php | |
namespace AppBundle\Security\Authentication\Handler; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | |
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; | |
class LoginSuccessHandler implements AuthenticationSuccessHandlerInterface |
# -*- coding: utf-8 -*- | |
# MIT License (c) Lhassan Baazzi <[email protected]> | |
from collections import defaultdict | |
from twisted.internet import reactor | |
from scrapy import signals | |
class CloseSpider(object): | |
def __init__(self, crawler): |