Loligo Blog

A blog on Photography, Cooking, Programming, Alchohol Making... Contact me at Blog@loligo.co.uk

Loligo Tether Goes Public!

clock June 28, 2009 20:01 by author Mark Compton

For those that have been asking for new dev, or access to the code in order to progress it's state.

I've now loaded up the source code for the Loligo Tether application to Source Forge.

I'm not "sure" how it all works on there with regards to public access or editing etc, but I think you should be able to log on there and grab the code, and even push changes back in, would be nice to get this as a community project and get it off the ground.

There are some fantastic ideas floating around about features wanted in there, and i'm sure there are more than a few developers out there with cameras to have a play with this :)  

anyone who wants to grab a copy of it to test it would be making a great contribution towards helping to make this a more stable product too.

I will have time to put towards making changes and adding new functionality too, so if any feature requests or bug reports could be logged through the sourceforge project this should make it nice and easy to manage :)

this is the location of the sourceforge project

https://sourceforge.net/projects/loligotether

I think if you want to be a developer for the project you may have to request it, or email me and I'll add you.

 

Many thanks everyone for reading my posts and hopefully together we can build a very useful camera tethering tool.

 

Also, if there is any interest in my other projects I'm sure I could put some of those up on sourceforge too :)

 

Cheers

 

Mark Compton 

 



WPF - Object Binding and fancy lists

clock March 15, 2009 20:08 by author Mark Compton

I've only just started on my journey into WPF land, but it's been very difficult trying to find help and info on how to do things, so I thought I'd at least show some info on the progression I'm making with it, as it may help someone out there.

 I'm going to use the Mediocre Centre as an example, as I plan to rewrite the UI for it in WPF.  bear in mind I've not made it too fancy, and it's not very tidy this is in my baby steps phases heh.

This is what this list should look like when were done, as you can see, nothing fancy but I wanted to also show how you can nest components and draw a few fancy things :)  


ok, so where to start..

First you'll need an object to bind, my mediocre centre menu lists may be over complicated for this due to their dynamic nature, so lets create a simple version just to show you the concept.

 ok, Code for the simple objects:

public class MainMenuList

{
  private List<MenuEntry> MenuList = new List<MenuEntry>;
  public MainMenuCollection()
 {
    MenuList.Clear();
    MenuList.Add(new MenuEntry("Videos"));
    MenuList.Add(new MenuEntry("Music"));
    MenuList.Add(new MenuEntry("Exit"));
  } 
  public List<MenuEntry> GetList()
  {
    return MenuList;
  }
}

public class MenuEntry
{
  public String Name { get; set; }
  public MenuEntry(String name)
  {
    Name = name;
  }
}


 

Now you need to add a WPF form, to the project, or start this by creating a WPF application which will give you a WPF form.

this is the part that had me confused for a while, where to put certain code..  so, the next bit of code(xaml) we are going to be putting in the app.xaml in the <Application.Resources> section. 

Before adding anything, you'll have to add a reference in the App.Xaml to your Namespace in which the Menu is contained, which will appear with the others at the top that look similar:


xmlns:src="clr-namespace:MediocreCentre.Menus" 

 

First we are going to add an object data provider, this will allow xaml to talk to the object:

 <Application.Resources>
        <ObjectDataProvider x:Key="MenuItems" ObjectType="{x:Type src:MainMenuList}" MethodName="GetList">
        </ObjectDataProvider>
 <Application.Resources> 

 
So here we can see that we've give this collection a Key "MenuItems" and specified which class the list will come from "MainMenuList" and what method will return us the list "GetList".

Now you also want to put in a DataTemplate which will describe how to display the data in the list, this will also go into the <Application.Resources> section below the ObjectDataProvider

Here's a simple DataTemplate:

 

<DataTemplate x:Key="MenuFormatting" DataType="MenuEntry">
  <StackPanel Orientation="Vertical">
    <TextBlock Width="150" Height="25" Margin="15,5,0,0" FontSize="15">
      <TextBlock.Text>
        <Binding Path="Name" />
      </TextBlock.Text>
    </TextBlock>
  </StackPanel>
</DataTemplate>

 

as you can see, we specify that the datatype being displayed by this template is a "MenuEntry"  and the Binding path is the property we want to read and put into the TextBlock (a label basically)  this is the Binding Path="Name"  which is MenuEntry.Name.

This is the DataTemplate for the "Fancier" list display, but either should work fine, but the following DataTemplate will show you how you can nest controls inside others.

<DataTemplate x:Key="MenuFormatting" DataType="MenuEntry">
  <StackPanel Orientation="Vertical">
    <Canvas Width="150" Height="25" HorizontalAlignment="Left" Margin="0,5,0,0">
      <Rectangle RadiusX="10"  RadiusY="10" Width="150" Height="25" Fill="Gray"/>
      <Rectangle RadiusX="10"  RadiusY="10" Width="148" Height="23" Margin="1,1,1,1">
        <Rectangle.Fill>
          <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="LightBlue" Offset="0.5" />
            <GradientStop Color="DarkBlue"   Offset="1.5" />
          </LinearGradientBrush>
        </Rectangle.Fill>
      </Rectangle>
      <TextBlock Width="150" Height="25" Margin="15,5,0,0" FontSize="15">
        <TextBlock.Text>
          <Binding Path="Name" />
        </TextBlock.Text>
      </TextBlock>
      <Rectangle RadiusX="3"  RadiusY="3" Width="146" Margin="2,2,2,2" Height="12.5" Fill="White" Opacity="0.2" />
    </Canvas>
  </StackPanel>
</DataTemplate>

 

So, you can see from the above code that I've put rectangles all over the place, the RadiusY/X is how rounded you want the edges, so that's a very nice feature :)

 

now after tinkering with that for a while, You'll want to know how to actually display this on the form I spose :)  well this is what you want to do there. 

now this is the simple bit :)

 ok, in the <Grid> section of your form.xaml, you want to add this:

<DockPanel DataContext="{Binding Source={StaticResource MenuItems}}" Grid.Column="0" Grid.Row="0">
  <ListView x:Name="lstMenu" ItemsSource="{Binding }" ItemTemplate="{DynamicResource MenuFormatting}" IsSynchronizedWithCurrentItem="True" DockPanel.Dock="Left" />
</DockPanel>

Once you've added this, you should see the designer actually change and show your items in the list, which is very cool :)   

To explain this a little..  

The Binding Source is pointing to the ObjectDataProvider that we gave the Key=MenuItems 
The ListView ItemSource is set to Binding so that it knows to bind to the Binding Source
The ItemTemplate which tells the Listview how to display each item of data is set to point to the DataTemplate that we called MenuFormatting.

 

and there you have it, a "Fancy" object bound list view.

ps, if there are bugs, sorry lol, I knocked up the code in Notepad and haven't compiled it, rather than drop in all my Mediocre Centre Code.

 

Good luck, and have fun :) 

 

 

 

 

 



My Kitchen Progress

clock March 1, 2009 20:02 by author Mark Compton

Been busy this weekend with the kitchen, it's looking fantastic, not yet completed, but fantastic.

My Brothers Chris and Alan worked tirelessly through saturday to get it all put in, and Chris came back on Sunday to finish off a few things, and teach me how to til :)

Very happy with the kitchen, Gives me so much more storage space yay :)  and all handmade cupboards by Chris too.

The kitchen needs a bit more tidying up now, and I'm in the process of tiling the walls, then just have to get a new fridge and a cooker, sorted!

Here's the before and after.. 

 

look at the tiling :) that's my only contribution to this effor lol, not bad if I do say so myself :) 

 



Loligosoft Money - The progress continues.

clock February 26, 2009 19:33 by author Mark Compton

An update to progress of the development.

 It's not actually quite usable, with the main screen showing clickable links for accounts and budget review, also a summary of your budget based on income vs spending etc.  You can edit the transactions to assign a category or change a payee etc, you can create and edit a budget.  I've even put in an auto budget feature which will make a budget for you based on your category assignment to your spending, which you can then alter to the budget figures you want.

 here's a few screenshots of the changes, I've chucked some test data in there just to make it look a bit more useful.

 

 The Summary Section of the main page:

 
You can now setup when your financial period begins, You can also choose that this must end on same day each month, and it can take into account weekends, which as above shows that my next financial period begins on 20th March which is because the 21st falls on a saturday, and I always get paid on the weekday prior to that.
The other information on the summary is calculated based on what you have setup in your budget vs how much is in your account and the message will change depending on whether you are within budget or not and wether or not it thinks you will remain within your budget based on what you have setup. it will also tell you how much you are due to have left in the bank if your within your budget.
 
 
 
The Account List:
The account list now enables a hyper link when you hover over an account which you can click on to see details of transactions and also edit them to assign categories or choose to import a statement from your bank (CSV only still)
 
 
 
The Account Detail screen: 
on here you can see a list of the transactions and how they are affecting your running balance of the account, I'm planning on doing some nice colour coding for this screen, but keeping it just functional at the moment.
from here you can assign a category, which if you type in a non-existant category it will be added to the list for future use.
 
 
 
The Budget Review/Setup: 
Here is where you setup your budget for the period, I did a quick autobudget which has created a budget for me based on my spending and what category I assigned to each transaction for the last period.  you can edit any transaction by double clicking on it and changing it to something more rounded or add in a little buffer :)  
 
 
and that's it at the moment, you can add other accounts like credit cards and assign transactions to them.
 
The things i'm working on next are:
 
Transferring of funds (ie to pay a credit card/loan from a bank account).
Better editing of transactions.
Forecasting of account balance ( a nice chart of what your account may look like in the future) 
Some kind of Debt Repayment Planner.
Some nice Reports:
Income vs Spending
Monthly Spending Comparison
Spending by Payee
Spending by Category
 
 
That should keep me going for a little longer heh 


Loligosoft Money

clock February 17, 2009 11:26 by author Mark Compton

ok, after getting annoyed with no accounting package working the way I wanted them too I decided to write my own..

It's not yet comple and is very much a work in progress, but thought you might like to see what I've been up to, and where it looks like it's going generally. 

Here's a snapshot of the homepage as it is currently.

 
So far I have
Account creation, Payee creation, Category creation working
CSV statement import (luckily my bank support downloading in this format, so i'm good heh)
the saving and loading is done for what's been coded so far.
And I spent a little time making it look a little prettier cause it made me feel better lol. 
 
the main plan for this application is to allow me to do budgeting and forecasting the way I want too, which is in depth and also on a period which isn't monthly.. ie my "financial month" runs from 21st of the month when I get paid, so the budgeting in other packages tend to annoy the hell out of me, and also I want forecasting to actually work lol, it's a simpl concept.. I have X in my bank, haven't yet paid Y bills, so result = X-Y...  basically lol.  but I also want it to take into account the fact that my 21st of the month changes on a month by month basis to the last working day.  so that's working now too.
 
 
anyways, gotta go, started playing guitar too and need to practice lol. 
 
 
 


Cider!

clock January 14, 2009 20:17 by author Mark Compton

I bottled up a gallon of cider last night, this one has been brewing since the beginning of november last year (so about 2 and a half months)  which isn't that long really :)  but, this is the best tasting cider I've made so far, it has a fantastic flavour and crystal clear :)

I bottled it up last night with a bit of sugar a little sweetener, so hopefully it'll have a bit of fizz to it too, although I wanna take it to a Lan party on the weekend, so I't s probably not going to have enough time to carbonate.

 Not a bad strength either for such a nice tasting cider, clocking in at 7%

 I still have a red wine brewing, but i'm going to leave that for a good 6 months.  I also have some more bananna wine to bottle and some rosemary wine to bottle up, will have to find out what that tastes like :)

 

For those interested in the Cider Recipe, it's very very simple.. follow the brewing instructions on the Cider/Alchohol page  and just use apple juice.. that's it, not carton stuff.  real apples.  and try to use a blend of apples too, I use a blend of whatever is at hand, so the results vary.  but I try to stick a few cooking apples in there if I can't get crab apples or something with a bit of bite.

I also added some citric acid to sharpen it up a bit.  I also ensure it gets well oxygenated at the beginning whilst in the fermenting bin to give it a nice golden colour.

so bottled up 9 bottles of it, and put nice cider labels on it :) sorted.

 I have a ton of fruit left over this week so i'm thinking of making a Mixed fruit wine/cider, gonna try keep the alchohol level down to about 7% and keep it a little sweeter I think, so no additional sugars required, i'll back sweeten it with sweetener/lactose afterwards if needed, and put a bit of sugar in to carbonate.

I'm a little unsure about oranges though, I'm not convinced they will work, but might try them anyway heh.  It'll be a blend of Apples, Bananna, Plums, Peaches and maybe Oranges.  so looking forward to seeing how that one will turn out :) 

 

 



Photographic Inspiration by Music.

clock January 7, 2009 23:19 by author Mark Compton

This is something I've been thinking about a lot recently, am I, and can I influence my inspiration and how I see a see by what music I'm listening too.

So far, I beleive that the answer is yes.   Which in theory is very usefull. More often than not i'll get to a place that I want to take photos of, but won't be in the right frame of mind to "see" an image there, but if I could push my mind in the right direction by listening to some music, to give me some inspiration and emotion to put into the scene.

Now i'm a great lover of music, so I don't know that this would work for anyone, and I'm pretty sure that how certain music tracks affect me wouldn't be the same for someone else, it's all down to personal taste, up bringing etc.  as an example of what I mean I've categorized some music into how it affects me and what it makes me think about. 

Using the right music can put me into the right mood to get the shot I want, or even beforehand give me an idea of what I want to acheive and then find somewhere to take that shot.

a lot of the tracks here are Pink Floyd, because personally I find a lot of variance in how each track affects me so I can cover a multitude of options with one album :)

 

Serine/Epic landscapes, Seascapes, rolling waters/waves.
Pink Floyd - Wish you were here

Alone, peaceful, relaxed. alternating to feelings of conflict/war and anger.
Pink Floyd - Us and Them

Driving, Cars, Motorbikes, Roads - also, fighting(boxing etc) sports.
Pink Floyd - Run Like Hell

Emotions, ambivalence(the feeling of 2 conflicting emotions, specifically sadness and happiness in this case),  nostalgia, longing
Pink Floyd - Comfortably Numb

Kids, School, banding together, Rebelling, crowds.
Pink Floyd - Another Brick in the wall

Work, Lack of accomplishment leading to a want to do more in life.
Pink Floyd - Time

The future, technology, Sci Fi.
Pink Floyd - One of these Days

Scottish or Irish Landscapes with a celtic male presence overlooking. Post battle feeling (Loss, Honour, Pride).
Pink Floyd - On the turning away

Anger, oppression.
Pink Floyd - Dogs of war

Loneliness, not necesarily in a bad way, an alone in the middle of nowhere and darkness creaping in. leading then to a rising determance to achieve.
Pink Floyd - Sorrow

Emptiness, Apathy. then eventually to sadness, then ambivalence(the feeling of 2 conflicting emotions, specifically sadness and happiness in this case)
Pink Floyd - Shine on you Crazy Diamond

Fun, Bouncy, Happy, Mates, messing around, feelgood vibe
Hoosiers - Cops and Robbers
Hoosiers - Goodbye Mr A

Parting emotions (someone leaving for good or a long time etc)
Hoosiers - Run rabbit Run

Love, longing, regret
Scouting for Girls - Heartbeat

Actually for me, most Scouting for Girls tracks fit into this same category.

Shifty, guilty, untrustworthy.
Queens of the Stone age - No one knows

What i'm not sure of yet, is how using an different track to what you want would acheive, ie listening to a track which gave you feelings of anger whilst in a serene landscape etc.

 

I'm planning on putting this more to the test and coming up with some results to hopefully show this works heh.  if anything, it just gets me in the right frame of mind.  so it has it's uses.

 

 



Loligo Tether

clock January 2, 2009 12:42 by author Mark Compton

 

An update to the Loligo Tether application, which I have only tested so far with a Nikon D50 on Vista, but in theory it should work for other cameras on other operating systems.  It requires that the camera is set to shoot in Raw+Jpg (it will delete the Jpg off the camera when it grabs it onto the pc for preview)  it also requires that you have the camera in "P" usb mode, not "M".  if you change this setting on your camera, you'll likely have to turn the camera off, unplug from the computer, then plug back in and turn on.  do this before starting the Loligo Tether.

Here is a screenshot of what it currently looks like: 

 
as you can see, i've tinkered a bit, it has the preview window, and thumbnails of anything that has been synced over (or in the directory previously)
 
it is more stable, and cope with you turning the camera on and off etc whilst running, it will notice you've unplugged it.  
You can now select the location the images will be saved too.
and general bug fixing/tidying.
 
from the screenshot you can see that I did a time lapse, this was with a 30 second interval.  I could make it into a movie, but I didn't leave it going long enough to get the whole cube to melt, and was impatient heh.
 
I've still not created an installer for this application, it is provided as is, and you take it upon yourself to try it of your own free will, and I won't be held responsible for any loss of photos, equipment, time, space etc..
 
You will need to have the .net 3.5 Runtimes installed in order to run this application too.
 
Download Loligo Tether here:
 
and don't forget to have fun :)  
 
if you find any problems, or can think of any ways to improve it, don't hesitate to contact me, either by posting a comment, or emailing me at Mark@loligo.co.uk.
 
Cheers :)
 


Happy new year

clock January 1, 2009 19:57 by author Mark Compton

It's that time of the year again, when everyone is regretting the amount of food an booze consumed, and threatening to never do it again heh.

Well I'm making no promises.  All the home brew seemed to go down well over christmas, in fact I never took enough with me, both the Bananna Wine and the Elderberry wine have gone down a treat.  I tend to drink it myself with a drop of lemonade in to take of the edge heh, but some people seem to like it just as it is :)

 

I have no resolutions this year, I rarely make them, because I don't really need to make a promise to the random new years day in order to actually change what i'm doing, so.. I'll just continue on my mission to do whatever I can :)

 

I'll be focussing more on photography in the up coming months, mainly because i'm sick of the sight of food and booze at the moment lol, but in addition to that, my son has just picked up his first DSLR, so he's going to be needing as much advice as possible.  So I figure I may as well get some of that advice written up in here, ya know, just in case someone else stumbles upon my inane ramblings.

 

I'm also going to be showing more of how I've done my post processing for my photos that appear on flickr all the time

my stream is here if your interested: http://www.flickr.com/photos/markcompton/

 

My focus for programming this year will likely be anything I can do to help with photography, and likely something to do with games, cause I like games heh.

 

So, that's all for today, sorry for the big gap, but it was christmas, I was ill, and wasn't really up to talking to people what with the amounts of whisky I had to drink heh. 



Banana Wine

clock December 15, 2008 22:55 by author Mark Compton

I eventually bottled up the Banana Wine, this was fermenting for about 4 months in total, it's not quite clear but it's very very strong.  clocking in around 16% somewhere.  I bottled it up with some additional lactose and sweetener to make it a little more drinkable, because it was quite bitter.

 

Taste wise, it has a Hint of banana but taste quite similar to a cider in a way, only stronger.  this would likely go well with a little lemonade in it, or as a mixer in a coctail.  I'll have a play and find out what to do with it though :)

 

For those interested in a Recipe.

It was quite simple..  used about 2 bunches of bananas per gallon, mashed em up in a fermenting bin, along with half the skins and some currants.  poured on a gallon of hot water and a pound of sugar.
Mixed it up well and left in the fermenting bin for 2 days, stirring a couple of times a day.

I then strained it into a demijohn and let it ferment for 4 months.. it probably could have done with longer, so I still have a gallon in a demijohn and a gallon bottled up now, just in time for xmas :)

 



Sign in