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 | |
$start = microtime(true); | |
$mem = memory_get_usage(); | |
function t() { | |
global $argv; | |
$array = array(); | |
for ($i = 0; $i < $argv[1]; $i++) { | |
$array[] = rand(0, 100); | |
} |
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
{ | |
ArticleType: | |
{ | |
name: Article Name | |
apiMethod: getArticleType | |
type: HardwareSet | |
} | |
ArticleType: | |
{ | |
name: Article name 2 |
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
#app/config/parameters.yml | |
google_api.client_id: "2988145xxxxxapps.googleusercontent.com" | |
google_api.client_secret: "xxxxxycQWunSdF5Gcvnr1nn6" | |
google_api.redirect_uri: "http://test.xsolve.pl/oauth2callback" | |
google_api.dev_key: xsdevnewtest | |
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
#app/config/parameters.yml | |
google_api: | |
client_id: "29881450xxxx.apps.googleusercontent.com" | |
client_secret: "xxxxxycQWunSdF5Gcvnr1nn6" | |
redirect_uri: "http://test.xsolve.pl/oauth2callback" | |
dev_key: xsdevnewtest | |
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
<?xml version="1.0" ?> | |
<container xmlns="http://symfony.com/schema/dic/services" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | |
<parameters> | |
<parameter key="xsolve.test.google.authorization.manager.class">Xsolve\TestBundle\Service\GoogleAuthorizationManager</parameter> | |
</parameters> |
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 | |
namespace Xsolve\TestBundle\Service; | |
use Symfony\Bundle\FrameworkBundle\Routing\Router; | |
use Symfony\Bundle\TwigBundle\TwigEngine as Templating; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use GoogleApi\Client; | |
use GoogleApi\Contrib\apiOauth2Service; | |
use Symfony\Component\HttpFoundation\Request; |
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 | |
namespace Xsolve\TestBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\Request; |
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 | |
namespace Xsolve\AcmeBundle\DQL; | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
use Doctrine\ORM\Query\Lexer; | |
/** | |
* SoundexFunction ::= "SOUNDEX" "(" StringPrimary ")" | |
*/ |
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
orm: | |
auto_generate_proxy_classes: %kernel.debug% | |
auto_mapping: true | |
dql: | |
string_functions: | |
soundex: Xsolve\AcmeBundle\DQL\SoundexFunction |
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 | |
return $this->createQueryBuilder('p') | |
->addSelect("MATCH_AGAINST (p.name, p.country, p.street, p.postal, p.city, p.state, :address 'IN NATURAL MODE') as score") | |
->add('where', 'MATCH_AGAINST(p.name, p.country, p.street, p.postal, p.city, p.state, :address) > 0.8') | |
->setParameter('address', $address) | |
->getQuery() | |
->getResult(); |
OlderNewer