Saturday, July 28, 2012

Unicode chars for arabic numbers

1 :  ١ ١
2 :  ٢ ٢
3:   ٣ ٣
4 :  ٤ ٤
5 :  ٥ ٥
6:   ٦ ٦
7 :  ٧ ٧
8 :  ٨ ٨
9 :  ٩ ٩
0 :  ٠ ٠

Writing Vertical Text with CSS

How to draw vertical text with CSS cross-browser ?
this is a simple css to write a vertical text

<style type="text/css">
p
{-ms-transform: rotate(270deg);
-ms-transform-origin: 50% 50%;
-o-transform: rotate(270deg);
-o-transform-origin: 50% 50%;
-moz-transform: rotate(270deg);
-moz-transform-origin: 50% 50%;
-webkit-transform: rotate(270deg);
-webkit-transform-origin: 50% 50%;
font-family: Arial, 'Times New Roman';
font-weight: normal;
font-size: 25px;
position: absolute;

/* for Arabic */
direction: rtl;
}




// For IE 8 and older 
  
    <!--[if lt IE 9]>  
<style type="text/css">
p
{
writing-mode: tb-rl;
filter: flipv fliph;
}
 </style>

<![endif]-->

Wednesday, July 18, 2012

How to unsubscribe from Mobily and STC (KSA) Facebook SMS Service

Facebook SMS Service is nice feature and it can be setup easily through Mobile tab on your Facebook Account Settings, after that you will start receiving messages according to your preference. The mobile provider will charge you a certain amount by weekly or monthly basis to keep sending it. but if you need to remove the Facebook SMS Service, it is not easy as you think, even if you removed your mobile number from Facebook Account Settings the Mobile Operator will keep charging you . I faced this issue on my Mobily (Saudi)number, every Friday morning I will get two messages stats “ your last call costs SAR 3” and “ you are still registered to the Mobily Facebook SMS service”. I called customer support, went to their office nothing happened. finally I got a solution one of my friend working as a mobile technician.
The solution is as follows

Mobily 
Send a SMS to 606050 contains“UF” without quotation marks in subject field.
if you need to subscribe again send “F” to 606050.

STC 
Send a SMS to 86677 contains“UF” without quotation marks in subject field.
if you need to subscribe again send “F” to 86677.

Reference:
ShameerOnline
http://www.shameeronline.com/how-to-unsubscribe-from-mobily-ksa-facebook-sms-service/

Saturday, March 31, 2012

How to get page width & height (cross-browsers) with javascript

I spent many hours trying & searching for a stable function working fine across the different browsers and at last i found this code which i can say it's amazing code, type of my favorite way in writing down coding (simple & effective).
This function worked fine and tested on

  • IE 6, 8, 9
  • Opera 11.62
  • FF 11.0
  • Chrome 19.0.1084.1 dev-m
  • Safari 5.1.5
  • Comodo Dragon 18.0
  • Avant browser ultimate 2012 build 28

function GetPageXY() {

var PositionXY = { Width: 0, Height: 0 };
var db = document.body;
var dde = document.documentElement;
PositionXY.Width = Math.max(db.scrollTop, dde.scrollTop, db.offsetWidth, dde.offsetWidth, db.clientWidth, dde.clientWidth);

PositionXY.Height = Math.max(db.scrollHeight, dde.scrollHeight, db.offsetHeight, dde.offsetHeight, db.clientHeight, dde.clientHeight);

return PositionXY;
}

Reference:
Get document height (cross-browser)    James Padolsey

Wednesday, March 7, 2012

Adding HTML5 Drag and Drop to SharePoint Lists

Microsoft SharePoint is an enterprise platform with a long history and vast variety of features, which is why it can’t always react quickly enough to follow emerging Web technology trends. Despite a wide enterprise adoption of SharePoint and a huge effort to provide a broad number of features, SharePoint still lags behind modern CMS products in terms of immersive UIs, such as HTML5 and CSS3.
Continue Reading on MSDN Magazine