Monthly Archives: July 2010

Salesforce gem update

Today, I made some improvement to ActiveSalesforce Gem. The following method needs to be modified.

      def extract_sql_modifier(soql, modifier)
          value = soql.match(/\s+#{modifier}\s+(\d+)/mi)
          if value
            value = value[1].to_i
            if !(modifier.upcase == "LIMIT")
              # If it is not the keyword - LIMIT, remove it from the SOQL
              soql.sub!(/\s+#{modifier}\s+\d+/mi, "")
            else
              # If it is the keyword - LIMIT, do not remove it from the SOQL
            end
            # SOQL now supports LIMIT clause. If the user is not an app admin &
            # queries Newsfeed or EntitySubscription & without q limit (e.g. > 1000),
            # it would cause MQL_FORMED_QUERY exception:
            # However, OFFSET is still not supported by SOQL.
            # ***NOTE: needs to change it in the gem to make it effective.
          end

          value
      end

Because SOQL now supports the LIMIT clause and enforces it for non admin-users who tries to query the Newsfeed or EntitySubscription objects. (limit > 1000 will cause error), there it is added to preserve LIMIT and remove OFFSET clauses.

Updating memory for MacMini Server

I have a Mac Mini Server with 4 GB memory. I bought it last December. Because I have several applications running on it, I always felt that it is underpowered – not enough memory. After contacting MacSales. The sales rep showed me some 8 GB memory upgrade kit. The new brand NuRAM costs $239.99 for 8 GB expansion.

While it is quite simple to upgrade a MacBook Pro, upgrading MacMini Server is pretty complicated. First, I had to get a putty knife from Home Depot to jack open the case. Then, I had to remove the antennas. Next, I unbolted the screws and lift the machine core, underneath which, I find the memory expansion slot. This videos was really good showing how to do it.

I also attach a picture here, showing which antenna does what.