Skip to content

Instantly share code, notes, and snippets.

Naveen metanav

  • RIKEN
  • Japan
Block or report user

Report or block metanav

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@metanav
metanav / enterZone.ts
Last active Aug 8, 2019
A RxJS pipeable operator which let the observables to enter into angular zone so that the change detection works properly.
View enterZone.ts
import { NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
export function enterZone(zone: NgZone) {
return <T>(source: Observable<T>) =>
new Observable<T>(observer =>
source.subscribe({
next: (x) => zone.run(() => observer.next(x)),
error: (err) => observer.error(err),
complete: () => observer.complete()
View HybridAuthAdapter.php
<?php
namespace SocialAuth\Adapter;
class HybridAuthAdapter
{
protected $hybridAuth;
public function __construct($hybridAuth)
{
$this->hybridAuth = $hybridAuth;
View aggregation_builder_example.php
<?php
$ab = $this->dm->getDocumentCollection('Document\Test')->createAggregationBuilder();
if (is_array($filter)) {
/* Here $filter is an array which could be $qb->getQuery()->getQuery()['query']
* or manually crafted
* example [ '$and' => [ 'name' => 'keyword'] ]
*/
$ab->match(); // <-- how to pass query array to match stage?
} else {
You can’t perform that action at this time.