Prime 357

We'll learn something

Site Menu

  • Home
  • Recent Posts
  • Forum
    • Programming Languages
      • C++
    • Website Design & Content Management
      • Wordpress >> Drupal
  • Blogs
  • Books
    • C++
    • Changing hosts - Dummies Guide
    • Wordpress >> Drupal
  • Download Centre
  • Contact us
Home


Image - OpenID

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password

Navigation

  • Recent posts

Books

  • C++ (The Book)
  • Changing Hosts - a Dummies Guide
  • Wordpress to Drupal

Recent comments

  • Thanks
    2 weeks 1 day ago
  • I'm running the conversion
    3 weeks 4 days ago
  • Can't reproduce
    3 weeks 6 days ago
  • Strange one
    3 weeks 6 days ago
  • No customer support
    5 weeks 2 days ago
  • Came to the rescue
    6 weeks 6 days ago
  • Permalink - %postname%
    7 weeks 5 hours ago
  • Downloads are now ready.
    7 weeks 1 day ago
  • Sorry, I'm just having some
    7 weeks 1 day ago
  • Awesome
    8 weeks 2 days ago

New forum topics

  • funny little bug in mac version
  • Error: Unable to Insert into Node_revisions table when converting from wordpress 2.6.0 to drupal 6.4
  • index.php?
  • where do i download?
  • Source connection settings are correct but it appears it's the wrong database
more

Who's online

There are currently 0 users and 0 guests online.

Who's new

  • puzz1ed1
  • bugmenot
  • ClaudiaB
  • beiduo
  • chourmovs

RealBasic

Code - replace html entities with symbols

Submitted by Steve on Wed, 25 Jun, 2008 - 16:04
  • PHP
  • RealBasic
  • code

As a result of an enquiry from this forum post I followed up with a very quick "pseudo code" version of how to strip HTML entities from code and replace them with their corresponding symbols.

The Drupal Aggregator module also suffers from the fact that post titles are not HTML rendered. Even though the following code is not PHP but rather Realbasic I'm sure any skilled PHP developer should be able to convert/translate to PHP.

Without further ado, here's the code.

Function Convert_Html_Code_To_Symbol(pStr as string) As string
  // Version 1.04 - 2 Jun 2008.
  // Converts raw text, containing html symbol codes such as (" &) to their numerical equivalents (" &)
  // The numerical codes are retrieved from 'charactercodes.txt' text file in same directory as this program.
  // After codes changed to numerical codes then the string can be run through the RegEx converter, changing to symbols.
 
  Dim intPos as Integer
  Dim intAmp as integer
  Dim intSemiColon as integer
  Dim intLen as Integer
  Dim strKey as string
  Dim strReplace as string
  Dim strDone as string
 
  Dim x as Integer

  intLen = len(pStr)
  intAmp = instr(pStr, ";")
 
  While len(pStr) > 0
   
    intPos = instr(pStr, "&")

    if intPos = 0 then
      strDone = strDone + pStr
      pStr = ""
      exit while
    else
      if intPos > 1 then
        strDone = strDone + left(pStr,intPos - 1)
        pStr = right(pStr,len(pStr) - intPos +1)
      end if

  • Login or register to post comments
  • Read more
  • 114 reads

Change of Focus

Submitted by Steve on Tue, 17 Jun, 2008 - 22:50
  • C++
  • PureBasic
  • RealBasic
  • study

Change of focus as regards IT Self Study. I haven't touched C++ since the start of April, this year, but have every intention of finishing the book. No doubt I will have to cover some old ground just to come up to speed again, if anything, that's the frustrating part.

The question is why I haven't continued with the self-study. At the start of April I got involved with creating this site and then shortly after that decided to update my Realbasic application that converts Wordpress Blogs to Drupal. The whole point I was learing C++, leading towards the GUI aspect, is that I could do away with Realbasic and not be held ransom to their pricing structure.

Image - PureBasic

The change comes as of a few hours ago I ordered my copy of PureBasic. This software package is attractively priced and better still, the price covers all future upgrades. Better still, yet again, I have access to the Windows, Linux, Mac and Amiga versions.

This version of basic is implemented slightly differently than Realbasic and Visual Basic so there will be a slight incline of a learning curve to come to grips with the basics. From what I've read thus far it shouldn't be that difficult.

I've also got Ruby waiting in the wings but I've got a feeling it'll be waiting there for a while.

As of tomorrow, I'll go searching for some tutorials, get use to some of the basics and then, maybe within a week, start to the process of converting my Realbasic Wordpress to Drupal converter to Purebasic. That process will be part of the learning experience, so it will take time. That's not to say that I won't stop any Realbasic development. If a bug is found, I'll fix it and release a new version.

  • Steve's blog
  • Login or register to post comments
  • 86 reads

New Directions

Submitted by Steve on Fri, 30 Nov, 2007 - 21:32
  • C++
  • RealBasic
  • study

About 5 weeks ago (20 Oct, 2007) I wrote that I wasn't happy with being locked into a software development package, Realbasic, and as a result was looking around for other programming language(s) to learn. I say 'locked in' as my current pet project, the Wordpress to Drupal converter, has come to a stand-still. In my current version of Realbasic, the programming language used to create the converter, there is a bug relating to Windows Vista and MySql. In short I've been told that the next version of Realbasic rectifies this problem. The issue I have is that my licence period has expired which means to receive updates involves renewing my licence.

Since that entry of 5 weeks ago I've been all over the shop with which programming language(s) to learn/study and have since changed my mind slightly from what I wrote back then. Back then it was all systems go to study the Ruby Programming Language. Ruby is still in my sights but at the moment is on the back-burner.

My ultimate aim hasn't changed in that whatever programming language I study it must be open source and deployable cross platform. My rational is that I don't want to be at the mercy of a proprietary company or in other words 'locked-in' and very difficult or costly to continue development. The situation I'm presently in.

I mention the situation I'm presently in, though I believe it's a blessing in disguise. I'm getting off my arse and purposely sinking my teeth into new areas.

I checked out many different languages including, Java, C++, Ruby, Basic to name a few. The upshot is that I eventually decided on C++. Why C++ and not the others. Isn't C++ really difficult, awkward and generally not very user friendly. The answer is 'yes' but if it was easy, wouldn't everybody be doing it.

As you've probably gathered I'm not approaching C++ as a complete novice. Some years ago a component of a computer course I undertook involved an introduction to the C programming language, a precursor to C++. The course also included exposure to Cobol, Visual Basic and Access Database, though I was already well and truly familiar with those languages (except Cobol - never want to see that again). After the course, about 2005, I started studying C++ and as a result amassed a heap of books, that in itself cost a small fortune.

In 2005 I didn't quite finish my self-study. Looking back I suppose I can lay the blame on my other project, which was into its 10th year at that time (and still going strong today). In a nutshell I designed, developed and implemented an investigation program, known as 'TaySys - Criminal Case Management System' which was written entirely within Microsoft Access. This was at my initiation for my employer, Victoria Police, Fraud Squad. Due to updates and fixes required, usually at my initiation, interfered with my C++ study and ultimately all continuity went out the window. I might add that I am not employed as a programmer (should be) merely a detective.

So here I am now. Why should this time around be any different. Well for starters, I'm now on 6 months long service leave. As you can imagine I've got a heap of time on my hands and this time around I'm going to be more disciplined in my study. For one, I'll be logging my time spent and recording what learnt in a session along with a to-do type list. I'm going to take my time with the subject and not speed read. I'm sure we've all done this, read something once, yep - understand that, makes sense and move on and before we know it 2, 3 or 4 chapters have gone by in the space of 20 or 30 minutes. I'm actually taking notes, as if I had to pass a test at some point in the future. I find merely writing out my summarised version helps me understand the topic more so, of course this takes time but time, in my case, well spent.

Well that's all for this entry. Next entry should be a follow-up relating to the resources that I'm using to achieve my goal.

Nearly forgot, I'm already 2 weeks into my study, 29 hrs for the first week and currently 15 hrs for the second week. Maybe I should create a table for those sorts of stats.

  • Steve's blog
  • Login or register to post comments
  • 146 reads

Timely Update

Submitted by Steve on Sat, 20 Oct, 2007 - 20:54
  • CMS
  • RealBasic
  • Drupal 5.x
  • Ruby
  • Wordpress 2.1/2.2

New Wordpress Version 2.3

Apparently Wordpress 2.3 is out. Unfortunately the converter program, Version 5-07, will not convert this version. The main reason being is that some table names have changed. I've not looked any deeper than that for reasons to follow.

I'm unable to address this in the short term as things have conspired against me, preventing further development. One of those things is that I upgraded from Windows XP to Vista and in that process my version of Realbasic 2006r4, which is the program I use to develop the converter, contains a bug relating to MySql. The particular bug prevents program compilation, that is, converting it into an executable file. The RealBasic people tell me that that is fixed in the next version but that will cost me more dollars to upgrade.

Ruby Programming Language

I'm now looking into using another development environment to continue on with this pet project. The two main factors are that the development framework is free (or relatively cheap) or open source AND is available on all three major operating systems.

In my travels I've come across the Ruby Programming Language which is also the driving force behind the Ruby on Rails system (Web Development). These systems are 100% free, open source and cuts across all major operating systems.

  • Login or register to post comments
  • Read more
  • 200 reads

Character Encodings

Submitted by Steve on Sun, 8 Apr, 2007 - 21:29
  • CMS
  • RealBasic
  • Drupal 5.x
  • encoding
  • Wordpress 2.1/2.2

An encoding problem has reared its ugly head and giving me no end of grief.
At the Wordpress end, type in (or more commonly paste in) this line of text:-

“Mares eat oats–and does eat oats—and…little lambs eat ‘ivy’.”

I'll point out that the double quotes starting and ending the line of text are not double quotes, they are in fact curly quotes. Try and find them on your keyboard. Chucked in for good measure are a few other non-standard type characters.

  • Login or register to post comments
  • Read more
  • 221 reads

 Subscribe in a reader

free hit counter


RoopleTheme