Skip to content

Instantly share code, notes, and snippets.

View AlexTiTanium's full-sized avatar

Alex Kucherenko AlexTiTanium

View GitHub Profile
function addRecord($record, $db) {
try {
$db->lock($record->table);
$db->prepare($record->sql);
$db->exec($record->params);
}
catch(Exception $e) {
$db->rollback($record);
if (!write_log($e->getMessage(), $e->getTraceAsString())) {
throw new Exception('Unable to write to error log.');
catalog:
patterns: '/catalog/{:path}'
params:
path: '(.*)'
values:
application: 'site'
controller: 'shop'
action: 'catalog'
----------------------------------------
Андре Ламот
Программирование игр для Windows
http://progbook.ru/opengl_directx/518-lamot-programmirovanie-igr-dlya-windows-sovety.html
-----------------------------------------
-----------------------------------------
Дональд Кнут — Искусство программирования
это конечно круто, но слишком много математики склоняюсь к Н. Вирту
{
"_id": ObjectId("50d47cac9bab88133c000000"),
"catalog": "50b4fe569bab88a853000000",
"count": NumberInt(12),
"dateAdd": ISODate("2012-12-21T15: 13: 48.794Z"),
"description": "<b>выв<\/b> вфыв фвфывывфыв вфы<br>",
"images": {
"0": {
"id": "50ddb8ec7d3a19_44640307.jpg",
"time": NumberInt(1356708076),
<?php
namespace models\ODM\Repositories;
use Doctrine\ODM\MongoDB\DocumentRepository;
use Documents\Shop\Products;
use lib\Doctrine\DoctrineOdm;
/**
* ShopProductsRepository
{% extends _extend_shop %}
{% import 'forms.html' as form %}
{% block includes %}
{{ parent() }}
{{ addCss('css/shop') }}
{{ addJs('js/shop/inputsCollection') }}
<?php
namespace lib\Templates\EngineExtensions;
use Twig_Extension;
use lib\Core\IncluderService;
use Twig_Function_Method;
class ViewHelper extends Twig_Extension {
Ext.define('Shop.store.ProductsStore', {
extend:'Ext.data.Store',
storeId:'ProductsStore',
autoSync:true,
model:'Shop.model.ProductModel',
pageSize: 15,
remoteSort: true,
proxy:{
type:'ajax',
api:{
<?php
namespace ODM\Proxies\__CG__\Documents\Shop;
use Doctrine\ODM\MongoDB\Persisters\DocumentPersister;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ODM. DO NOT EDIT THIS FILE.
*/
class Catalog extends \Documents\Shop\Catalog implements \Doctrine\ODM\MongoDB\Proxy\Proxy
using System;
using UnityEngine;
using System.Collections;
public class Device {
//**************************************************************************
//
// Const
//