Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet:
<?php | |
function render_level_list($items) | |
{ | |
$level=0; | |
foreach($items as $item) | |
{ | |
if($item->level==$level) { | |
echo "</li>\n"; | |
} |
# Inspiration from | |
# | |
# http://blogs.msdn.com/b/opticalstorage/archive/2010/08/13/writing-optical-discs-using-imapi-2-in-powershell.aspx | |
# | |
# and | |
# | |
# http://tools.start-automating.com/Install-ExportISOCommand/ | |
# | |
# with help from | |
# |
<?php | |
class InitialDbMigrationCommand extends CConsoleCommand | |
{ | |
public function run($args) { | |
$schema = $args[0]; | |
$tables = Yii::app()->db->schema->getTables($schema); | |
$addForeignKeys = ''; | |
$dropForeignKeys = ''; |
#!/bin/bash | |
PROGNAME=${0##*/} | |
INPUT='' | |
QUIET='0' | |
NOSTATS='0' | |
max_input_size=0 | |
max_output_size=0 | |
usage() |
#!/usr/bin/env sh | |
# | |
# This script automates images optimization | |
# is mainly used by a developer who manually | |
# can execute it when adding new images to the | |
# project | |
# | |
# Download and compile following binaries: | |
# | |
# - [jpegtran](http://www.ijg.org/) |
/* | |
https://github.com/brianreavis/selectize.js/issues/470 | |
Selectize doesn't display anything to let the user know there are no results. | |
This is a temporary patch to display a no results option when there are no | |
options to select for the user. | |
*/ | |
Selectize.define( 'no_results', function( options ) { | |
var self = this; |
<?php | |
namespace common\models\db; | |
class AppActiveQuery extends \yii\db\ActiveQuery | |
{ | |
private $cacheDuration = null; | |
private $functionName = ''; | |
private $q = null; | |
/** |
<?php | |
namespace console\controllers; | |
use \Yii; | |
class ReverseController extends \yii\console\Controller | |
{ | |
public function actionMigrate() { | |
// $schema = $args[0]; | |
$tables = Yii::$app->db->schema->getTableSchemas(); |
<?php | |
/** | |
* Класс для генрации Docx | |
* User: Алексей Дмитриев | |
* Date: 10.07.14 | |
* Time: 17:52 | |
*/ | |
class FileConverterDOC extends FileConverter { |