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
package news; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Set; |
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
package place; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.logging.Logger; | |
import javax.jdo.PersistenceManager; | |
import javax.jdo.annotations.Transactional; | |
import javax.servlet.http.*; |
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 | |
/** | |
* Контроллер договоров | |
**/ | |
class ContractsController extends AdminController | |
{ | |
public $isDirect = false; | |
public function actionIndex($ContractsGridView = false) | |
{ |
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
SET @broker=3, @product=1, @buy_status=3, @free=0; | |
SELECT price FROM ( | |
( | |
SELECT t1.price FROM underrighting_product_tariffs as t1 | |
LEFT JOIN ( SELECT COUNT(id) AS purchase_count FROM main_purchase | |
WHERE status = @buy_status AND broker = @broker | |
AND product = @product) | |
AS purchase | |
ON purchase.purchase_count >= t1.`from` AND purchase.purchase_count <= t1.`to` | |
WHERE t1.product=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
//Метод парсит запрос и проверяет входные параметры | |
bodyCheck: function (params) { | |
//Входные параметры приходят через пробел | |
params = params.split(' '); | |
return function (req, res, next) { | |
// По умолчанию нет ошибки | |
var error = false, | |
body; |
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
//Метод возвращает массив бюджетов пользователя(для профиля) | |
getUserBudgets: function(user, callback) { | |
// Ищем среди всех бюджетов тот, в который его пригласили | |
db.budget.findOne({membersEmail: user.email}, function(error, budget) { | |
var budgetsArray = []; | |
if (!error && budget) { | |
// Ищем по ownerId бюджета пользователя в базе | |
db.user.findById(budget.ownerId, function(error, user) { |
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
require('nodetime').profile({ | |
accountKey: 'df8e42b0904666b56f5bd4115cfff1a014f52494', | |
appName: 'Fb-api Application' | |
}); | |
// Подключаем модули и определяем переменные | |
var express = require('express'), | |
mongoose = require('mongoose'), | |
fs = require('fs'), | |
config = require('./config'), |
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
// Метод регистрации пользователя | |
register: function (req, res) { | |
logger.warn('Метод регистрации - старт'); | |
// Принимаем переменную email | |
var email = req.body.email; | |
var password = utils.generatePassword(); | |
var deviceToken = req.body.deviceToken; |
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 | |
/** | |
* Installation script for change CMS pages | |
*/ | |
$installer = $this; | |
$installer->startSetup(); | |
// Define pages contents |
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 | |
/** | |
* Installation script for create about block | |
*/ | |
$installer = $this; | |
$installer->startSetup(); | |
// Block content | |
$blockContent = <<<EOD |
OlderNewer