Syria Events

Syria Events is a web site I found very useful which let’s me up to date on all kinds of events that will happen in Syria.

It has a very easy to navigate calendar presented in a clear way with many possible views (Yearly, Monthly, Weekly, Daily, as a List, by event category … etc).

They also have an RSS feed service explained here which let you be updated on the Syrian events sorted by upcoming events. Or if you like, you can register and receive updates by Email on the events which are in your interest.

Do you have an event you want to share? Syria Events also have that. You can go here and start adding events.

It is nice to see useful new Syrian web based services emerging, especially in the time where the Internet service in Syria is still weak.

I’m sure the Internet business in Syria is promising and will grow as soon as the Internet service gets improved and attract more Internet Users.

Engaged

Graduating from school, from the University, and getting the first job - those things are nothing like getting engaged and married. Getting engaged and married are the next big thing after you are born! A new shift in life.

On Sunday 29/06/2008 I became officially engaged :)

This is so beautiful. I hope everybody gets the chance to do this.

SyriaTel releasing a new service - My Backup

One of the two Mobile networks in Syria, SyriaTel, is about to release a new service called “My Backup”.

The service let you backup your mobile by first installing a software from the company (a .sis file some program) and then it uploads all kinds of data from the mobile like the SMS, MMS, Contacts, Calendar, and folders to be stored online, where you can manage them.

I heard the service will be like a subscription, there is a 3 months plan, 6 months, and a year subscription. The one year subscription costs 350 S.P (~$8). Without GPRS costs probably.

This service is especially useful when you lose your mobile or when it gets stolen, so then you can restore your mobile data.

I see this as a really cool feature and great advance in services provided by the SyriaTel.

There is a service which I’ve been using for a while to back up my mobile and it is Mobile Network independent, which is ZYB. The only thing I miss with ZYB is that it doesn’t backup MMS, SMS, nor special folders.

Read Sharepoint 2007 Scale Survey with some statistics

Just an hour before letting the employees hit the survey link on our Sharepoint server, the department changed their mind and they doesn’t want the Single Choice for each question Survey I did. They wanted to change the type of the survey from Multiple radio buttons choices for each question(Which returns one Choice) to Scale Survey (GridChoice Survey in Sharepoint terms or Rating Survey) where the vote is of 1 to 5 scale for each point in a question.

Sharepoint does have a Scale Survey, but if you glimps at it you can’t tell who got the best score, which is something they wanted for the “Employee of the month”.

So in the same way I did to read the items of the Choice Survey, I did it again with some modifications. So instead of looking for the “Choice” type, I used “GridChoice”. Also, the value of the response is different. In a GridChoice value you woud see something like:

Co-operation#4#Skills#3#Outgoing#4#Ideas#3#Attendance#2#

This means the employee got a vote of 4 out of 5 for Co-operation,3 for Skills,4 for Outgoing,3 for Ideas and 2 for Attendance.

So now all I had to do is find a way to extract the numbers out of the string and sum up the numbers for each employe. To do that I did the following C# function:


  private int ResponceScore(string expr)
  {
  String[] numbers = System.Text.RegularExpressions.Regex.Split(expr, @”[^\d+]“);
  int total = 0;
  foreach (String number in numbers)
  {
  if (number != “”)
  {
  int num = int.Parse(number);
  total += num;
  }
  }
  return total;
  }

What the funtion does is it recieves the response’s text, use a regular expression to select or extract the numbers in the string, sum up the numbers of the response and send it back to be saved in an array or in a variable (Like adding to a variable for each employee).

So the final code is something like:

 

foreach (SPListItem item in SurveyList.Items)
  {
  foreach (SPField field in item.Fields)
  {
  if (field.TypeAsString == “GridChoice”)
  {
  if (field.Title.ToString() == “Employee Name”)
  {
  empScore+= ResponceScore(item[field.Title].ToString());
  }
}
}

So that is how I managed to do a web part to show the top scores in a Scale Survey in Sharepoint.

Have fun ;)
kick it on DotNetKicks.com

How to read Sharepoint 2007 Survey list and get some statistics

Sharepoint Services is awesome new framework from Microsoft. And these days where I work, I mostly do Sharepoint 2007 and MOSS development.

I got this request where they wanted a Survey. Sharepoint does have survey, but it lacks statistics on the survey. In their Survey, the Choices for all the questions are identical. For example voting on “Employee of the Month”. MOSSAfter responding to this survey, they wanted to show the top employee in each Choice. The style of the answers are Choice type, where the user choose one of the option under the name of the employee. For example:
- Emplyee name 1
Choice 1: Co-Operation
Choice 2: Great Example

- Emplyee name 2
Choice 1: Co-Operation
Choice 2: Great Example
.
.
.

So the best solution is to make your Web Part read from that Survey’s items.

And to do that, we just need to loop through the Items of the Survey List, look for the “Choice” type of field in it and read its content (The choosen Choice. Choice 1 or Choice 2 … etc). The title of the field is the question text(Employee name).

So we need two loops one to look for the items, and one to look for items’ fields with the type “Choice” - then its title and content.

This is the code to do the loops and readings:

using (SPSite mySite = SPContext.Current.Web.Site)
{
using (SPWeb myWeb = mySite.OpenWeb())
{
SPList SurveyList = myWeb.Lists["Employee of the month"];
foreach (SPListItem item in SurveyList.Items)
{
foreach (SPField field in item.Fields)
{
if (field.TypeAsString == “Choice”)
{
if (item[field.Title].ToString() == “Co-operation”)
{
coop += field.Title.ToString() + “,”;
}
else if (item[field.Title].ToString() == “Great Example”)
{
example += field.Title.ToString() + “,”;
}
}
}
}
}
}

Here I used normal string variables to store the names of the employees for each Choice, maybe you would like to use some sort of array instead, but I didn’t since I dont have many questions.

So when the code run, I will have something like the following in my variables:
Co-Operation variable: “Hasan B, Ahmad D, Farah H, Aya K, Hasan B, Amal K, Ahmad D”
Great Example variable: “Tahseen K, Sebhi J, Jafar A, Tahseen K”

Now by counting how many times each name is repeated for each choice, I can get an idea of who got the most votes for each choice.

I used the following C# function to count how many times each phrase or word accured in a string variable:

private string CountWords(string input)
{
char[] delims = new char[] { ‘.’, ‘,’, ‘;’ };
string[] wordlist = input.Split(delims, StringSplitOptions.RemoveEmptyEntries);
SortedList words = new SortedList();
foreach (string item in wordlist)
{
if (!words.ContainsKey(item))
words.Add(item, 1);
else
words[item]++;
}
StringBuilder sb = new StringBuilder();
foreach (KeyValuePair kvp in words)
sb.Append(kvp.Key + “: ” + kvp.Value + ”
“);
return sb.ToString();
}

So now from my Web Part I can write:

writer.Write("Co-Operation” + ”
” + CountWords(coop) + ”
” +
Great Example” + ”
” + CountWords(example))

And the function CountWords will return me the number of times a name accured in that passed string variable which represents the Choice.

For my example the output would look like:

Co-Operation
Hasan B: 2
Ahmad D: 2
Aya K: 1
Amal K: 1
Farah H:1
Great Example
Tahseen K: 2
Jafar A: 1
Sebhi J: 1

This code needs some additions to make it more useful, but I searched on the net, and I didn’t find answer for this, so I thought I would share with you what I got so far. I’m probably going to work more on this.

Hope it helped.
kick it on DotNetKicks.com

Vista DVI problem

This is how I solved a problem which a lot of people are facing when they try connecting Windows Vista computer to a Flat Panel like LCD through the DVI output - you get “No Signal” or such a message from your TV.

I did a lot of research about this, and it seems to be the problem is in Vista drivers and how it handles DVI. If the LCD have VGA it would be much easier since the VGA is Plug and Play.

Microsoft promised to fix this bug with SP1. Now SP1 is out and seems it didn’t really fix the problem! At least it didn’t for me when I was trying to connect the computer with a 52″ Sharp LCD through DVI.

I tried updating the Graphics’s card driver, didn’t help. Tried to use a program called PowerStrip to define custom resolutions to be compatible with the LCD, also didn’t help.

At the end, I replaced the DVI cable with “DVI -> HDMI” cable, and finally it did work!

I didn’t remove the PowerStrip software, because I think I need to use it to define a custom resolution for the big LCD.

Charity Garage Sale

Charity Garage Sale will be held on the 1st and 2nd of March 2008 from 10 AM to 7 PM at the Arabic Cultural Center in Kafarsouseh area - with the sale income donated to Basma(Kids Cancer Support organization) .

Look at this flayer for more info:

Charity Garage Sale Flayer

Kids Cancer Support Walking

Last Friday (15 Feb 2008) Kids Cancer Support Walking 2008 took off in Damascus, Syria.
Kids Cancer Support Walking 2008 in Damascus, Syria

The event was organized by Basma organization and the marketing campaign by U.G.

This walking was arranged to raise the attention and understanding about Kids Cancer, and at the same time try to entertain the Kids.

There were some activities for the Kids like Painting, Painting on the faces, Clowns, lunching balloons, gifts, and some other stuff like small dances :)

A few facts I learned about Kids Cancer and some people should know about:

  • Kids Cancer can effect kids from the ages 1 month to 18 years old.

  • It is curable, but costs so much and needs specialized doctors. Unfortunately in Syria there isn’t enough support. There is one Center in Damascus which is lacking financial support and expertise. The available doctors aren’t much specialized in this.

  • Cancer is NOT contagious! I heard stories saying that some parents lock their infected kids from the world!

Basma is an organization which try to help in this. Visit their site to get to know more about this and learn how you can help.

UPDATE: Here is a small Video capture I took from the event when the kids released the Balloons.

Kids Cancer Support Walking - The best video clips are right here

Zain is about to buy SyriaTel

There are some strong rumors saying that Zain a big telecommunication company is about to buy SyriaTel one of the two mobile networks in Syira.

It looks like the company is becoming a major telecommunication player in the area serving customers in 22 country in the Middle East and Africa with a net income around $820 million dollars a year!

Zain LogoThe rumors can be true since we saw that the company did recently buy a mobile network company called Fastlink in Jordan, and the MTC company which is originally in Kuwait but also has branches in Iraq, Yaman, Sudan, Bahrain, Lebanon, and other branches in ~14 country. So it seems to be a natural move if they did really buy the SyriaTel network.

From what I heard they offer great modern services. There is this cool feature which let you make International call with the fees of a local call! Of course only if both parties have a Zain phone number.

Personally I hope this rumor is true.

My new vHome

Hello all,

Yes I’ve been away for some time, and now I’m back with my new Virtual Home :) so make your self at home and take a look around. You’re welcome.

See you ;)

Kilo of dust on my blog :P

Eh! it’s been a while since I blogged … man .. it’s pretty dusty in here! :)

So what’s up?

Ya summer came swimming, tanning and stuff is really fun … but man I feel down when I see a lot of poor girls wearing cut down clothes, poor them they doesn’t have enough money to buy new not cut up clothes ….. =D hehehe!

And I don’t know if it’s just me, but this summer I’m seeing lot and lot of Engagements going on! Is this is like some kind of wave coming or what :P?

And oh ya! Finally I dumbed my old Nokia 6600 mobile and got Nokia E70, and it is very nice! Maybe I will write my impression about some time later some my fellas who are looking about users review about this mobile would find something.

Cya ;)

10 simple pleasures of mine

Rula tagged me:)!

The tag is list 10 simple pleasures of mine, so I will list anything cross my mind quickly.

  1. The smell of Jasmine while I’m walking to work in the morning.
  2. A nice meal (Shawrma make my day any time :P).
  3. Gadgets!
  4. Make a smile on somebody’s face.
  5. Have Nescafe in the morning with a peace of biscuit.
  6. Go out with friends.
  7. Take a nice photo of anything.
  8. Health and Life.
  9. Watching some nice movie.
  10. News/Conversation from/with the special some one!

That was a quick list.

Now time to tag some people!
I tag GrayFox, Omar, and NK2(3ala rasi el shaghoor walla:D).

You have to list 10 simple pleasures and the rules are as follows:
a. You have to use the picture in my post.
b. You have to list exactly 10 points.
c. You have to tag 3 bloggers when you are done.

Life’s Decoration

You know, Life is decorated with bumps!
There are bumps which makes you jump so high that you can reach up to heaven and grab some fruits! These fruits taste like no other.
And there are those bumps which makes you feel beat, let down and unhappy.

If you think of it, without having the later one, the first one wouldn’t have that delicious taste.
Plus after those bad bumps you will be stronger and more adopted for the future.
So maybe bad bumps are not so bad after all?

I had one of these bad ass bumps lately and that’s what made me forget about the blog.
Thanks for your concerns!

See you guys ;)

Araby Search Gadget

I was trying to make a Gadget for Vista sidebar, and this is what I came up with, the Araby Search Gadget.

These Gadgets are like small software, not electronic kind of Gadget :)

Araby is a new cool search engine which I think is promising for Arabic content searching. I heard about the people who are working on it, and they seem to be good.

This Gadget can be installed in Windows Vista or in your Live.com account(I didn’t try it on web!).

If you would like to develop your own Microsoft Gadget, take a look here. It is not that hard!

You can find my Araby Search Gadget on Microsoft’s web site here.

I know not many of you is using Windows Vista (Including me!, tried it.), but I thought maybe some body might find this helpful.

Have fun ;)

New Train in Syria

Last week my cousin told me that she is thinking of going to Homs by train! So because I was bored of the things we usually do with friends, I was ready to try anything new, so I accepted right away and was excited!

Of course she called more cousins and her friends, got a bunch of people and got our self to the train station at around 3 pm on Friday! Ya I know it is late, but I didn’t care, I thought the fun will be in the train mostly, not in Homs :P

As we arrived I quickly noticed how they made the Train station to have this old look, which is kinda cool.
Damascus Train Station
Then I saw the Train behind the building and it looked good! Shiny and clean.
The Platform looks cool, you know with the clock that you normally see on the Platforms.
The new Train
Next went to take the tickets. The first class ticket in the fast train costs 165 SP (~$3) which is pretty cheap I think.

Took the tickets and headed to the Train.

I was surprised as I got inside! It looks better than an airplane! The seats are huge, big space between the seats, a small LCD which shows DVDs, and it just looked so good and new! It was like another world, not Syria! We took a while until we settled down, after a little while two girls comes asking what would you like to drink coffee or tea and a newspaper plus sealed brand new head phones to plug them in your seat and listen to the movie (They had Terminator 2 on!). They even have a big room for kids to play!

We were prepared to go crazy, had the drum with us (Derbakeh!) and all expecting the train to be, well, less classy! We were expecting something like those old long big buses! So we were embarrassed a little at the beginning, but then we kicked off :P and other people on the train enjoyed it, because the guy in charge there came with his suite and tie and stuff, telling us please we will have troubles if some body complains,oh man:P, but then we asked the other people and they didn’t mind :)!

The train went smooth and was very comfortable, we arrived to Homs in about 2 hours and a half. But after we arrived around 6 pm and the Train continued to Aleppo. As we got off the train we discovered that we landed in some sort of Industrial train station! Where they get Goods loaded and unloaded! .. We asked for the return train and they said the next one is at 2 am or 3 am! But we wanted to get back on the same day :S! So the guy said there is one will come in 30 min!! … So we had 30 min there, my cousin and her friends were loaded with tons of sandwiches and every kind of chocolate and chips :D! Eat eat eat, go crazy a bit … then the train came! Heh .. we spent only 30 min on the ground in Homs:P..but what the hell it was good time anyway …. the return train was kinda the opposite of the one we took to Homs! … I felt it is like the old ones you see in Russia!Did you get the picture?…Eh, but it was fine. It was a really fun small trip.
Homs industrial Train Station
Oh man I went on and on a lot! Excuse me! The point is, it is good to see a good train like that here in Syria, and it really made me wish if they just put more of these for into town and get rid of the over flowing number of Micro Buses! I’m really bored of this polluted atmosphere.

Go and try it ;)