8 December 2011

OR careers, MSc project, Discrete Event Simulation

Apologies first. I have not been blogging in a long time mainly because I was caught up doing my MSc project website in which there is a heck of a lot of modules to go through and then check to make sure they display correctly. At the moment I have made all 27 modules of the website, now all I need to is sort out display, repeating JavaScript and the most labour-some task Testing. Or as I like to call it "Testing to destruction". The idea of making it fail is more harsh but sounds more fun.

Okay apologies done. On the 16th November 2011, it was a Wednesday (by the way) I attended a Operational Research Careers Open day. This was in Birmingham and started at 10:00 and went on to 15:30. There were a lot of stalls there so to name as many as I can: After browsing the stalls they had a lot of talks from a lot of different companies on what exactly they do. There was talks from Martin Slaughter from Hartley McMaster Ltd on what they did with Vodafone. It was on opening hours and rotas for staff i.e. whether to open on a Sunday or not? Also a talk from Mike Nicholson from IBM UK talking about a case study they did. Next up was GORS or Government OR Services. They talked about how the work is very varied, job security and an amazing pension (better than the average). Then Andrew Long from British Airways Where he talked about the code on an airway ticket and all the different sections which is put together to form British Airways. Then there was a Company I never heard of before that day Tata Steel I presume this is for engineers who describe themselves as mathematicians but I could be wrong. And the very last talk of the day was Tom Hibbert from Tesco who talks about the different problems Tesco faces like perishable good, how much to order etc.

The Careers day was very informative the only problem was travel costs for me to get there by 10.00 i had to pay £70 roughly and to get home i got the cheapest ticket which was around £18 pounds mark. If however they moved the starting time to nearly 12.00 then my forward journey would only cost £18 roughly. Thats the only thing that annoyed me, apart from that well done the OR Society.

For an assessment centre I have to study up on one of four Operational Research Topics namely "System Dynamics", "Discrete Event Simulation", "Bayes net or other decision tree type approach", "Multi- criteria Decision Analysis (or a specific technique from within this group of techniques)".

Having looked at the wiki pages of these I found out Discrete Event Simulation looks mainly like Queueing theory. So I have to brush up on this, luckily I did actually do this in my BSc whilst at Greenwich University with my favourite lecturer Professor Vitaly Strusevich. I have a lot of man love for this guy, a person who actually got me into OR and got me to join the OR society.

UPDATE 13th December
Some links I forgot about. Whilst at the career fair the first talk was from the chairman of the OR Society and he mentioned some projects he was working on they were Green Logistics and ITIS Holding.

10 October 2011

Job hunting-feel out this questionaire...

If your in my position (finished university)you will be now job hunting. Depending on what sites you go to, instead of wanting your CV, they want to ask you questions about certain criteria's that they will be judging you on. These questions will be different on every website you do, but the type of questions will be near enough the same. Instead of typing out your answer on every site you go to, I would recommend you make a document which has these type of questions on there, so when you go to a website which asks a question you have previously answered, you can copy and paste your answer and then tweak it to fit what that website requires of you.

Here is some questions to get you thinking about:
  1. Describe a situation when you identified a new way of doing something, which affected other people. How did you convince the others that it was the right thing to do?
  2. Describe a recent situation when you have had to overcome a challenge. What difficulties did you face and how did you resolve these?
  3. Describe a situation which demonstrates how you applied your analytical skills to solve a problem
  4. Describe a time when you have worked within a team. What attributes did you bring to the team? What did you learn about your own behavior in this situation and how would you change your behavior in a similar situation in the future?
  5. What are your spare time interests? Please explain why these are important to you and include any areas of responsibility

Specific questions

Why have you chosen to join <insert company name>? What has influenced your choice of business area and what particularly interests you in the <insert company scheme>?

Modelling/problem question

  1. Quantitative Analysis This Refers to a situation where the analytical questions have been established and you need to produce a concrete and quantified solution using numerical analysis and /or modelling. Please describe:
    1. Your role
    2. Any analytical techniques you used and how you used them.
    3. How you used available data or produced it.
    4. How you assessed the accuracy and usefulness of your results
  2. Drive for results It is important that OR analysts plan their work clearly and can respond to clients requests within deadlines, being proactive and using initiative when problems arise. Please describe:
    1. Your role in the project;
    2. Your objective and the steps you took to plan and monitor the project;
    3. How you dealt with challenges, both foreseen and unexpected.

You may not get these exact question, but it will be along the same lines as these. If you are job hunting good luck out there, and be careful of spam website and spam job posting.

7 September 2011

php open, write and download a file

I have spend today and yesterday trying to make html write into a file and then download that file. The first objective was to open a file.


Seems straight forward but i got an error

fopen(LinkTestText.txt) [function.fopen]: failed to open stream: Permission denied.

Okay okay calm down all I have to do is change permission of the file. <long time doing a google search> (many frustrating clicking and shouting at the computer (glad it doesn't have emotions)). On all <exaggeration> the forums no one mentioned a php function called "chmod"!!! Why this is what i'm looking for, okay so lets code it.

chmod($filename, 0777);

Error appears:

chmod(): Operation not permitted in /file/path/to/that/ruddy/file.php

Rubbish, lets look on php.net to see if they have an answer <Quick look> ooh they have an answer. What one person says is use File Transfer Protocol (ftp) to change the permission, Huzzah an answer finally.

$row['username']="Joe Bloggs";
$ftp_details['ftp_user_name'] = $row['username'];
$ftp_details['ftp_user_pass'] = $row['password'];
$ftp_details['ftp_root'] = '/file/path/to/that/ruddy/';
//website address
$ftp_details['ftp_server'] = '';
function chmod_11oo10($path, $mod, $ftp_details){
// extract ftp details (array keys as variable names)
extract ($ftp_details);
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// try to chmod $path directory
if (ftp_site($conn_id, 'CHMOD '.$mod.' '.$ftp_root.$path) !== false){
else {
// close the connection
return $success;
chmod_11oo10($filename, "0777", $ftp_details);
fwrite($file,"Writing a lovely string to a file");

Good so all we need to do now is activate ftp and then work out a way to force a download. Here is a link i found earlier

header('Content-Description: File Transfer');
header('Content-Type: application/download');
//it will be called
header('Content-Disposition: attachment; filename="Link test test.txt"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($filename));

Done. One last thing the whole of it HAS to appear before "any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP.". The only thing that is missing is why i put 0777 as the permission, to be honest i have no idea, just saw the number keep on popping up on a couple of forums.

1 September 2011

Film reviews rankings (no maths here)

I manage to see a film in the cinema nearly every Tuesday, so i do see a lot of film. When I rank film, i normally base it on how much i want someone to see the film in the full cinema experience, this is normally confusing as some bad films get high reviews because they look incredible.

So I have come up with a different system, this is based on DVD collection:
  1. Absolutely rubbish film, if it comes on the TV, change the channel.
  2. Don't waste your money on buying the DVD, Just watch it on the TV.
  3. I don't think you should own the DVD, so just rent it.
  4. The film is lacking something, but the DVD is still worth owning.
  5. Watch in the cinema and definitely buy the DVD.
Unfortunately I do own at least one film that belongs to each of the different ranks. <sigh>

3 August 2011

Backing Samuel Hansen Relatively Prime

Right im backing it mainly because of his twitter updates which were summed up on Peter Rowletts blog. Some of them sound interesting
Wondering if you can musically represent a function? Support Relatively Prime and I will have the chance to answer
If you want to hear maths (or math if your from certain parts of the world) stories that aren't well known but deeply fascinating, go on and support Relatively Prime. Heres a video to wet your appetite.

1 August 2011

MSc Project website

I did originally set the website up as being just one big huge html file. It became too big especially when i started doing Material Properties Module (at the moment Material Properties Modules is still very big and is a bit slow on loading). This also meant it was slow as well. Now being a student (still) I get to have some free webspace and hosting, I know amazing. So all my pages i've done so far are up on the website. Just to let you know don't click on any links between and including 'General Equation Module' and 'User Module' you will get a error message saying page not found. Any suggestion to improve the site please leave a comment.

25 July 2011

html page advance php

I just found out when I did Material Properties module that the code was around 109,000 lines so it was being sluggish, so the idea was to store information on the server, from w3 school and there were two ways of doing server bits. ASP wasn't recommended as it was oldish and also pc only, so i had a look at PHP. It stands for PHP: Hypertext Preprocessor, I hate self referencing, such a pain.

PHP is the code which gets processed by Apache on the server and MySQL I think is where you store whatever you want.

According to a couple of websites on snow leopard, you don't need to install php it's already on there, you just need to do a couple of tweaks.

A couple of things the websites forgot to mention was to view the PHP you don't view it as a file in the internet browser e.g. file:///Users/james_p_clare/Sites/MScWebsite/linktest.html you have to view it on Localhost so it will look something like this http://localhost/~james_p_clare/MScWebsite/PhysicaModule.php. Also to view PHP file have to have the extension .php otherwise it won't work. I spent two days not knowing the last two facts. Ahhhhhh.

If your not a mac user w3 schools does direct you to a website which lists other OS. Although a google search maybe better. good luck

19 July 2011

IMA 14th Early Career Mathematician Conference

I went to this on Saturday mainly for the career talk which was held in the morning and bits of the afternoon. The conference was held at the University of Leicester. And during some of it people were twittering #ecm14. Adrian Hamilton took the talk on career planning workshop. We first looked at what to include on a CV, the very broad first:
  1. Profile (Pen Picture of facts)
    1. Management level
    2. Business Areas
    3. Functions carried out
    4. skills, abilites, strenghts
  2. Achievements
    1. Some selected achievements
    2. Excerpts from experience
  3. Career Progression
    1. Start from most recent
    2. Dates, name of organisation, what it does
    3. Key tasks and responsibilities
  4. Other Relevant Facts
    1. Education, qualifications, training
    2. Outside work experience, interests, personal
He did mention that CV change over time, the format I mean but they should about 2 pages no more. Any more and the employer will get bored, as he/she has too see loads of these.
We then did a group discussion on identifying Achievements and then trying to get as many doing words as possible to show what you have accomplished. He also mentioned as a side note that apparently there a preconception that mathematicians aren't good with money, so if you can show you are good with money it will be no bad thing (nudge, nudge).
We also looked at the different ways to search and apply for jobs.

Cold Approach
It's simple, one letter. Useful if growing company. But there may be no job available. Also the chances of success are small.

The other methods most people know:
Contact Networks
Response to Adverts
Recruitment Agencies

The Contact Network seemed to be the best way of getting a job you want. We also looked at Referral Interviews. This was completely new to me. If you have some one in a contact network and you ask them about getting a job in a particular sector, they can refer you to someone who may have more knowledge about the goings on.

The first step is to get referred to someone. Next write them a letter about what you want to get out of it, these referrals are not for you to ask them for a job but talk to them your career plan in general sense, also send them your CV. Next to phone them to confirm a meeting. This is where you mention your letter and make clear that you are not after a job. Mention that it will not take long and you know their time is valuable. If they say they can't help you, stroke their ego tell them they have vast knowledge about this particular field.
If it all goes well hold the meeting, then send a thank you letter for meeting that person.

We also spent some time looking a questions that may be asked i.e.
What recruitment agencies specialise in this sector?
What sort of papers or source should I look at for job advertisement?
Realistic Salary?
Do you other people that could help me out and me more information in these sort of areas we have discussed?
Is my cv okay?
can I hear about your experience.

We then looked at responding to to job adverts, difficult interview questions, do and don't of interviews. Then each person was given a snippet from Mathematics Today (February 2011). This featured a bit about job options and describing where certain people work. One option some one mentioned was Transportation planner. Then a list of website to find jobs:
  1. Datatech Recruiment
  2. DSTL- Defence science and Technology Laboratary
  3. Government Actuary's Department
  4. Government Communications Headquarters GCHQ
  5. Government Operational Research Service
  6. Government Statistical Service GSS Jobs
  7. Matchtech Group
  8. Met Office
  9. Statisticians in the Pharmaceutical Industry PSI
  10. Office for National Statistics
  11. The inside career guide to Actuarial Work
  12. The institute of Actuaries
  13. Transport Planning Opportunities

At the end of this there was a talk by Peter Rowlett about mathematics teaching and learning. Aperiodic tiling by Edmund Harris and a talk by Steve King on something to do with Rolls Royce.

As a side note they did say for students you can join the ima for free or £5 fee.

1 July 2011

Html show hide button

I've set up a new blog where i can post my MSc project user entry system on there. At the moment i have a long way to go. Any way at the moment i have a couple of buttons that are meant to display information on line of code but you can't hide it so i remembered xkcd had the spoiler hide show code but it looked a bit complicated so i searched elsewhere and found this website and it looked amazing and from these two i developed my own version of hide and show tailored to my specs.

<!--my code for info button-->
<button type="button" onclick="if (document.getElementById('PartitionSource Info').style.display !=''){
document.getElementById('PartitionSource Info').style.display='';
document.getElementById('PartitionSource Info').innerHTML='infomation based on button';
document.getElementById('PartitionSource Info').style.display='none';
<p id="PartitionSource Info" style="display: none">

And here is the actual button

22 June 2011

Lists using HTML and JavaScript

After browsing the web for ages on trying to work out how to do expansions of lines for excel, I gave up. It seems it is easy to expand rows but to do automatically is not. So I moved on to html. Someone directed me to W3schools as a recommendation, I do recommend it. Anyway lists, I am going to use the same example as last time.

<h2>Physica Module </h2>
Should the processes be timed and printed at the end of the run?
<select name="Runtime" id="Physica.Runtime">
<!--default is off-->
<option value="OFF">OFF
<option value="ON">ON
<button type="button" onclick="PhysicaModule()">
<p id="Runtime Output"> </p>

<script type="text/javascript">
function PhysicaModule()
txt=document.getElementById("Physica.Runtime").name+" "+ document.getElementById("Physica.Runtime").value;
document.getElementById("Runtime Output").innerHTML=txt;

the idea is there is dropdown list with two options "ON" and "OFF" and a button underneath called submit. underneath that is a paragraph where we put the results from clicking the button into (at the moment i haven't worked out how to get it into a txt file). Then a bit of javascript that determines what happens when the button is pressed. which hopefully we say "Runtime ON" or "Runtime OFF" depending on what option you choose.

Physica Module

Should the processes be timed and printed at the end of the run?

If the above bit of code doesn't work do it for yourself just remember to put <HTML> at the beginning and </HTML> at the end.

20 June 2011

MSc project

My main goal for my Project was to design a user interface to help create the 'inform' file that can be used for PHYSICA. For this I am deciding whether to use HTML and JavaScript or create it using Excel. So to test it out I am going to create a test case for each that will cover the following critea:
1. Lists. Some lines of code of physica have different options
2. Expansion. This is for if the user wants to specify for example Materials properties and they had multiple materials, space would be required.
3. Write to file. In each case I need to know how easy it is to write to file
4. Read from file. this is for if the user need to change something. this is more tricky.

Now the hard part my knowledge of both is not extensive so hopefully when I learn something new I'll post it on here (I hope).

Starting on Excel 1st.
Lists. From my research from today there are two ways of creating lists.
No Visual basic required

1st thing 1st you need to specify options for your list. My list is commands for a bit of code called 'Runtime' the options are "ON" or "OFF" this I put in column E. For the user I have put a prompt in Cell A2 simply called 'Runtime'

Now select the cell B2 then go to data tab and click Validate.

Although this is a mac version of Excel the options are similar for Windows users. In the drop down option select "list" and then specify what the options are and then your done.

Visual Basic form of a list.
Actually there are multiple ways of creating lists. One option is using a "Combo Box" but since I want it in the cell I'm not going to cover this.

Sub test()
Dim sList As String
Dim N As Integer
Dim dv As Validation

sList = "On,Off"
Set dv = Range("C2").Validation
'.delete i think will clear the range it has been assigned
dv.Add xlValidateList, xlValidAlertStop, xlBetween, sList
'expression.Modify(Type, AlertStyle, Operator, Formula1, Formula2)
'below is what may have to use for intergers problem
'i tested the word thing if you enter something than not on the list it give a warning box
End Sub

if you see ' line its a comment.
To be honest I did adapt it from this website

There is another way which is good to use for constraints on variables(from this website).

With Range("e5").Validation
.Add Type:=xlValidateWholeNumber, _
AlertStyle:= xlValidAlertStop, _
Operator:=xlBetween, Formula1:="5", Formula2:="10"
.InputTitle = "Integers"
.ErrorTitle = "Integers"
.InputMessage = "Enter an integer from five to ten"
.ErrorMessage = "You must enter a number from five to ten"
End With

Hope you learned something I know I did.

UPDATE 21/6/2011 09.49AM
Just found out he second bit of code crashes if you run it more than one so it should be:

sub test()
Set dv = Range("B4").Validation
With dv
.Add Type:=xlValidateDecimal, _
AlertStyle:=xlValidAlertInformation, _
Operator:=xlBetween, Formula1:="0", Formula2:="10"
.InputTitle = "Real"
.ErrorTitle = "Must be Real"
.InputMessage = "Enter an Real from zero to ten"
.ErrorMessage = "You must enter a number from zero to ten"
End With
End Sub

17 May 2011

interesting links 18/4/11 till today

Sorry for the delay I had 2 exams to revise for and i still have 2 courseworks to do before 27th may. I know. lovely!

#MathMaths 43: mosquitoes, ants & northern hairy-nosed wombats; ethnomathematics; routefinders; new symmetries; & more bit.ly/h3dfLF

how rude, and brilliant. Contradiction - Spiked Math http://t.co/l8MEp5N

Math/Maths 44: Prehistoric Sat-nav is back; @MoMath1 site; $24m book; 911 math help; snow; flu; sex; sport; Glee & more http://bit.ly/fvHeYf

RT @PeterRowlett nice 'optimisation gone wrong' case: Amazon's $23,698,655.93 book about flies http://bit.ly/fzTYlr

OR blogs i found:
ThinkOR http://t.co/WhFi8bO
Michael Trick has a few blogs http://bit.ly/5HNITY

The Movie Math Quiz Part 4 - Spiked Math http://t.co/Z8o2g4H

voting system on @PlusMathsOrg http://bit.ly/ibpAt4 and the wiki article on Arrow's paradox http://bit.ly/aiIO3r

ooh funky science i like BBC - Bang Goes the Theory - Hands-on Science http://t.co/XzBxipt

#MathMaths 45: Will Grigori ever speak to the press again?; AV; blood TSP; time; tombs; evidence-based policy & more bit.ly/iTusAZ

#MathMaths 46: Early Maths Day; Perelman; AV; Han shot 1st!; Paul the Octopus; PvNP; Humanistic Math; circadas; & more http://bit.ly/ilLC3Z


JOST A MON: Carnival of Mathematics 77 http://t.co/V8bY5Uv

ha ha ha-sex and maths- Math Jokes 4 Mathy Folks http://t.co/I7yOhIS

#MathMaths 47: fave nums; 6/2(2+1); is maths finished? discovered or created?; arts v. science; stereotypes; and more. bit.ly/jcZlwl
Next MathMaths will be streamed live hopefully around saturday 4th June.

Gadgets and tech
Square-the amazing card payment for iphone, very nice http://t.co/L6cX8yL

easter eggs in your mac http://t.co/9NPrg33 via @theappleblog

spotify changes for free account http://t.co/iE6XTGy it's good well it wont affect me much

LiveProfile - blackberry, android and iphone- http://itun.es/i6R3Jh #iTunes #freetexts my cousin told me alright so leave it out- i have to say i may have more free texts/calls apps than people to actually use it with, some people would call it ironic!

blocks website for a certain time frame- may improve my revision....LeechBlock :: Add-ons for Firefox http://t.co/ywoXX71

Spotify download service takes on iTunes by The Gadget Show http://t.co/jSIec12

amazing if it was in the uk, earn money by walking around-Gigwalk in the iTunes App Store http://t.co/jDeNsSp

1st person video game with no video, its an audio experience- 5 stars-Papa Sangre http://t.co/5vvonqI the website http://t.co/ZVdftFV

YouTube - The Axis of Awesome - Lazyeye (007) http://t.co/feTOtZq it made me laugh

RT @Nitrome: Hey Nitromians, Our highly anticipated game "SteamLands" has now been released! http://bit.ly/egc9gn

@Steven_moffat seems like he's starting on Sherlock Holmes

Luv@FirstTweet | Twitter Online Dating, Tweet and Meet, Connect with Singles http://t.co/8hYSLFu

nice pics RT @big_picture: The Royal Wedding http://t.co/O7RMhRd #royalwedding #rw2011

Super 8-shooting movie on iphone, i think its based on a film of the same name which is coming out soon ish http://t.co/d8Af5el

House is renewed for an 8th season

RT @Nitrome: Hi Nitromians! We have released our latest game Test Subject Green! :D check it out here! http://bit.ly/jZg3XJ

just updating my glee spotify playlist http://bit.ly/hdHuoY

18 April 2011

Interesting links 7/4/11 till today

How To Connect iChat to MSN, Facebook, and More: Apple News, Tips and Reviews « http://t.co/nMYJglO

Guardly Turns iPhone into Personal Security Guard: « http://t.co/P0WNUsK via @theappleblog only catch is it's only available in the US itunes store.

Fahrenheit and celsius app- love how it updates itself, check the pic it's really genius http://t.co/p5g4Fkp via @theappleblog

sell old mobiles, ipods, laptops for money or high street vouchers http://t.co/07A6jC2 via @thegadgetshow

from @Noelann Interested in simulation? Tip from #yor17, check out http://t.co/8ZrejeJ

The Hidden Science Map | Future Morph http://t.co/rJlBRpE this will be available for 6 months i believe.

RT @PeterRowlett: Remember to listen to @Noelann on the @uniofgreenwich Maths Cafe in this 3 min audio podcast http://bit.ly/mathshe @HESTEM

Video: Benford’s Law - How mathematics can detect fraud! (by singingbanana) http://tumblr.com/xqt21v143m

Greenwich Maths Time: Young Operational Research Society Conference http://t.co/rE4pDKs

Walking Randomly » Carnival of Math #76 http://t.co/Pxk6wiu via @walkingrandomly

#MathMaths 42: guest @mathsinthecity; Pioneer Anomaly; 3D Knight's Tour; @Google grants; FBI crypto; @Mangahigh; & more http://bit.ly/f3Yd5Y

citizen science links- Bang Goes the Theory, Series 4, Episode 5 http://t.co/EO5dQMg

there is a trailer for Johnny English 2, the trailer does look funny, i want to see it http://t.co/q8c6Os8

7 April 2011

interesting links

unfortunately I didn't realise how much time my MSc would take of my personnel time so this is a short blog on links I have discovered on twitter and blogs I read. Enjoy. since i plan to keep this up weekly (it may not) i am going to look back to 24 march till today.

Maths and Stats
How to write math equations (integrate Latex) in Blogspot/Blogger « Mathematics and Multimedia

apparently this is googles uk magazine website 'think quarterly' with data but i can't seem to get it to work...

a fractal joke, very nice-Math-Frolic http://t.co/qKfGAYQ

Bank note in india £0 http://t.co/cQ5ZW5P

a MATLAB like environment-Scilab WebSite http://t.co/THxwGN7
according to @walkingrandomly 's blog

we're sorry the number you have dialed is imaginary. please rotate your phone 90 degrees and try again MJ4MF maths jokes

cryptology no reward but definitely a challenge-FBI — Help Solve an Open Murder Case, Part 2 http://t.co/uYhhzXv #maths #puzzle via @alexbellos

In America it is Math Awareness Month http://t.co/uOGlvUX link via Math-Frolic

Maths podcast MathMaths http://t.co/dhxD3y3

Math Poems from MJ4MF

Plus podcast on sport engineers or read the article

Film and TV
RT @RottenTomatoes: Captain America: The First Avenger trailer pumps it up. Watch it: http://bit.ly/gC65Rt

Prequel for Doctor who

Hugh Laurie sings http://bit.ly/h71wrA

Android and me

MoxierWallet secure your accounts http://t.co/gGFBNsi

Viper- free calls on iPhone, iPad and iPod link via theappleblog

Plugin for your browser- Tineye find out who is in a picture http://t.co/JuOP1fQ

Video of game on iPad called Slice (knives and blood) http://t.co/PoSHbgx

New And Improved! 62 Movie Twitterers You Should Follow-Empire http://t.co/y4AdcO0

Axis of Awesome-youtube video "Can You Hear the F***ing Music Coming Out of My Car?" http://t.co/aI00IjS

Nitrome game-Knight trap

Glee spotify playlist http://bit.ly/dQlN9d

6 March 2011

iMovie 09 editing: delete video keep audio

I have a lot of video at home, most of them movies. My plan is to convert them to DVD for home use only (no crime has been committed). My first job was to find something to connect my video to my computer, i found something online for £60. Then I had to find wires to connect it up (it didn't come with it), which I had because we had to connect it to the tv somehow. Recording it was fine, but its the edits which is hard. which brings us to iMovie 09.

Editing clips and cutting out segment is easy. Just split the clip into however many segments, now selected the clip you don't want and then delete clip selection. Told you it was easy.

I had a problem on one film, the video paused but the audio just kept on going. My first thought was split the clip and detach the audio and move the audio along. But no, you can move the audio back but not forwards. So I moved another copy of the film over to the project bit (at the end), edited the clip (i.e. listening to the clip), detaching the audio and moving the audio back to where the video froze. Then just to make sure the old audio doesn't get in the way, i went to audio adjustments and used ducking (other track can be reduced in volume) and bingo bango baby it's done.

update- forgot to mention you then delete the video from that clip you imported. Also in case you didn't know if you delete the clip you also delete the audio that goes with it, it's a pain in the arse, I know

18 February 2011

Paradoxial games

This was a free lecture to anyone in Greenwich or out. The Greenwich MathSoc set this up with help from @NoelAnn and @Tony_Mann. When I was doing my last year at Greenwich Eduardo Cuntin did a project on paradoxical games giving the history off it and interviewing the man himself. So a couple of months later MathSoc asks him to come and then we have an event. A couple of people on twitter and facebook spread the word of the event. Then we are brought to the day of the event.

WARNING: if you are going to attend a lecture by Juan M.R. Parrondo do not read any further, if your interested in the maths contine.

The man who everyone came to see is Juan M.R. Parrondo was introduced by Noel-Ann Bradshaw and Eduardo Cuntin. This problem is apparently 10 years old. The idea is there is 2 games which if played individually will end up with you losing money (gambling is easier to visualise) but if you alternate between the 2 games randomly then you will win. Confused? read on.
He gave an example, Game A is a simple game you win with probability p1 and lose with p2. The second game Game B is more complicated if your capital is divisible by 3 then you win with prob p3 and lose with p4, if your capital is not divisible by 3 then you win with prob p5 and lose with p6. This should help visualise it

This is what happens when you play the games randomly or the games separate

As you can see playing randomly turns to be profitable (The above was the game being played 5000 times).

Apparently the trick to working out this paradox comes from something called Brownian motor and the probability of each game.

Game A has a small positive gradient and Game B is a mixture of 2 gradients 1 big positive gradient and one shallow negative gradient. Switching between the 2 games means you increase your profits. This website may explain the Brownian motor better.

There was some criticism of the paradox in 2004. They questioned the paper and said if it was not random but they got to pick which game they chose then their odds and profit would go up. This is true but if you deal with more than one person choosing between which game to play i.e. democracy then you will end up losing but random still triumphs.

The lecture ended.
Parrondo's paradoxical games homepage

15 February 2011

True Grit

True Grit was actually filmed in 1969 and then re envisioned in 2010. It was based on a novel by Charles Portis. The film is very good, but Jeff Bridges character has a mumble and a deep voice which makes it hard to understand what he's saying. His character however is brilliantly done, looks like a drunk who smokes a heck of a lot and doesn't enjoy his job. The language is old or like the 1969 film, not sure if its like the book, haven't read it. Trying to understand what is happening is hard. I would give the film 2 out of 5. If the language was more modern I would give it 4 out of 5.

According to Rotten Tomatoes I'm wrong. IMDb link

pre dated for yesterday

The Green Hornet

I went yesterday to the cinema to watch this. I actually watched it in 3D, it is not worth paying the extra money for 3D, the film is already good in 2D. The main idea of the film is its a hero film, I don't think they have superpowers but that's debatable (watch film and tell me what you think). I didn't know about this before but they wanted to frame themselves as the villains as apparently this is every heroes weakness. Also it means only the good guys would come after them and if they got caught, prison would mean they get respect rather than abuse. Seth Rogen would never be chosen for a hero movie (no offence) but this is perfect. The main character acts like he's 18 and in college i.e. party, booze and everything else. Then he has to change and become "The Green Hornet" which is a lot of fun to watch. The gadgets on the car by the way is amazing, might be a reference to a couple of James Bond movies.

The other thing I liked about this film was they got the crime locations off someone (no spoilers so far (I think)). Now good news is within the last week or so there is a new website set up that displays crime on a map. Which is a good way of spotting the troublesome areas, the police would more than likely advise against using spandex to patrol the streets and trying to be a hero.

The downside of the map is it's not accurate enough but there is data so if you wanted to build your own app, or analyse the numbers, why not check it out.

IMDb and Rotten Tomatoes as references, if you don't trust my review check out the rotten tomatoes link.

This should be pre dated to 3rd of February 2011

Unstructured Meshes

Last term for me I was studying meshes and the physics of what goes on when the radiator is on. The most common mesh is structured meshes, like calendars, all squares all evenly distributed. i.e.

This was taken from my iCal on my mac. (note sure who I ask permission to use this image, if you know can you reply in the comments)

Structured meshes are good for rectangle type of shapes but what if they are not rectangle? For this type of problem we can triangles and view this as an unstructured mesh.
An example would be a rectangle split into triangles (because i can claim its my own work and its easy to draw)

This image was made by the software Paintbrush
Now before we get into the how a computer works with unstructured meshes we first need to know each triangles neighbour.
1: has neighbours 2 & 3.
2: has neighbours 1 & 4.
3: has neighbours 1 & 6.
4: has neighbours 2 & 5.
5: has neighbours 4, 6 & 7.
6: has neighbours 3 & 5.
7: has neighbours 5 & 8.
8: has neighbour 7.

Now we create three vectors, one will be the neighbours so something like
The second will be to determine how many where the neighbours finish for that triangle i.e. for triangle 3 it would be 6, the vector will look like:
The last matrix will be the coefficients for those triangles so something like:

Then you can use Successive over relation or Gauss Seidel or even the Jacobi method. Other iterative methods are available.

One last bit of advice do not use my triangle arrangement to solve problems mainly because it is not evenly spread out and so any results you get will be wrong or at least not very accurate.

This should be pre dated to 30th January 2011

Math/Maths Live at University of Greenwich

Math/Maths podcast is hosted by Pulse Project starring Peter Rowlett (@PeterRowlett) and Samuel Hansen (@Samuel_Hansen).
I was Meant to upload this sooner, but coursework got in the way. Anyway on Pulse Project website you can listen to the audio of the podcast, but you never get to see them, so I recorded them doing their thang (<--deliberately spelt wrong).

At the start of this event they gave a talk of Peters and Samuels trip to Nottingham and mathematicians that lived there. After the Math/Maths recording a group of us went up to explore the Greenwich Observatory and came across a unique sundial:

This should be pre dated to 4th of December 2010

Recreational Mathematics

At Greenwich today the maths society (MathSoc) arranged a lecture on the subject of "Recreational Mathematics" which was given by David Singmaster. Unfortunately after my first picture my iPhone lost internet connection. Here is my first pic:

If you did read his wiki article, you would know he is famous for his Rubik cube solution, so I was glad when he brought that out:

Unfortunately my memory sucks so I can only recoil memories from the pictures. So somehow we managed to get to a bit about labyrinths and he found one underground, this was him getting into the cave:

And the he presented the cave itself and a drawing of the labyrinth

We then moved on to the Fibonacci series and there was a weird pattern in there:

Its a bit hard to see but if you look at the 15th line where it begins 14,1,....., 1001, 2002, 3003.... Huh this is weird but wait, because of this the 16th line reads 15, 1,.....,3003,5005..... and again on the 17th line we get 16,1,...., 8008,..... Strange phenomenon, its uncommon and doesn't happen often.

He then showed us fibonacci work (I believe) and the numbers we now use today which he got when he travelled abroad.

We then looked at another bit of Fibonacci's work, which included work that showed how to use the numbers for adding and multiplying. No picture here as it seemed a bit boring.

Now we looked at problems and teapots. I'll get to the teapots in a minute. One problem we looked at was:

If you can't read it, it says
"As I was going to St. Ives, I met a man with seven wives, each wife had seven sacks, each sack had seven cats, each cat had seven kits. Kits, cats, sacks and wives. How many were going to St. Ives?"
The answer wonderfully is none. Or one if you count the man himself.
There was other puzzles but I forgot them and forgot to take a picture of the puzzles. Shame apparently those puzzles perplexed even the greatest mathematicians.

Okay now the teapot. David Singmaster brought one with him:

As you may notice although the picture isn't that good, it has no lid to speak of, so how do you use it I hear you ask. Well glad you did, because I wondered as well and here's how:

You fill it up from the bottom and then flip it over, wonderful.

Next we had a problem:
"Can you draw three rabbits with three ears between them and that each rabbit looks like they have two ears each"
Easy enough draw them in a triangle formation like so:

This is all well and good but this image has been used in loads of different places:

Then the lecture finished:

for the next hour or so any people who were left got to play around with some stuff he brought along i.e. teapot, rubik cube (3*3*3), rubik cuke (7*7*7), Rubik cube (1*3*3), bolts that were together, sheet of paper that looked like it had space in side of it and some more things I can't remember.
Actually one thing i did remember was a magic trick (apparently it actually something to do with physics) which was cool here is the 10 sec video:
Wordpress wants me to upgrade to put video on here so hello Twit Vid

This should be back dated to 10th of November 2010