What we all need right now

September 22, 2011

What we all need right now is to feel better about our selves. I know that sounds hard with the economic situtation the way it is but hear me out. Take what you’ve heard about banks and money and put them on the back burner because what really matters is people; you, me, bankers even politians. You might be thinking what do people have to do with money well….everything, the people trading on the floors of our markets are people just like you and me. What they need right now is the feel better about themselves, to feel happy and confident about what they’re doing. When they aren’t happy the markets struggle.

How do we ordinary people fit in, unsurprisingly money, we spend it and it makes the economy go round, I understand this is difficult because we’re all worried about what will happen to our jobs. In lies the problem we are making things worse by not spending, the countries growth requires us to buy things, lets face it the money is making you any more in the bank is it? You might as well have the things you want.

So how can we feel better, my first thought is an easily accessible one, more pop music, so roll on X Factor give us something fun to listen to. Or how about some home improvements maybe the BBC will give us some new shows to enjoy, where we live has a great impact on how we feel so a spruce up might do just the job.

I imagine you can think of lots of other ways of feeling better but it’s what we should all be aiming for.

Filed under: Thoughts for the day — admin @ 7:17 pm

A recent design I had to build required that each list item in a menu (WordPress) be a different colour. After some head scratching I came up with a method using jQuery.

We start off be making sure our counter is 0. Then loop through each list item. We can get the current item number from jQuery and which element we are currently acting on. Setting the colour variable to be 1 + i means we count from 1 up to the total number of list items. I’m using modulo operator to loop the numbers after 8. Using jQuery we can then add class to the current element. The class could contain any CSS operation. I used this for a spectrum of colours.

    colour=0;

	$('.nav ul li').each( function(i, elem)
	{

		colour=1+(i%8);

		$(elem).addClass('listitem'+colour);

	});
Filed under: Programming — Tags: , , , — admin @ 8:29 pm

Using jQuery and CSS we can change the colour of alternate rows in a table. The code below will lock on to each table row and change the background colour on alternate rows. I’m making the change with CSS but you could always add a CSS class instead.

    jQuery('table tr').each(function(i, domEle)
	{

         /* skip the first row (probably your headings) */
	  if ( i!=0 )
	  {

                /* if i / 2 has no remainer set the background to this */
		if ( i%2==0 )
		{

	      jQuery( domEle ).css('background-color','#dcddde');

		}
		else  /* if i / 2 does have a remainder change the colour to this */
		{

		  jQuery( domEle ).css('background-color','#f3f3f4');

		}

	  }

	});

If you want add a class instead replace


jQuery( domEle ).css('background-color','#f3f3f4');

/* with */

jQuery( domEle ).addClass('odd');
Filed under: Programming — Tags: , , , , , , — admin @ 8:19 pm

Lazy Sunday

June 12, 2011

Today has been kind of a lazy day so I’ve got a couple of things out the way.

First off you’ve probably noticed the re-styling of the site. Feel free to let me know what you think.

Secondly; I’ve added 4 more Warhammer Quest card makers, Magic Cards, Monster Events Cards, Unexpected Event Cards and Treasure Cards. Again let me know what you think.

Filed under: Warhammer Quest — Tags: , , , , — admin @ 4:36 pm

G Max download

April 24, 2011

If you’ve been trying to download the version of G Max 1.2 hosted by Turbosquid you’ll have been frustrated by a bad link. After a bit of playing around, this is link you need to download G Max.

G Max is a cut down version of Discreets 3d Studio max. G Max is designed to allow developers to build 3d models for use in video games. You can download tutorials and help guides at Turbosquids G Max page

Filed under: Uncategorized — admin @ 11:11 am

If you’re like me and have designers handing you wonderful looking designs to build, then you’ve probably encountered the situation where they’ve used an Apple font with no true type font available. I’ve scoured the internet looking for useful tools and methods to convert from one to the other. I’ve compiled the ones I use below.

You’ll need a linux box for most of these although you could try cygwin.

Convert Postscript Type 1 font to TTF

This is the first part of a two step procedure. T1unmac can convert postscript type 1 fonts to pfb files. If you’re scratching you’re head the PS1 fonts are usually name “._FontName” (they’re probably hidden so you’ll need to “show hidden files”). The command words like this

t1unmac --appledouble ._FontName > FontName.pfb

This will return a .pfb file that you can use in the next step.

The next step is to use FontForge to convert to .pfb file into a True Type Font. Save the code before as convert.pe I can’t take credit for the script I found it on the FontForge website.

#!/usr/local/bin/fontforge
i=1
format=".ttf"
while ( i<$argc )
  if ( $argv[i]=="-format" || $argv[i]=="--format" )
    i=i+1
    if ( i<$argc )
      format = $argv[i]
      if ( format!=".ttf" && format!=".otf" && \
	  format!=".pfb" && format!=".svg" )
	Error( "Expected one of '.ttf', '.otf', '.pfb' or '.svg' for format" )
      endif
    endif
  else
    Open($argv[i])
    if ( $order==2 && (format==".otf" || format==".pfb" ))
      SetFontOrder(3)
      SelectAll()
      Simplify(128+32+8,1.5)
      ScaleToEm(1000)
    elseif ( $order==3 && format==".ttf" )
      ScaleToEm(2048)
      RoundToInt()
    endif
    Generate($argv[i]:r + format)
  endif
  i = i+1
endloop

You use the script like this

convert.pe --format ".ttf" *.pfb

This will find all files that end .pfb and convert them to .ttf files. The script can also output .svg and .otf.

Split a .dfont file

Another type of Apple font archive you could've encountered is a dfont file. These files can be split into their components (usually .ttf files) using the command fondu. The command you use for this is.

fondu FontName.dfont

This will output the content into the current folder.

Filed under: Programming — Tags: , , , , , , , — admin @ 8:23 pm

If you’re trying to include YouTube videos or Google maps, in fact anything that uses an IFRAME in your WordPress you’ve probably run into problems. The visual view in WordPress removes the IFRAME code. Well I have a solution for you, use javascript to insert the code. Below is the code I’m using. All you would need to do is change the address in the URI variable and alter the width and height attributes.


Here is the video.

Filed under: Programming — Tags: , , , — admin @ 7:51 pm

Questions

February 15, 2011

If I’ve learned anything from life it’s that though many questions should never be answered, many more should never be asked.

Filed under: Thoughts for the day — admin @ 10:45 pm

Anger

January 6, 2011

I know the anger that dwells in a mans heart for I see it in myself.
During times of great frustration it threatens to overwelm us.
Do we keep it in check knowing the regret we will feel should we rage against the world.
For all that civilised men do to quell these feelings, it lurks, waiting to be called.
It is an anger that can only be soothed by the flames or war.

Filed under: Thoughts for the day — admin @ 7:17 pm

Revenge is a fire that offers no warmth, it can only ever burn you.

Filed under: Thoughts for the day — admin @ 7:16 pm

About me

Jonathan Spicer

My CV

My curriculum vitae and a wealth of other facts about me.

Warhammer Quest tools

Flickering flame effect Flickering flame effect Flickering flame effect

Powered by WordPress