think positive
2025 on Tumblr: Trends That Defined the Year

Andulka
★
One Nice Bug Per Day

Origami Around

bliss lane
Not today Justin

izzy's playlists!

PR's Tumblrdome
No title available
No title available
Doug Jones
Sweet Seals For You, Always
Lint Roller? I Barely Know Her
Xuebing Du

No title available
todays bird
Game of Thrones Daily
𓃗

roma★

seen from Poland
seen from United States
seen from Vietnam

seen from United States

seen from United States
seen from United States
seen from Romania

seen from United States
seen from United States
seen from United States

seen from United States
seen from United States
seen from United States
seen from United States

seen from Malaysia

seen from Saudi Arabia

seen from United States
seen from United States
seen from United States

seen from United States
@kimooz-blog
think positive
Naqeshny: What is Your Color ?
www.naqeshnny.com
Three years ago Gowalla’s journey began when I took a photograph of Lake Tahoe on my iPhone. I had just finished a phone call with my dad, and I wanted nothing more than to share that photo and place with him. Not just in a text message or status update sort of way, but with a bit of weight...
betalist:
Planoroid is a web based service for project planning and management built around simplicity, mobility and quickness.
Frustration out of the lack of simple and cheap planning tools combining management capabilities, online and offline, is the main motivation behind Planoroid. With a fairly simple UI and fast learning curve of the features, Planoroid aims to replace the usual tools used to plan and manage various projects.
Sign up here
Project Planning and Management in one Place, Reserve Your Spot on www.planoroid.com
In less than 12 hours and after the great presentation of @l0gicpath in #SWCairo tabshora got
4 big clients
2 investors offers
150+ private beta Registrar
What a Bang!!!!!!!!!!!!!!!
Facebook Closure
since the starting of 2011 and many claimed that facebook will close on 15-3-2011 and that you have to remove your photos and videos before that date to avoid any data loss . unfortunately Many believed this false claim and some started removing their photos and videos from the website.it didn't stop till here but others kept sharing this link http://page-facebook-2011.weebly.com/ which says that facebook will be a paid service instead of being free, Commen sense says that if facebook wants to announce this could have announced it on everyone's homepage as a notification or the Url should look like this http://page-facebook-2011.facebook.com/
Moreover that link is a subdomain for a service called Weebly which is a free tool to create websites online so do you think that the multi billion company will use this service to create this page !!!!!!!!!!!!!!!!!!!
Random choice - eh, I mean sample - of an array's elements
rubyquicktips:
Need a randomly chosen element from an array? There’s a method for that! Array#choice (Ruby 1.8.7) or Array#sample (Ruby > 1.8.7):
[1,2,3,4,5,6,7,8,9].choice => 5 [1,2,3,4,5,6,7,8,9].sample => 8 [1,2,3,4,5,6,7,8,9].sample(3) => [3,8,9]
Rails Sending Non ASCII in XML
during working on a project @ MashLtd , I faced a problem which nearly made me cry :) :), my task was to send XML containing Arabic characters.
the Good news is that Rails sends all XML data in Utf-8 encoding by default but
The bad news is that Rails converts any non ASCII characters to a format called XMl decimal entity format
so every time you write the following code
render @object.to_xml
you find this format showing up
I searched online but unfortnetly i didn't find a way to solve this problem
so i had to do it by myself :)
The problem is caused from the gems called Builder as it has a method called escape under XMLBase class this method does the following
private
def _escape(text)
text.to_xs
end
(dot)to_xs is the method which converts the data to entity format
So all what you have to do is just override the method and remove (dot)to_xs
you have to create a file in the intializers and name it for example patch_for_xml
then add in it the following code
class Builder::XmlBase < BlankSlate
private
def _escape(text)
text
end
end
this is called monkey patching , it is used to override classes you could use any others if you like
Rails 3 and html escaping
before Rails 3 you had to do the following to escape html
<%=h @user.name%>
but after Rails 3 the html is escaped by default so if you just wrote
<%= @user.name%>
the html is escaped by it's own
to unescape html in Rails 3 you have to do the following
<%= @user.name.html_safe%>
Array#first and Array#last parameters
rubyquicktips:
Did you know you can pass a number parameter to Array#first and Array#last?
x = [1,2,3,4,5,6,7,8,9,10] x.first 5 => [1,2,3,4,5] x.last 2 => [9,10]
This tip was submitted by Alfred Nagy.
Authentasaurus with Rails 3
After launching of rails 3 many developers started update their gems to be rails 3 compatible , the following is a detailed tutorial showing how to install and customize authentasaurus in a Rails 3 application
To use authentasaurus you will need to include it in your Gemfile.
gem "authentasaurus"
then install it using
bundle install
generate authentasaurus configuration and tasks by
rails g authentasaurus
now it is the time to create authentasaurus necessary migrations
rails g migration authentasaurus_tables
then make it look like this
def self.up authentasaurus_tables end def self.down authentasaurus_drop_tables end
then migrate your database
rake db:migrate
run authentasaurus defaults by
rake authentasaurus:setup_defaults
now u can create your views
rails g authentasaurus:views users
*users is the users controller you are creating the authorization on
you can now add your routes by
authentasaurus_routes :authorization
now authentasaurus is ready to start you can start your server and go to
http://localhost:3000/users
if your user controller is under a namespace then you should do the following
rails g authentasaurus:views admin/users
*users is the users controller under admin namespace
you can now add your routes by
namespace :admin do authentasaurus_routes :authorization end
then you must create all used authentasaurus controllers under admin namespace
for example admin/users_controller should look like this
class Admin::UsersController < ApplicationController acts_as_users end
admin/areas_controller should look like like this
class Admin::AreasController < ApplicationController acts_as_areas end
some important notes about authentasaurus
areas are controllers in the application. You can retrieve new areas using
rake authentasaurus:create_areas
authentasaurus gives you three options of authorization which are: :authorizable, :validatable, :invitable check documentation for more details
authentasaurus default admin login details
Username:admin Password:Pass@123
Rails quick tip
rubyquicktips:
You know you can access the 42nd element of an Array like this:
my_array[41]
In Rails, you can also access this element with the forty_two method:
my_array.forty_two
Check out the Array#forty_two method.
cousine:
who said linux is ugly !!??
SMPP send Text UTF 16
One of the biggest issues when using SMPP to send text messages is that you want the output request from your application to be able to send text in UCS2 format especially if you are sending text in Arabic language
You Can solve this issue in ROR by the following:
After installing your SMPP plugin, you have to change your data encoding to int 8 by adding this line to the configuration file :
:data_coding: 8
or
editing the following file
RAILS_ROOT/vendor/plugins/ruby_smpp/lib/pdu/submit_sm.rb
got to line 30 and change the code to the following
@data_coding options[:data_coding]?options[:data_coding]:8
changing the data_coding to 8 means that the output format will be UCS2 which is a 16 data bit coding
after changing the data coding you have to change the text encoding to UTF-16 so as any mobile device can understand it
go to your Model and add the following method
def self.send_notification(mobile,message) sms = SMSWrapper.new string= Iconv.conv('UTF-16BE','UTF-8',message) r = sms.sendSMS(mobile, string) RAILS_DEFAULT_LOGGER.info "===>SMS successfully sent" end
all what we did is that we converted the text From UTF- 8 to UTF- 16 Big Endian so as to be supported by the UCS2 format
Bue Website Launched
Bue has launched it's new website which is as they say part of the development process and quality enhancement in the BUE :d
this is a screen shot of the old website
and that is a screen shot of the new Website :D (you can check it on this Link)
Really seems that there No Hope in this University :S:S:D
what's your opinion?
Bue New Website
I received an email today saying that
Dear Colleagues and Students,
As part of BUE development process and quality enhancement programmes, I am pleased to introduce our new university web-site. As you might all know, the web-site is considered – today – as an important marketing and information dissemination tool for modern universities. It represents also a major factor that affects the success of a university to achieve higher regional and international ranking.
At last they released that they have th e worst Website ever and that it should be changed immediately but the problem is that it is not just the website that should be changed:S
As they say they are changing their website w hich is a part of development process and quality enhancement but in the same time they refused to offer scholarships to their students who won the first and second place in the worlds largest Robotics Competition, they also didn't improve their It system which is just a Mess , they also didn't solve the problem with Q&V as some students may suddenly find themselves at the end of the year failing a subject in first semester although they had a transcript saying that they passed it , they also didn't solve the problem which is happening to their students due to lack of available trainings in summer and they also didn't deny the rumor which said that they decreased all students results this year because next year the number of newcomers is much less so as current students pay more to solve the shortage, they also forgot to replace their e learning system which is an open source software "for free" and full of defects, they also forgot to upgrade their servers which are very old and weak, it can't stand any overload(on transcript day we stayed 3 days so we can access our transcripts).
Is that the development process and the quality enhancement ure talking about
With all respect to the great Doctors in the BUE but really this University is just Mess:S