Option 24/7 for Wiltshire's buses
Looking forward for Wiltshire's public transport

Home Accessibility Facebook Twitter The Mouth Papers Resources TransWilts About Us Contact
The power of scripting

Over the last few days, I've been helping to populate the Option 24/7 web site - suggesting an alternative to Beeching Style cuts to save money on bus subsidy - by looking at the network as a whole rather than individual routes.

Example - don't run all buses the same route between two major towns - 2 buses an hour is more than the intermediate villages need, rather one an hour is fine and have the second bus take a different route - perhaps even vary it on alternate hours - so that the services fan out and fan in again, removing the need for an infrequent intermediate bus.

Example .... hey - there are examples on the option247 web site - this blog is about the power of scripting.

I needed to extract a column of data from a downloaded file - so that I could write to Parish and Town Clerks around the county, and alert the to our "write-in" option. Big edit? No - little script!

  <?php
  $fh = fopen("ParishCouncillors.csv","r");
  while ($record = fgetcsv($fh)) {
    print ("$record[9]\n");
  }


And the job is easily done. You may wonder why I used PHP ... well, it's a change from all the Perl 6 and Python I've been doing this month, I was doing some PHP work for a PHP course I'm running next week, and I could remember the format of the fgetcsv function in PHP.



(written 2016-01-12, updated 2016-01-13)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
H101 - Introduction to PHP
  [4118] We not only teach PHP and Python - we teach good PHP and Python Practice! - (2013-06-18)
  [3025] Learning to Program ... in PHP. Course examples. - (2010-11-01)
  [2097] PHP Course - for hobby / club / charity users. - (2009-03-22)
  [1958] PHP - Parse error: syntax error, unexpected $end ... - (2008-12-23)
  [1753] Perl v PHP, choosing the right language - (2008-08-14)
  [1717] Q - Should I use Perl or Python? - (2008-07-23)
  [1198] From Web to Web 2 - (2007-05-21)
  [1050] The HTML++ Metalanguage - (2007-01-22)
  [949] Sludge off the mountain, and Python and PHP - (2006-11-27)
  [924] The LAMP Cookbook - Linux, Apache, MySQL, PHP / Perl - (2006-11-13)
  [917] Syntax checking in PHP - (2006-11-07)
  [846] Is Perl being replaced by PHP and Python? - (2006-08-27)
  [795] Remember a site's non-technical issues too - (2006-07-07)
  [789] Hot answers in PHP - (2006-07-02)
  [712] Why reinvent the wheel - (2006-05-06)
  [691] Testing you Perl / PHP / MySQL / Tcl knowledge - (2006-04-19)
  [646] PHP - London course, Melksham Course, Evening course - (2006-03-14)
  [629] Choosing the right language - (2006-03-01)
  [624] It's REALLY easy to add a little PHP - (2006-02-26)
  [577] Learning to program in Perl or PHP - (2006-01-26)
  [433] FTP - how to make the right transfers - (2005-09-01)
  [382] Central London Courses - Perl, PHP, Python, Tcl, MySQL - (2005-07-18)
  [380] Bridging to the customer requirement - (2005-07-16)
  [341] Happy Birthday, PHP - (2005-06-09)
  [317] Programming languages - a comparison - (2005-05-20)
  [135] Too many Perls - (2004-11-30)
  [132] Portrait of the author - (2004-11-27)
  [124] PHP v Java - (2004-11-20)
  [93] Case Sensitive? - (2004-10-19)
  [55] Evening classes to learn PHP - (2004-09-19)
  [48] PHP - onwards and upwards - (2004-09-14)

H312 - PHP - Tips and Techniques
  [4426] FileMaker Day to Unix Time conversion - (2015-02-15)
  [4319] PHP - some quick fixes if scripts have issues, and how to use our support - (2014-11-19)
  [4310] Problem ... I want to print a series of numbered forms - (2014-10-05)
  [4074] A comment on comments in PHP - (2013-04-28)
  [2981] How to set up short and meaningfull alternative URLs - (2010-10-02)
  [2478] How did I do THAT? - (2009-10-26)
  [2274] PHP preg functions - examples and comparision - (2009-07-08)
  [2025] Injection Attack if register_globals in on - PHP - (2009-02-04)
  [1983] Keeping PHP code in database and running it - (2009-01-09)
  [1684] Two PHP include files to make easy web site indexing and navigation - (2008-06-21)
  [1667] Checking server performance for PHP generated pages - (2008-06-06)
  [1649] Easy conversion - image formats, currencies and distances - (2008-05-21)
  [1270] PHP Standalone - keyboard to screen - (2007-07-18)
  [1010] Dates, times, clickable diarys in PHP - (2006-12-28)

Z407 - Option 24/7 - the way forward for Wiltshire buses
  [4703] What do people use the bus for in Wiltshire - survey interim results. - (2016-07-11)
  [4694] Supported Bus Services in Wiltshire - analysis of written-in comments - (2016-06-11)
  [4693] Wiltshire supported bus service consultation, early 2016 - interim results published - (2016-06-09)
  [4692] How are bus support payments currently calculated? - (2016-06-07)
  [4691] Real life PHP application using our course training MVC example - (2016-06-05)
  [4690] Buses in Wiltshire - potential changes and where we stand at the moment - (2016-05-30)
  [4669] Buses - how did we get into the situation we are in? - (2016-04-02)
  [4667] Wiltshire Supported Bus consultation - final few days - (2016-03-30)
  [4660] What is happening on the 231 bus? What are you going to do about it? - (2016-03-04)
  [4658] The end of competition on a bus route - the effects from then end of the 234 - (2016-03-02)
  [4657] Rumours of bus changes by First in Wiltshire - what we know and suspect - (2016-03-01)
  [4654] Getting to the Royal United Hospital - the Hopper and the alternatives - (2016-02-24)
  [4648] Why is bus funding a much hotter topic than a new set of traffic lights? - (2016-02-16)
  [4636] Rail user groups worried about what is happening on the buses - (2016-01-31)
  [4631] What would the Wiltshire Council bus cuts mean for Melksham? - (2016-01-25)
  [4630] The story behind the bus cuts, and what they could mean - (2016-01-24)
  [4625] Where does Wiltshire bus subsidy money come from? - (2016-01-19)
  [4624] Campaigning for a sensible bus solution and not against anyone! - (2016-01-17)
  [4619] Buses - not about the buses, but about the people who use the buses - (2016-01-10)


Back to
Perl 6 - a Practical Extraction and Reporting example!
Previous and next
or
Horse's mouth home
Forward to
Frosty morning, beauty of Wiltshire
Some other Articles
Rambling from Westbury
Frosty morning, beauty of Wiltshire
The power of scripting
Perl 6 - a Practical Extraction and Reporting example!
Pytest - second example beyond hello world
Pytest - starting example
Still teaching Tcl in 2016?
4735 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2017: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/4621_The ... pting.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat