adamjamesnaylor.com Report : Visit Site


  • Server:Microsoft-IIS/7.5...
    X-Powered-By:ASP.NET

    The main IP address: 92.9.121.243,Your server United Kingdom,Liverpool ISP:Carphone Warehouse Broadband Services  TLD:com CountryCode:GB

    The description :adam james naylor - personal blog - personal blog...

    This report updates in 12-Jun-2018

Created Date:2011-05-27
Changed Date:2017-04-27

Technical data of the adamjamesnaylor.com


Geo IP provides you such as latitude, longitude and ISP (Internet Service Provider) etc. informations. Our GeoIP service found where is host adamjamesnaylor.com. Currently, hosted in United Kingdom and its service provider is Carphone Warehouse Broadband Services .

Latitude: 53.410579681396
Longitude: -2.97794008255
Country: United Kingdom (GB)
City: Liverpool
Region: England
ISP: Carphone Warehouse Broadband Services

HTTP Header Analysis


HTTP Header information is a part of HTTP protocol that a user's browser sends to called Microsoft-IIS/7.5 containing the details of what the browser wants and will accept back from the web server.

Content-Length:30032
Content-Script-Type:text/javascript
Content-Encoding:gzip
X-Powered-By:ASP.NET
Vary:Accept-Encoding
Server:Microsoft-IIS/7.5
Cache-Control:private
Date:Tue, 12 Jun 2018 05:21:31 GMT
Content-Style-Type:text/css
Content-Type:text/html; charset=utf-8

DNS

soa:ns1.livedns.co.uk. admin.adamjamesnaylor.com. 1524756937 10800 3600 604800 3600
txt:"google-site-verification=HuPhMSixwcLjomAsFsI0X0bHWym7sGYSNDpS-ZlWCVs"
ns:ns3.livedns.co.uk.
ns2.livedns.co.uk.
ns1.livedns.co.uk.
ipv4:IP:92.9.121.243
ASN:43234
OWNER:TT-AOLUK-AS, GB
Country:GB
mx:MX preference = 10, mail exchanger = mailserver.adamjamesnaylor.com.

HtmlToText

adam james naylor personal blog home archive contact log in nhs health and symptom checker released 04 juli 2013 adam programming , technology (0) way back in march, the new nhs health and symptom checker app was released across the two major smart phone platforms on the 21st. as part of the nhs's new 111 helpline rollout, the existing nhs direct app's needed to be rebranded to reflect the new service and updated content. being responsible for the android release and being that this was the first (official) time i'd published an app on the google play store, i wanted to share a few insights into the process of publishing the app and document it for my own benefit in the future. reading the official signing procedures outlined by google can lead you to think the process is a little involved, but if you're using eclipse and take google's advice, the export wizard built into the ide makes the whole process entirely painless. exporting and signing your apk file inside eclipse (adt v21.0.1-543035) : first step is to update your version numbers inside the package's manifest file . this is to ensure the automatic upgrade process happens correctly, and also i think the store may reject the update if version numbers don't differ. right-click the project you want to publish in the package explorer and select android tools -> export signed application package... this will open the export app wizard. specify the project to export and click next. i assume most packages will only have one project. the next step is to specify the java keystore file which contains the private key you wish to sign your apk file with. in order to publish the app on the google play store your app must be signed with a private key that has an expiry period of at least 25 years. this is to ensure the app can be upgraded with the same key in the future. next specify which alias to use (alias is the name used to identify the key when it was added to the keystore) and the password for it. finally, give the wizard a location and filename where to save the signed apk file. once the app has been exported and signed into an apk file it needs to be uploaded to the store. log into the android developer console . these steps are based on the version 2 console. as this was an upgrade the next step for me was to select the existing app in the list. click the apk link in the sub menu beneath the app's icon on the left. now click upload new apk at the top and browse to (or drag) the signed apk into this dialog. once uploaded you click the publish now button to submit this apk to the store. apparently you used to be able to upload the apk without publishing to allow you time to ready everything prior to officially releasing the app, but i was unable to find this feature this time round. finally you can go to the store listing section and amend anything that needs to change, probably at least the recent changes section. i've been quite granular here with the steps but the whole thing can be done in less than 10 minutes once you know your way around. backing up a perforce database 12 juni 2013 adam game development , programming , rise , technology (0) after adopting perforce as my source control solution at home i wanted to quickly establish a working automated backup process before i started committing too much hard work to the depot. i did some googling and found some good scripts in the perforce public depot but the project home page seems to be down at time of writing (12/06/13). i couldn't use these scripts in the end because they used specific backup tools which i wasn't interested in. so i opted to try and write my own; a) because i wanted to familiarise myself with how the perforce system operates, b) because i wanted an excuse to learn powershell and c) because i had just bought a new home server and wanted to put it to good use. the eventual plan i wanted to implement was: take the necessary steps to 'snapshot' the perforce depot. compress the potentially large files down into a single archive. testing everything along the way. upload them to the cloud (for now until i get a better storage option in place) readers may prefer to change the last step to a local copy to another drive etc, but i had a box.com account with 15 gb spare and it supports webdav so i thought it might be cool to try and get powershell to connect and stick the file up there. step 1. snapshot the perforce depot i strongly urge any readers attempting to backup a perforce depot to read the guidelines set out by the company here , there are some very important key concepts that perforce operates within that backup operators need to keep in mind when attempting to backup and reliably restore a snapshot. the main points to take away are; there are two kinds of files that perforce maintains. versioned files which are the internal representation of the actual files submitted to the vcs by users. and database files or metadata, which tracks the state of the depot for perforce's benefit (things like changelists, checked out files etc.). checkpoints are files which capture a snapshot of the depot at a given point in time. the journal is a log file containing all the transactions from the last checkpoint. a checkpoint file coupled with a copy of the versioned files and an optional journal file constitutes a perforce backup. these files are what you need in order to backup and restore a perforce depot. the first step recommended by perforce is to verify the integrity of your depot. this is just good practice and can be achieved with the command: p4 -u username -p password verify -q //... replacing username and password with the details of a valid perforce user (which i created with backup privileges). -q makes the operation run quietly and reduces output. the final parameter //... tells perforce which depot (or view) you want to target. here i'm telling it to just use the root. once verified you want to actually create the checkpoint by issuing: p4d -jc this will truncate the current journal file and create a new checkpoint with an incremented checkpoint number (checkpoint. n ) in your servers root folder ( p4root ). once this operation has been confirmed to have run successfully you'll now have a checkpoint file and an accompanying .md5 file that you must then cross-reference with the md5 hash of the actual checkpoint file to ensure it was written to disk ok. i'll show you how i achieved this in the powershell script in a moment. step 2. compress the backup files i'm a heavy user of 7zip as it has some straightforward command line options that are great for problems like this so i then run the files through the following command: 7z.exe a -t7z destination sourcefiles a informs 7zip to create an archive, destination is the filename you want to save to and sourcefiles i pointed to a sub-directory containing all the files to compress. once packed i then tested the archive to ensure integrity with: 7z.exe t targetfile -r t to test the targetfile and r to include all sub-directories in the archive. step 3. upload the file via webdav the final step is specific to powershell so i'll list the full code of my webdav upload function here: function uploadtowebdav($destinationfile, $username, $password, $sourcefile) { write-host "uploading $sourcefile to $destinationfile `r`n" #set-variable -name adfiletypebinary -value 1 -option constant $objadostream = new-object -comobject adodb.stream $objadostream.open() $objadostream.type = 1 #$adfiletypebinary $objadostream.loadfromfile("$sourcefile") $arrbuffer = $objadostream.read() $objxmlhttp = new-object -comobject msxml2.serverxmlhttp $objxmlhttp.settimeouts(1000 * 60 * 1, 1000 * 60 * 1, 1000 * 60 * 10, 1000 * 60 * 1) $objxmlhttp.open("put", $destinationfile, $false, $username, $password) $objxmlhttp.send($arrbuffer) } simple stuff, reads the file, opens the connection and sends. wrapping it all up i wrote two powershell scripts to take care of these steps. one run every night to take a copy of the journal file and upload that to the cloud and the other run every week to perform the steps outlined above. here's the script which i may eventually get round to sharing on github as a gist or something. ############################################################################### ## ## perforce depot backup script ## weekly ## ## steps ## 1) verify depot ## 2) make a checkpoint file ## 3) verify checkpoint ## 4) verify checkpoint by comparing hashes ## ## this file is then uploaded as part of the nightly backup script. ## ## perforce backup procedure taken from: ## http://www.perforce.com/perforce/doc.current/manuals/p4sag/02_backup.html ## ############################################################################### cls . funcs.ps1 $now = get-date function print($text) { write-host "`r`n" write-host "============================================================`r`n" write-host "== $text`r`n" write-host "============================================================`r`n" write-host "`r`n" } $username = [security.principal.windowsidentity]::getcurrent().name print("$username performing weekly perforce backup ($now)") ############################################################################### ## ##1. verify the integrity of your server and add md5 digests and file length ## metadata to any new files ## ############################################################################### print("verifying depot...") $result = p4 -u backupuser -p password verify -q //... 2>&1 | out-string if ($result) { write-host "depot failed verification: $result" exit 1 } else { write-host "depot successfully verified.`r`n" } ############################################################################### ## ##2. make a checkpoint by invoking p4d with the -jc (journal-create) flag, or ## by using the p4 admin command ## ############################################################################### print("creating checkpoint...") $result = p4d -jc 2>&1 | out-string write-host $result `r`n ############################################################################### ## ##3. ensure that the checkpoint has been created successfully before backing up ## any files. ## ############################################################################### if ($lastexitcode -ne 0) { exit 2 } ############################################################################### ## ##3a. determine filenames ## ############################################################################### try { $index1 = $result.indexof("(") $index2 = $result.indexof(")") $checkpointfile = $result.substring($index1 + 1, $index2 - $index1 - 1) write-host checkpoint file = $checkpointfile `r`n $index1 = $result.lastindexof(" ") $index2 = $result.lastindexof("...") $journalfile = $result.substring($index1 + 1, $index2 - $index1 - 1) write-host journal file = $journalfile `r`n $md5file = $checkpointfile + ".md5" write-host md5 file = $md5file `r`n } catch [exception] { write-host "unable to parse perforce output for requisite files:" write-host $_.exception.message exit 3 } ############################################################################### ## ##4. confirm that the checkpoint was correctly written to disk by comparing ## the md5 checksum of the checkpoint with the .md5 file created by p4d -jc. ## ############################################################################### print("confirming checkpoint...") try { $server = "d:\" $index1 = $result.indexof("= ") $md5 = $result.substring($index1 + 2, 32) write-host checksum = $md5 `r`n $result = get-content $server\$md5file write-host $result`r`n $result = $result.contains($md5) if ($result -eq $false) { write-host "checkpoint md5 checksum failed. " + $md5 + " not found in $md5file" exit 4 } else { write-host checksum verified for $checkpointfile `r`n } } catch [exception] { write-host "failed to compare checkpoint md5:" write-host $_.exception.message exit 5 } ############################################################################### ## ## compress ## ############################################################################### print("compressing backup...") $server = "d:\" $depot = "depot" $compression = "-mx9" $zipdestination = "d:\backup\intermediary\" $zipname = $now.tostring("yyyy-mm-dd-hhmmss") + "_perforce_w_backup.7z" $result = archive $zipdestination$zipname $server\$depot\*, $server\$checkpointfile, $server\$checkpointfile.md5, $server\$journalfile $compression ############################################################################### ## ##4a. upload ## ############################################################################### print("uploading backup...") $webdav = "https://dav.box.com/dav/" + $zipname $username = "yourusername" $password = "yourpassword" $result = uploadtowebdav $webdav $username $password $zipdestination$zipname write-host "done`r`n" #todo verify copy ############################################################################### ## ##4b. delete intermediary ## ############################################################################### print("cleaning up...") remove-item $zipdestination$zipname write-host "done`r`n" print("weekly backup complete") exit 0 you'll notice at the end there i clean up the intermediary local zip file, and there's additional work needed to verify the upload once complete. but hopefully this will get a lot of you started if looking to backup your depot automatically. leave a comment if there are any steps which aren't clear and i'll either write a follow-up or amend this post. caveat!! i am yet to test the backups produced by this process. i'm in the process of moving house and once settled i will be running the collection of weekly backups through a restore process. like the old adage goes; "backups usually succeed, it's restores that often fail." if i get time i'll write a follow-up article covering the restore process. unit testing c# attributes 01 mai 2013 adam programming (0) this'll be a quick blog post. i've just needed to unit test the fact that certain controller actions are decorated with the authorizeattribute and that it's roles property contains the correct roles. my first stab was a convoluted process of trying to stub out the httpcontext and returning certain users that may or may not be a member of the target roles. then i was firing the controller's action and testing the actionresult for the correct redirection. this was as stupid as it sounds. the correct (not to mention succinct approach) i found on so : var attributes = typeof(somecontroller) .getmethod("somemethod", new type[] { }).getcustomattributes(true); var attribute = attributes.oftype<authorizeattribute>().single(); assert.areequal("some role, some other role", attribute.roles); one extension i'm thinking of adding to this is to loop over a bunch of parameterised methods and testing for roles. setting up a private nuget server 26 april 2013 adam programming (0) after seeing many different attempts at managing third party library references in large scale applications, i've seen lots of things that simply don't work and very few things that almost work. the solution du jour at work was originally to reference everything out of a lib folder beneath the solution under source control. this at least meant a get latest/build was possible (although a little clunky) and everything was version controlled. it was all just a little manual and prone to error as a result. eventually we moved across to nuget for third party libs which solved almost all of those problems over night. the only remaining problem (which continued to be solved via the lib folder) was internal libraries written by our team. serendipitously i had recently attended a talk discussing how to leverage nuget within the enterprise, which covered how to set up a nuget package server internal to your network. this could then be used to serve your libraries benefiting from all the great features of nuget, without having to make them public. how to set up a nuget server following the great advice detailed over at docs.nuget.org i was able to get a server setup and serving packages in less than an hour. the basic steps you need to take are: start by creating a new empty web application in visual studio and adding a reference to the nuget.server package . this essentially turns your web app into a nuget package server. optionally tweak the folder where your packages will be stored by editing the packagespath appsetting. from this point the server is good to go but you'll probably want to start adding packages so that they are available to install by your users. simply copy packaged nupkg files into the servers package folder for them to show up in the feed. deploy this site as you would any other site and check you receive a message along the lines of "you are running nuget.server vxxx" when visiting it. finally you (and anyone who wants to pull from this server) need to add the site's url to your local nuget package manager. click on tools->library package manager->package manager settings , give your new source a name and point it at the url created in the previous step and click add. that's it. the packages within your new local nuget server should now show up when adding reference from the nuget dialogue. how to create a nuget package there are only 7 straight forward steps you need to take in order to turn your project into a .nupkg: create a specification file by running the command nuget spec from your project route. this will create a kind of manifest file that nuget will use to detail your package. review and amend the nuspec file created to ensure it reflects your project's particulars. copy over any content you want copied upon installation of your package into the content folder. if any of your code requires pre-processing when on the target machine add .pp to the file names within the content folder and replace anything required with the relevant macros . do the same for the web.config. optionally add an install.ps1 and/or uninstall.ps1 to the tools folder to take care of any actions needed on install or uninstall. finally issue a nuget pack command to crush all of that into a .nupkg file ready for submission. other types of nuget private repositories there are other ways of hosting package files locally. you could just point nuget at a local path containing your packages. this approach has the benefit of being very straight forward but may not scale well when you factor in permissions and network connectivity. another option is commercially hosted nuget servers. some products which provide this service include: myget proget artifactory nexus one thing to bear in mind when hosting your packages with external companies is to double check the small print. if you require complete ownership of your product, be sure you don't relinquish your ownship when uploading to these providers. also think about security when signing up, who has access to what? are there any downsides to hosting your own nuget server? obviously you need to put the time in to get things up and running and keeping it running. although once on it's feet, this server should need minimal administration. also this approach requires dedicated buy-in from the entire team. unless you can force this approach onto your team, they'll need to follow your lead when getting their packages in this way. don't underestimate this point. all the best will in the world is useless in the face of developers not prepared to move forward. one final point is that the nuget.server is ultimately just a read-only rss feed, so the publishing is entirely manual. more control but more hassle. some parting advice; do yourself a favour if you're venturing into the world of publishing or consuming nuget packages and download nuget package explorer . it'll let you browse the contents of a package prior to installing it. don't forget nuget packages execute powershell scripts so unless you completely trust the publisher it's often prudent to scan through the contents before running it against your machine. talk talk router and fibre optic modem 16 april 2013 adam technology (0) it's now been some time since i had talktalk's fibre optic broadband installed so i thought i'd write a quick article about how i've found the service and hardware so far. as i mentioned in my previous post about what to expect from the installation i was very happy with how everything went and the performance i was getting. i'm pleased to say that the performance has been reasonably consistent up to this point with an average download speed of ~16mbps and upload <2mbps. although the upload is a little slow i haven't needed to push it too far yet. router technical details the router itself is actually a rebranded huawei hg533 which i understand is a far cry from the less attractive, older, white d-link model . the router sports a handy wps button which gives easy connection to the wlan for devices that support it. rather then trying to connect to the wlan and punching in the key when prompted, wps allows you to simply press the button on the side of the router to put it into negotiate mode. this then allows your device to establish a connection automatically and bypass the need to manually provide a key. one thing that did annoy me about the router was the obligatory 'basic mode' splash screen you have to click through once you've logged in. which is compounded by a confirmation dialog when 'advanced mode' is clicked. however, once safely inside the advanced section the options become much more usable. i must say, the options inside the advanced section of the router's administration interface are considerably more granular then the routers i'm used to. so this was a major plus for me. i have also read that these routers support bridging which is something i've been keen to incorporate into my home network ever since i reconfigured the layout. gaming performance i've finally had a chance to run the line through some online gaming to see if those ellusive <20ms pings could be achieved and on a good server i can confirm very good speeds on the line. maybe even the best on the servers i was playing. with these low latencies i now have only myself to blame for a missed shot! in conclusion this router has so-far surpassed a lot of my expectations. it's by no means perfect and there is still a lot to look through and get to grips with, but it is easily one of the better routers i've had to work with. technical specifications dimensions 143mm x 186mm x 38mm weight ~250g wlan 802.11b/g/n wireless transmission speeds b: 11mbit/s g: 54mbit/s n: 300mbit/s improving the c# enum 19 märz 2013 adam programming (0) i like enums. yet i've seen a lot of developers prefer to litter their code with magic numbers seemingly oblivious to the pain this will cause the developers who need to maintain it. enums are just one approach to helping readers of your code know precisely why the value 42 is important when comparing it against some value in a database. enums however, as we all know, come with a breed of problems which may sometimes need to be architectured around: they can be assigned unexpected values. var badvalue = (myenum)123; will force the value 123 into the variable which for all intents and purposes could be out of range. they have a default value. because enums are essentially integral integers they will have a default value when declared. this will mean they will be set to zero by default which predicates the need for a default field which is assigned a zero value. something like enum direction { none = 0, north, east, south, west } . note here the zero is optional in this example. there are lots of ways to solve the issues inherent to enums. for example; if your enum exists to list some states of an object or system; consider using the state pattern . if you're listing actions then the command pattern may be more appropriate. also if the enum ends up controlling some code branching then the strategy pattern could be a better choice. enumeration classes if you really need enums there is a final pattern which i've seen used to great effect in many code bases and is gaining popularity with me. the idea is to turn the enum into a class and add static readonly fields to it to access each of the supported values. so in the example of colours you might see something like this: public class colour<t> //yes i'm british, move on { public t value { get; set; } public string name { get; set; } public static readonly colour<int> red = new colour { value = 1, name = "red" }; public static readonly colour<int> green = new colour { value = 2, name = "green" }; public static readonly colour<int> blue = new colour { value = 3, name = "blue" }; } once i became familiar with this technique i started to see ways in which i could improve it (like supporting comparisons etc.) so i researched further and found this little piece of knowledge by jimmy bogard . jimmy proposes extending this pattern by introducing a base class which provides much of the functionality to support a 'rich-enum' design: public abstract class enumeration : icomparable { private readonly int _value; private readonly string _displayname; protected enumeration() { } protected enumeration(int value, string displayname) { _value = value; _displayname = displayname; } public int value { get { return _value; } } public string displayname { get { return _displayname; } } public override string tostring() { return displayname; } public static ienumerable<t> getall<t> where t : enumeration, new() { var type = typeof(t); var fields = type.getfields(bindingflags.public | bindingflags.static | bindingflags.declaredonly); foreach (var info in fields) { var instance = new t(); var locatedvalue = info.getvalue(instance) as t; if (locatedvalue != null) { yield return locatedvalue; } } } public override bool equals(object obj) { var othervalue = obj as enumeration; if (othervalue == null) { return false; } var typematches = gettype().equals(obj.gettype()); var valuematches = _value.equals(othervalue.value); return typematches && valuematches; } public override int gethashcode() { return _value.gethashcode(); } public static int absolutedifference(enumeration firstvalue, enumeration secondvalue) { var absolutedifference = math.abs(firstvalue.value - secondvalue.value); return absolutedifference; } public static t fromvalue<t>(int value) where t : enumeration, new() { var matchingitem = parse<t, int>(value, "value", item => item.value == value); return matchingitem; } public static t fromdisplayname<t>(string displayname) where t : enumeration, new() { var matchingitem = parse<t, string>(displayname, "display name", item => item.displayname == displayname); return matchingitem; } private static t parse<t, k>(k value, string description, func<t, bool> predicate) where t : enumeration, new() { var matchingitem = getall<t>().firstordefault(predicate); if (matchingitem == null) { var message = string.format("'{0}' is not a valid {1} in {2}", value, description, typeof(t)); throw new applicationexception(message); } return matchingitem; } public int compareto(object other) { return value.compareto(((enumeration)other).value); } } lovely, solid stuff. although my first change was to generalise the class. further improvements i asked a question on stack overflow back in 2008 about implicit conversions of enums and how come c# doesn't support it (c++ does). the above pattern clearly allows this and the answers i received, extend jimmy's ideas and provide a very rich set of features for working with classes that behave like enums. here's the tl;dr version: using system; using system.collections.generic; using system.componentmodel; using system.diagnostics; using system.linq; using system.reflection; using system.resources; namespace nmatrix { [debuggerdisplay("{value} ({name})")] public abstract class richenum<tvalue, tderived> : iequatable<tderived>, icomparable<tderived>, icomparable, icomparer<tderived> where tvalue : struct, icomparable<tvalue>, iequatable<tvalue> where tderived : richenum<tvalue, tderived> { #region backing fields /// <summary> /// the value of the enum item /// </summary> public readonly tvalue value; /// <summary> /// the public field name, determined from reflection /// </summary> private string _name; /// <summary> /// the descriptionattribute, if any, linked to the declaring field /// </summary> private descriptionattribute _descriptionattribute; /// <summary> /// reverse lookup to convert values back to local instances /// </summary> private static readonly sortedlist<tvalue, tderived> _values = new sortedlist<tvalue, tderived>(); #endregion #region constructors protected richenum(tvalue value) { this.value = value; _values.add(value, (tderived)this); } #endregion #region properties public string name { get { return _name; } } public string description { get { if (_descriptionattribute != null) return _descriptionattribute.description; return _name; } } #endregion #region initialization static richenum() { var fields = typeof(tderived) .getfields(bindingflags.static | bindingflags.getfield | bindingflags.public) .where(t => t.fieldtype == typeof(tderived)); foreach (var field in fields) { /*var dummy =*/ field.getvalue(null); // forces static initializer to run for tderived tderived instance = (tderived)field.getvalue(null); instance._name = field.name; instance._descriptionattribute = field.getcustomattributes(true).oftype<descriptionattribute>().firstordefault(); } } #endregion #region conversion and equality public static tderived convert(tvalue value) { return _values[value]; } public static bool tryconvert(tvalue value, out tderived result) { return _values.trygetvalue(value, out result); } public static implicit operator tvalue(richenum<tvalue, tderived> value) { return value.value; } public static implicit operator richenum<tvalue, tderived>(tvalue value) { return _values[value]; } public static implicit operator tderived(richenum<tvalue, tderived> value) { return value; } public override string tostring() { return _name; } #endregion #region iequatable<tderived> members public override bool equals(object obj) { if (obj != null) { if (obj is tvalue) return value.equals((tvalue)obj); if (obj is tderived) return value.equals(((tderived)obj).value); } return false; } bool iequatable<tderived>.equals(tderived other) { return value.equals(other.value); } public override int gethashcode() { return value.gethashcode(); } #endregion #region icomparable members int icomparable<tderived>.compareto(tderived other) { return value.compareto(other.value); } int icomparable.compareto(object obj) { if (obj != null) { if (obj is tvalue) return value.compareto((tvalue)obj); if (obj is tderived) return value.compareto(((tderived)obj).value); } return -1; } int icomparer<tderived>.compare(tderived x, tderived y) { return (x == null) ? -1 : (y == null) ? 1 : x.value.compareto(y.value); } #endregion public static ienumerable<tderived> values { get { return _values.values; } } public static tderived parse(string name) { foreach (tderived value in values) if (0 == string.compare(value.name, name, true)) return value; return null; } } } enums aren't always evil please don't read this post as an attempt to bad-mouth the humble enum. i am a fan, as i mentioned at the beginning. my advice here is that their usage should be tempered with an informed understanding of their strengths and weaknesses. this will hopefully lead to cleaner, coherent and more managable code. installing typescript on non windows 7 machine 25 januar 2013 adam programming (0) after discovering the potential of microsoft's latest language offering typescript , i feverishly set about researching whether or not i could get it working in the office. unfortunately i'm stuck in the 80's running windows server 2003 which needless to say, slows me down at every conceivable turn. installing bleeding edge tech on a decade old os is like trying to talk a 2 year old into taking advantage of a lie-in every morning! my first port of call was to find out if it was even possible. turns out the installer for the typescript plugin itself won't even run below win7 (including vista?), so i needed to find another way around. after futile attempts to get webmatrix installed (along with the plugin) i gave up that idea and dug around a bit more. fortunately i remembered i had a windows 7 vm instance installed on my machine which meant i could theoretically install vs2012 web express and install the plugin on that. then compile the ts files back out to my project repo and consume the js files as normal. once downloaded and installed, i grabbed the plugin and checked everything was working. the next and final step was to run the compiler (surely the typescript 'compiler' is a translator ? nevermind.). currently i'm running tsc.exe from the command prompt which means i need to point it at my project root using a unc share. if you try and run tsc \\someshare you'll be greeted with cmd's cmd does not support unc paths as current directories. . however! a little known fact about cmd is the ability to push and pop unc paths using the pushd and popd commands. this will promote the share to a first class directory within your session and let you 'compile' to and from this directory in cmd. so now i'm developing typescript inside a windows 7 vm, running visual studio 2012 web dev express, and outputting the translated js into my projects directory ready for use. less than elegant, but a workable workaround until the upgrade fairies look upon me kindly. setting readonly fields from chained constructors 23 januar 2013 adam programming (0) i had to figure out a design recently which required setting immutable state from chained constructors having trivial logic performed prior to initialisation. when performing common logic inside chained constructors it's oft-recommended to isolate the functionality out into a variant of an initialise() private method which is invoked from the last (master) constructor in the chain. something like: public myclass(int data) : this(data, null) { } public myclass(int somenumber, string sometext) { initialise(somenumber, sometext); } private void initialise(int somenumber, int sometext) { //some logic prior to initialising the object's state } simple stuff. it get's slightly more complicated when the objects fields are declared as readonly . this means the c# compiler will not allow you to initialise the fields outside a constructor or class level. if some centralised (due to chaining) logic is required prior to their initialisation, the described initialisation() method above will throw the afore mentioned compile error. one solution, which certainly isn't the most aesthetic, is to call the initialise method passing each readonly field in as out params. this allows you to perform your logic and initialise the readonly fields outside the constructors. example: private readonly int _somenumber; private readonly string _sometext; public myclass(int somenumber) : this(data, null) { } public myclass(int somenumber, string sometext) { initialise(out _somenumber, somenumber, out _sometext, sometext); } private void initialise(out int _somenumber, int somenumber, out string _sometext, string sometext) { //some logic prior to initialising the object's state } further reading: so question which helped me solve the issue. designing a data structure to hold 2d isometric map data 19 januar 2013 adam rise (0) currently i'm at the point in rise where i'm trying to take the data stored in the map file and translate it to a structure that allows me to efficiently render it to screen. i have to store each tile in a sort of 'stack' which holds all the height information for things like walls and buildings. my first attempt stored these tiles as an array within the larger array of all the map tiles. i optimised my tile type down to 16 bytes and _was_ planning on having maps as big as 1024x1024. with this structure my current in memory footprint for all this map data was weighing in at an easy 300+ meg! clearly a re-think was required. the problem i see with this approach is the redundant tiles stored for areas of the map which are completely flat. and lets face it that will be most of the map (on average). therefore my next approach will be to store the tiles as more of a linked list and forego the ability to perform random access. i'll try to keep you posted on exactly how i end up doing this. dan maxwell lends a hand 15 januar 2013 adam rise (0) after many attempts at working out an art workflow for rise i decided to call upon the talents of a good friend of mine to help with the asset creation. dan maxwell is an accomplished digital artist who's been working on game art for the past few years, particularly the cross platform series of gamebook adventures that are proving increasingly popular on the hand held devices. with experience in web design and print also, i'm confident dan has the expertise to deliver the visuals i'm looking for in rise as well as the professionalism to help me bring the project to completion. you can see examples of dan's work on his behanced portfolio and further contact details via linkedin . hopefully, i'll soon be able to start posting some visuals as the project starts to take shape. << older posts newer posts >> newer posts 1 2 older posts textbox widget example - adding any formatted html code to the widget . category list cgi (1) game development (1) programming (12) rise (3) technology (4) post list nhs health and symptom checker released backing up a perforce database unit testing c# attributes setting up a private nuget server talk talk router and fibre optic modem improving the c# enum installing typescript on non windows 7 machine setting readonly fields from chained constructors designing a data structure to hold 2d isometric map data dan maxwell lends a hand newsletter get notified when a new post is published. enter your e-mail comment list retrieving and displaying assembly version info in mvc views (2) adam wrote: thanks! retrieving and displaying assembly version info in mvc views (2) quiz for kids wrote: nice blog on education strategy, thanks for such a... comment rss month list 2013 juli (1) juni (1) mai (1) april (2) märz (1) januar (5) 2012 november (6) copyright © 2018 - adam james naylor powered by blogengine.net

URL analysis for adamjamesnaylor.com


http://www.adamjamesnaylor.com/category/feed/cgi
http://www.adamjamesnaylor.com/post/setting-up-a-private-nuget-server
http://www.adamjamesnaylor.com/contact
http://www.adamjamesnaylor.com/2013/06/default
http://www.adamjamesnaylor.com/post/backing-up-a-perforce-database
http://www.adamjamesnaylor.com/2013/05/default
http://www.adamjamesnaylor.com/post/setting-readonly-fields-from-chained-constructors#comment
http://www.adamjamesnaylor.com/post/improving-the-c-enum#comment
http://www.adamjamesnaylor.com/post/dan-maxwell-lends-a-hand#comment
http://www.adamjamesnaylor.com/category/programming
http://www.adamjamesnaylor.com/post/installing-typescript-on-non-windows-7-machine#comment
http://www.adamjamesnaylor.com/2012/09/26/what-to-expect-from-a-talk-talk-fibre-optic-installation.aspx
http://www.adamjamesnaylor.com/category/feed/rise
http://www.adamjamesnaylor.com/post/retrieving-and-displaying-assembly-version-info-in-mvc-views#comment
http://www.adamjamesnaylor.com/post/setting-readonly-fields-from-chained-constructors
nhsdirect.nhs.uk
nhs.uk

Whois Information


Whois is a protocol that is access to registering information. You can reach when the website was registered, when it will be expire, what is contact details of the site with the following informations. In a nutshell, it includes these informations;

Domain Name: ADAMJAMESNAYLOR.COM
Registry Domain ID: 1658394306_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.tucows.com
Registrar URL: http://www.tucowsdomains.com
Updated Date: 2017-04-27T09:14:17Z
Creation Date: 2011-05-27T09:12:06Z
Registry Expiry Date: 2019-05-27T09:12:06Z
Registrar: Tucows Domains Inc.
Registrar IANA ID: 69
Registrar Abuse Contact Email:
Registrar Abuse Contact Phone:
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
Name Server: NS1.LIVEDNS.CO.UK
Name Server: NS2.LIVEDNS.CO.UK
Name Server: NS3.LIVEDNS.CO.UK
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2017-09-20T12:55:43Z <<<

For more information on Whois status codes, please visit https://icann.org/epp

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.

  REGISTRAR Tucows Domains Inc.

SERVERS

  SERVER com.whois-servers.net

  ARGS domain =adamjamesnaylor.com

  PORT 43

  TYPE domain

DOMAIN

  NAME adamjamesnaylor.com

  CHANGED 2017-04-27

  CREATED 2011-05-27

STATUS
clientTransferProhibited https://icann.org/epp#clientTransferProhibited
clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited

NSERVER

  NS1.LIVEDNS.CO.UK 213.171.192.250

  NS2.LIVEDNS.CO.UK 213.171.193.250

  NS3.LIVEDNS.CO.UK 213.171.192.254

  REGISTERED yes

Go to top

Mistakes


The following list shows you to spelling mistakes possible of the internet users for the website searched .

  • www.uadamjamesnaylor.com
  • www.7adamjamesnaylor.com
  • www.hadamjamesnaylor.com
  • www.kadamjamesnaylor.com
  • www.jadamjamesnaylor.com
  • www.iadamjamesnaylor.com
  • www.8adamjamesnaylor.com
  • www.yadamjamesnaylor.com
  • www.adamjamesnaylorebc.com
  • www.adamjamesnaylorebc.com
  • www.adamjamesnaylor3bc.com
  • www.adamjamesnaylorwbc.com
  • www.adamjamesnaylorsbc.com
  • www.adamjamesnaylor#bc.com
  • www.adamjamesnaylordbc.com
  • www.adamjamesnaylorfbc.com
  • www.adamjamesnaylor&bc.com
  • www.adamjamesnaylorrbc.com
  • www.urlw4ebc.com
  • www.adamjamesnaylor4bc.com
  • www.adamjamesnaylorc.com
  • www.adamjamesnaylorbc.com
  • www.adamjamesnaylorvc.com
  • www.adamjamesnaylorvbc.com
  • www.adamjamesnaylorvc.com
  • www.adamjamesnaylor c.com
  • www.adamjamesnaylor bc.com
  • www.adamjamesnaylor c.com
  • www.adamjamesnaylorgc.com
  • www.adamjamesnaylorgbc.com
  • www.adamjamesnaylorgc.com
  • www.adamjamesnaylorjc.com
  • www.adamjamesnaylorjbc.com
  • www.adamjamesnaylorjc.com
  • www.adamjamesnaylornc.com
  • www.adamjamesnaylornbc.com
  • www.adamjamesnaylornc.com
  • www.adamjamesnaylorhc.com
  • www.adamjamesnaylorhbc.com
  • www.adamjamesnaylorhc.com
  • www.adamjamesnaylor.com
  • www.adamjamesnaylorc.com
  • www.adamjamesnaylorx.com
  • www.adamjamesnaylorxc.com
  • www.adamjamesnaylorx.com
  • www.adamjamesnaylorf.com
  • www.adamjamesnaylorfc.com
  • www.adamjamesnaylorf.com
  • www.adamjamesnaylorv.com
  • www.adamjamesnaylorvc.com
  • www.adamjamesnaylorv.com
  • www.adamjamesnaylord.com
  • www.adamjamesnaylordc.com
  • www.adamjamesnaylord.com
  • www.adamjamesnaylorcb.com
  • www.adamjamesnaylorcom
  • www.adamjamesnaylor..com
  • www.adamjamesnaylor/com
  • www.adamjamesnaylor/.com
  • www.adamjamesnaylor./com
  • www.adamjamesnaylorncom
  • www.adamjamesnaylorn.com
  • www.adamjamesnaylor.ncom
  • www.adamjamesnaylor;com
  • www.adamjamesnaylor;.com
  • www.adamjamesnaylor.;com
  • www.adamjamesnaylorlcom
  • www.adamjamesnaylorl.com
  • www.adamjamesnaylor.lcom
  • www.adamjamesnaylor com
  • www.adamjamesnaylor .com
  • www.adamjamesnaylor. com
  • www.adamjamesnaylor,com
  • www.adamjamesnaylor,.com
  • www.adamjamesnaylor.,com
  • www.adamjamesnaylormcom
  • www.adamjamesnaylorm.com
  • www.adamjamesnaylor.mcom
  • www.adamjamesnaylor.ccom
  • www.adamjamesnaylor.om
  • www.adamjamesnaylor.ccom
  • www.adamjamesnaylor.xom
  • www.adamjamesnaylor.xcom
  • www.adamjamesnaylor.cxom
  • www.adamjamesnaylor.fom
  • www.adamjamesnaylor.fcom
  • www.adamjamesnaylor.cfom
  • www.adamjamesnaylor.vom
  • www.adamjamesnaylor.vcom
  • www.adamjamesnaylor.cvom
  • www.adamjamesnaylor.dom
  • www.adamjamesnaylor.dcom
  • www.adamjamesnaylor.cdom
  • www.adamjamesnaylorc.om
  • www.adamjamesnaylor.cm
  • www.adamjamesnaylor.coom
  • www.adamjamesnaylor.cpm
  • www.adamjamesnaylor.cpom
  • www.adamjamesnaylor.copm
  • www.adamjamesnaylor.cim
  • www.adamjamesnaylor.ciom
  • www.adamjamesnaylor.coim
  • www.adamjamesnaylor.ckm
  • www.adamjamesnaylor.ckom
  • www.adamjamesnaylor.cokm
  • www.adamjamesnaylor.clm
  • www.adamjamesnaylor.clom
  • www.adamjamesnaylor.colm
  • www.adamjamesnaylor.c0m
  • www.adamjamesnaylor.c0om
  • www.adamjamesnaylor.co0m
  • www.adamjamesnaylor.c:m
  • www.adamjamesnaylor.c:om
  • www.adamjamesnaylor.co:m
  • www.adamjamesnaylor.c9m
  • www.adamjamesnaylor.c9om
  • www.adamjamesnaylor.co9m
  • www.adamjamesnaylor.ocm
  • www.adamjamesnaylor.co
  • adamjamesnaylor.comm
  • www.adamjamesnaylor.con
  • www.adamjamesnaylor.conm
  • adamjamesnaylor.comn
  • www.adamjamesnaylor.col
  • www.adamjamesnaylor.colm
  • adamjamesnaylor.coml
  • www.adamjamesnaylor.co
  • www.adamjamesnaylor.co m
  • adamjamesnaylor.com
  • www.adamjamesnaylor.cok
  • www.adamjamesnaylor.cokm
  • adamjamesnaylor.comk
  • www.adamjamesnaylor.co,
  • www.adamjamesnaylor.co,m
  • adamjamesnaylor.com,
  • www.adamjamesnaylor.coj
  • www.adamjamesnaylor.cojm
  • adamjamesnaylor.comj
  • www.adamjamesnaylor.cmo
Show All Mistakes Hide All Mistakes