WordAds, when will it be introduced on JetPack for self-hosted WordPress Users?

As defined by WordPress,

WordAds is the official WordPress.com advertising program which lets you monetize your hosted blog.

Here is more about WordAds if you like to read more details.

WordAds has been introduced to WordPress on Nov 29, 2011 and since then is running on more than ten thousand sites.

The only problem is that WordAds at the moment is only enabled for users hosting their sites on WordPress, this excludes all the millions of  sites who are hosting a WordPress blog on their own servers.

Update:

I just went to WordAds site http://wordads.co/plugin-setup/ and it seems that WordPress have already enabled the Beta program for self hosted WordPress users having jetpack.

Also I went to here http://wordads.co/signup/ and I am able to apply my site to WordAds…

This means that WordAds is already active on Jetpack. Too bad I don’t have enough visitors on notesfromanerd.com to apply to WordAds. So who knows, :), maybe sometime in the future

 

Mixing running with programming with video editing…

so here is what i’ve been up to…

One of my favorite hobbies is running and of course programming is another. I have recently started recording my Starcraft II Heart of the Swarm videos and I had to commentate my games and edit and upload them to youtube… so in the process of doing all that, i discovered i had a new hobby which is video editing.

So what does a nerd with three such hobbies do? Mix it all together and the result is this:

Standard Chartered Dubai Marathon 2014

 

So what is so special about this video? Good question, and here is your answer:

  1. The video was taken while I was running a full marathon, 42.195 km or shall we say 26.2 Miles for my dear american readers who have no idea what a KM is :p. (i.e. first hobby running)
  2. I had to edit the video to remove the bad footage and put it all together. (i.e. second hobby video editing)
  3. I used programming to
    1. sync and embed (distance, elapsed time, elapsed distance) from my GPS enabled Garmin watch  with my video (i.e. third hobby programming)
    2. extract each runner’s info from the Dubai marathon results page and then sync and embed it with my video  (i.e. third hobby programming)

 

Here is how I did it:

1- I used php code to crawl the results pages from here : dubai.mikatiming.de/2014/ and save them into a csv file

2- After editing my video footage, I wrote down each runners bib, example, 2384,3:53… it means load the info of runner 2384 at the 3 minutes and 53 seconds of the video. I saved this info in a csv

3- During my run, I video taped my watch at the start of the race to know which point does my video and watch coincide at. Then I defined these coinciding points in another csv file.

4- I used extended script in After effects to programmatically create the compositions, solids and text boxes, create key frames, add opacity transitions based on the csv files in steps 1, 2 and 3…

… I rendered the video and here we are…

If you have any questions, or need help doing a similar project, or would like to see some sample code, please feel free to comment on this post and I’ll happy to answer your questions.

The overwhelming digital life of 2013

Yes… Overwhelming, why?

The world seems to be spinning faster, the days are getting shorter and there is simply too many things to do in 24 hours…

I graduated in 2005 as an Electrical Engineer/ Communication and Electronics major, but after 5 years of study, 2000 – 2005 and a 7 years working in the Engineering Industry 2005 to 2013, I found my passion in the IT world, the world which is moving at the speed of light.

I’ve been always a nerdy techy, or that is what i thought. This is what I thought, until i saw other people’s achievements in the world of technology, there is just too much to learn, in blogging/ content management systems blogger, wordpress, drupal, joomla, wix, tumbler, there are just thousands of software platforms, there are too many programming / scripting languages, VBA, ASP.NET, PHP, C#, C++, Java, JavaScript… The mobile technology is moving too fast… I feel that my world is spinning so fast… I feel my days are too short to become a real expert in any of that, and in a very competitive world, mediocrity is a spell for failure.

How do you cope with the fast pace of technology? how do you manage to become an expert in ANYTHING AT ALL if the fast pace of technology is forcing you forward without a chance to go deep to any topic at all?

I am back… whats new?

So, It has been forever seen my last post… many things have changed since last year… Here is a short update:

  • 7 Months ago, I decided to take along unpaid leave to pursue my entrepreneurship dream
  • I designed a new site from scratch. Enjoyed every programming moment, but the results were not really what I expected. In short, the site wasn’t a huge success, so I had to consider Plan B
  • I started searching for a new job and that is how I came across countless job sites, job search engines and job fairs, I tried to take advantage of the experience, so I created another site, Career Watch, that should be useful to anyone who is looking for a job as well.
  • So here I am… after 7 months of hard work, back to square 1… or maybe square zero. Why? I lost half my savings, My websites aren’t doing that well and I simply have to go back to my old job.

 

So I am back, and this time, I am back and I will be blogging daily. I decided to make this blog more casual, less serious. It doesn’t have to be just about programming, web development and IT related topics. It will be really just “notes from a nerd”… If I learn sometime new, I will blog about it, If not, I will just share my thoughts, my plans, my dreams.

Loop though and process all open excel workbooks using VBA

The code below does the following:

  1. Loop though all open Excel workbooks in Excel
  2. Sequentially activate each of the workbook
  3. Do some processing related to the active workbook
  4. Save the workbook then move on to the next workbook
Sub Loop_through_all_workbooks()
   Dim wb As Workbook, x As String
   For Each wb In Workbooks
      If wb.Name  ThisWorkbook.Name Then
         x = wb.Name
         Workbooks(x).Activate
      End If 
      Call Do_some_actions() 
      Call ActiveWorkbook.Save
   Next wb 
End Sub 

Sub do_some_actions
   'here goes some code to be executed in the activeworkbook
End Sub

Loop through all sheets in an open excel workbook using VBA

The code below does the following:

  1. Loops through all sheets in the active excel workbooks
  2. activates each of the sheets
  3. calls myFunction subroutine (which would normally be a set of actions done in the active sheet)
Sub myMainProgram ()
   For i = 1 To Sheets.count
      Sheets(i).Activate
      Call myFunction()
   Next i
End Sub

Sub myFunction ()
   'Do something in my activesheet
End Sub

Load a range of non blank excel cells into an array in VBA

The code below will allow you to

  1. Define a range of cells in excel that contain data ( are non-blanks)
  2. Load the data into an array
  3. Loop through the data (… process the records as needed….)
Sub read_nonblank_cells()
   firstrow = Cells.Find("*", SearchOrder:=xlByRows, LookIn:=xlValues, SearchDirection:=xlNext).Row
   firstcolumn = Cells.Find("*", SearchOrder:=xlByColumns, LookIn:=xlValues, SearchDirection:=xlNext).Column
   lastrow = Cells.Find("*", SearchOrder:=xlByRows, LookIn:=xlValues, SearchDirection:=xlPrevious).Row
   lastcolumn = Cells.Find("*", SearchOrder:=xlByColumns, LookIn:=xlValues, SearchDirection:=xlPrevious).Column
   Dim arrData() As Variant 
   arrData = ActiveSheet.Range(Cells(firstrow, firstcolumn), Cells(lastrow, lastcolumn)).Value
   countarray = UBound(arrData)
   For i = 1 To countarray
      ' Do something with your array
      ' each column of data could be addressed with its index
      ' as follows: arrData(i,n)
      ' where n is your column number

Next i End Sub