logo
  • About us
  • What we do
  • Our product
  • Recent work
  • Contact

News

  • Summer holiday internships
    April
  • Junior developer position
    April
  • Ecomonkey lives
    December
  • Calling Javascript from Actionscript
    December
  • Fun with PHP permissions
    December
Site Foci
  • Flash XML slideshow
    May
  • Database training
    May

Tech report

Javascript show object

Here's how to show the contents of a object in Javascript

function concatObject(obj) {
  str='';
  for(prop in obj)
  {
    str+=prop + " value :"+ obj[prop]+"\n";
  }
  return(str);
}
  • Tech report

Calling Javascript from Actionscript

I've been grappling with Actionscript (Flash) intregration recently, largely for synchronising the dynamic elements here. In AS2, here's how it's done.

To call a function

Actionscript code

import flash.external.ExternalInterface;

ExternalInterface.addCallback( "methodName", this, method );
function method() {
   trace("called from javascript");
}

Javascript code

function callAS() {
   swf.methodName();
}

To push a variable

Javascript code

  • Tech report
  • Read more

Internationalised database design

The database schema below outlines how a website could be designed from the ground up with Internationalisation (language support).

  • Design (.gif)
  • Design (.xls)

Put this together for a forum post on underscore@under-score.org.uk.

  • Tech report

SELinux will mess with your cURL

Fedora Core 5 ships with SELinux. Even having installed all the requisite Apache, PHP and Libcurl packages, cURL may not work correctly. It's not a package dependency conflict, or a bug - just an overprotective security manager keeping things safe.

I encountered this behaviour when trying to send a post request from my server to another. It manifested itself as a 'Failed to connect to XXX.XXX.XXX.XXX (ip): Permission denied'.

By default 'Allow HTTPD scripts and modules to connect to the network' is unticked in 'system-config-securitylevel' ('SELinux' tab). Relaxing this security restriction solved the problem.

  • Tech report

Naming desktops

Fantastic technologies like RDP and LogMeIn mean that the I'm spending a lot of time logged into remote machines. Like many users, I like my Desktop to look a certain way, so I configure my user account on each of the remote machines to look similar, if not identical, to my local machine. The problem is that I can't always see at a glance what computer I'm working on.

Taskbar naming

Taskbar naming using Toolbars

...but now here's a fix. You can effectively write names onto the Taskbar by configuring a custom Toolbar. Right-click the task bar, select Toolbars -> New Toolbar. Windows prompts you to select a folder, intentionally one containing a set of shortcuts making up this toolbar.

  • Tech report
  • Read more

Setting up sshd for Windows

Cygwin provides Unix/Linux services for Windows. For small organisations, those without a dedicated Linux server, Cygwin enables tunneling of less secure services, such as Windows Remote Desktop Connection (RDC) through port 22 (SSH). Crucially, it mitigates the need for exposing insecure ports to the Internet, which compromises security and increases the likelihood of digital intruder attacks.

The following instructions comprise a rough guide:

  • Install OpenSSH, and dependent packages, using the Cygwin installation tool (CTRL + click to run)
  • Tech report
  • Read more

Negative % mod alternative

In writing this circular buffer class, I was faced with an interesting problem. I wanted to pass a negative offset (e.g. -2) to the get() method, but bound that within the range of allocated array cells (e.g. 0-3).

One option would be to rely on Java's mod function: e.g.

  • k = Lookup((next_free_slot + offset)%total_slots)

Alternatively, this negative mod could be replaced by a positive mod, by adding the total number of cells to the offset:

  • k = Lookup((next_free_slot + (total_slots+offset))%total_slots)

The attached code implements a Circular Buffer in Java, using this positive mod method. (CircleBuff.java has been renamed CircleBuff_java.txt for browser compatibility.)

  • Tech report

Orange policy on 'partner' companies

If like us you use Orange as your mobile phone service provider, you may have received calls from companies purporting to be 'working with Orange' or 'on behalf of Orange'.

In our experience these companies are typically trying to convince us to upgrade our handsets or change tariff.

We contacted Orange and received this policy description back.


Hello Alex

Thank you for your mail regarding marketing calls.

I can confirm if Orange representatives make an outbound call for promotional or sales purpose a notepad is applied to your account with details of the call. Unfortunately independent dealers will also call customers in order to generate a sale, they would know that mobile numbers have prefixes ie: 07973****** and use predictive diallers to make contact.

  • Tech report
  • Read more
Syndicate content  

 

 

Copyright 2007 Lightenna Limited

  • About us
  • What we do
  • Our product
  • Recent work
  • Contact