Naqeshny: What is Your Color ?
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…
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.
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!!!!!!!!!!!!!!!
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 !!!!!!!!!!!!!!!!!!!

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]
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
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%>
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.




