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
private void newMessageHandler(object _sender, NewMessageEventArgs e) | |
{ | |
// Здесь вы можете обработать данное событие, e.Text - содержит текст сообщения | |
} | |
//... где-то в коде ... | |
//... там где вы инициализируете общение между желающими ... | |
Communicator MyCom = new Communicator(localPort, destIp, destPort); // Параметры, соответственно: порт для входящих соединений (1), IP того с кем связываемся (2), | |
// порт входящих соединений того с кем связываемся (3) |
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
Долганов С.С., текущие задачи: | |
- Задача 1 (срок к дд.мм.гггг): | |
Небольшое описание, коментарии и проч. | |
- Задача 2 (срок к дд.мм.гггг): | |
Другое описание и бла-бла-бла. | |
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
def product_info | |
product_name_reg = /^#{I18n.t('pages.dashboard.messages.order.new', product: '(.*)', amount: '(.*)', price: '(.*)')}$/ | |
total_reg = /^#{I18n.t('pages.dashboard.messages.order.total', total: '')}(.*)$/ | |
product_name = content.match(product_name_reg).try(:[], 1) | |
total = content.match(total_reg).try(:[], 1) | |
result = total.present? ? '%s (%s)' : '%s' | |
result % [product_name, total] | |
end |
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
company_id = 11973147 | |
wrong_field = :active_reviews_count | |
# before | |
CoreDenormalization::Fields::Company::Reviews.value_as_string(object: company_id, field: wrong_field) | |
sql_for_data = initialize_statement # with company_id filter | |
data = ActiveRecord::Base.connection.execute sql_for_data | |
hash_with_object_key = {data.delete(:object_id) => data} | |
CoreDenormalization::Fields::Company::Reviews.instance.write_data hash_with_object_key |
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
def reload_companies_products(*ids) | |
Company.find(ids).each do |company| | |
company.products.find_each { |prod| prod.transmitter_update } | |
CompaniesSweeper.expire(company) | |
end | |
end |
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
/* | |
* Обработка событий для YML на СК | |
* | |
*/ | |
app.modules.companyYmlAction = (function(self) { | |
var | |
$clickedButton; | |
function _getContentForPopup(options) { |
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
# coding: utf-8 | |
class MeasureUnitCache | |
include Singleton | |
def self.find_similar_to_name(name) | |
instance.data[name] | |
end | |
private |
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
# coding: utf-8 | |
class CreateCompanyStatisticsExpModels < Core::Migration | |
def self.up | |
with_connection Statistics::DbBase.connection do | |
Statistics::DbBase.transaction do | |
execute "CREATE SCHEMA statistics_exp" | |
create_master_table("statistics_exp.company_statistic_geo_by_months") do |t| | |
t.integer :company_id, :null => false | |
t.date :date, :null => 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
date = Date.parse('2014-07-31') | |
week = CoreStatistics::Base.new.get_week_by_date(date) | |
CompanyStatisticLog.transaction do | |
CompanyStatisticPagesByMonth.process date | |
CompanyStatisticReferersByWeek.process week | |
CompanyStatisticReferersByMonth.process date | |
CompanyEventLog.clear_if_needed | |
end |
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
/*****************************************************************/ | |
/* BIFF-stream (excel file) parsing */ | |
/* */ | |
/* This file is part of catdoc project */ | |
/* (c) David Rysdam 1998 */ | |
/* (c) Victor Wagner 1998-2003, (c) Alex Ott 2003 */ | |
/*****************************************************************/ | |
#ifdef HAVE_CONFIG_H | |
#include <config.h> | |
#endif |
OlderNewer