Version | Date | Notes |
---|---|---|
1.0.0 | 16 December 2013 | First version |
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 < 5.3.6 | |
foreach (debug_backtrace() as $trace) | |
{ | |
echo sprintf("\n%s:%s %s::%s", $trace['file'], $trace['line'], $trace['class'], $trace['function']); | |
} | |
die; | |
// PHP >= 5.3.6 | |
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |
die; |
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 { parse } from 'csv-parse' | |
import fs from 'fs' | |
import { pipeline } from 'stream/promises' | |
/** | |
* Do something async with a row. | |
* | |
* @param {*} row A row of the CSV as an object. | |
*/ | |
async function handleRow(row) { |
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
function extractColumn(arr, column) { | |
function reduction(previousValue, currentValue) { | |
previousValue.push(currentValue[column]); | |
return previousValue; | |
} | |
return arr.reduce(reduction, []); | |
} |
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 { PrimaryGeneratedColumn, Entity, Column } from 'typeorm'; | |
@Entity('foo') | |
export class Foo { | |
@PrimaryGeneratedColumn() | |
public id: number; | |
@Column({ default: '' }) | |
public get link(): string { | |
let value = this._link; |
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
class JHtmlDHDate | |
{ | |
/** | |
* Outputs a relative time. | |
* | |
* @param mixed $date A string or DateTime object representing the time in the past to compare to now. | |
* | |
* @return string | |
* | |
* @since 1.0.1 |
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
"use strict"; | |
var Readable = require('stream').Readable; | |
/** | |
* Create a stream from batching a Sequelize select query. | |
* | |
* @param {Function} query - Function that returns a promise. | |
* @param {object} options | |
* @param {number} options.limit - The limit for the number of rows to return in each "batch" |
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
class SafeObserver { | |
constructor(private _next: (value: any) => void = () => {}, | |
public error: (errorValue: any) => void = (e: any) => { throw e; }, | |
private _complete: (completeValue?: any) => void = () => {}) {} | |
public next(value: any) { | |
try { | |
this._next(value); | |
} | |
catch (e) { |
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" encoding="UTF-16" standalone="no"?> | |
<snippets> | |
<category filters="*" id="category_1275479375591" initial_state="1" label="Joomla Components" largeicon="" smallicon=""> | |
<description><![CDATA[Snippets that support the general needs for any Joomla component.]]></description> | |
<item category="category_1275479375591" class="" editorclass="" id="item_1275479460203" label="PHP File Header" largeicon="" smallicon="" snippetProvider="org.eclipse.wst.common.snippets.ui.TextSnippetProvider"> | |
<description><![CDATA[The standard header for a PHP file.]]></description> | |
<content><![CDATA[<?php | |
/** | |
* @version $Id$ | |
* @package ${PACKAGE} |
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 | |
/** | |
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE | |
*/ | |
namespace Joomla\Data; | |
use Psr\Cache\CacheInterface; |
NewerOlder