Posts

Passing current scope to an AngularJS Service

var app = angular.module('as2App'); app.factory('AlertService', function($timeout) { var _scope = {}; //constructor function alertService(scope) { this._scope = scope; this._scope['show_alert'] = false; this._scope['alerts'] = []; } alertService.prototype._addAlert = function(type, message) { this._scope['alerts'].push({ type: type, msg: message }); this._onShow(this._scope); } alertService.prototype._onShow = function(_scope) { this._scope['show_alert'] = true; $timeout(function() { alertService.prototype._hideMe(_scope); }, 2000); } alertService.prototype._hideMe = function(_scope) { _scope['show_alert'] = false; _scope['alerts'].splice(0, 1); } return alertService; }); //########### SERVICES ############## //########### CNTROLLER ############## var app = angular.module('as2App'); app.controller...

Node JS - Redis All Page Caghing. XML return using redis hmset() and hgetall()

var full_url = req.protocol + '://' + req.get('host') + req.originalUrl; console.log("====== full_url : " , full_url); client.hgetall("full_url_hash", function (err, result_hash_object) { if ( result_hash_object != null && result_hash_object[full_url] != null && ( utils.undefined_check(result_hash_object ) != "" ) && ( utils.undefined_check( result_hash_object[full_url] ) != "" ) ){ console.log("full_url_hash vast cache find. Return xml page directly sending: " , full_url); res.set('Content-Type', 'text/xml'); res.send(result_hash_object[full_url] ); } else { //some workers and process and var hmset_url = client.hmset("full_url_hash", full_url, vast3_xml); if (hmset_url){ console.log("full_url...

Yazılım Evleri

Yazılım Evleri Yazılım Evleri Tanım Yazılım Evleri ; çeşitli firma ve şirketlerin  , devlet kurumlarının   yazılım ve yazılıma bağlı sistem ihtiyaçlarını , belli şartlar üzerinden  karşılamak amacıyla kurulmuş ,   yazılım geliştiren  şirketlerdir. Ufak bir ofis ya da ev içinde kurulu bir yapısı olabileceği gibi zamanla büyüyerek kurumsal yapılara da ulaşabilirler. Genel olarak    10 -  12  kişilik ekiplere sahip olabilirler. Proje imkanlarına bağlı olarak çalışan sayısı  çok daha fazla olabilir. Yazılım Evleri İşlevleri Nelerdir ? Yazılım Evleri genel olarak şirketlerin yazılım ve bu yazılıma bağlı olarak sistem ihtiyaçlarını karşılarlar. Yazılım ihtiyacı olan her türlü firmaya destek verebilirler.  Gelişen teknolojik imkanları kullanarak , firmalara teknolojik danışmanlık hizmetlerinde bulunabilirler. Gelişen teknolojiye paralel olarak projeler geliştirebilirler , AR-GE çalışmaları yürüt...

Rails Resque Conf

Rails Resque gem 'resque-status' bundle 1. ) app/workers/transcoder.rb class Transcoder include Resque::Plugins::Status @queue = :transcoder def perform puts "transcoder starting..." end end 2.) config/initializers/resque.rb require 'redis' require 'resque/status_server' $redis = Redis.new RS=Resque::Plugins::Status Resque::Plugins::Status::Hash.expire_in = (48 * 60 * 60) # 2 days in seconds 3.) lib/resque.rake require 'bundler/setup' Bundler.require(:default) # require 'nish-news' require 'resque/tasks' task "resque:setup" do ENV['QUEUE'] = '*' Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection } end 4. ) Procfile web: bundle exec rails s -p 3000 worker1: bundle exec rake environment resque:work QUEUE='transcoder' and foreman start https://gist.github.com/muratatak77/bbe743e379add276cf59cc...