Re: [OT] WMWare slow Windows 10
Hi I bet you've already checked this, but have you disactivated windows update sharing? It's in advanced options of the windows update dialog under how I receive updates (my windows is in french so that's my guess) Turn all sharing off, it will still pull updates from the host machine, leave the fm on overnight when it's patch day. Davy Sent from my iPhone > On 17 May 2017, at 05:06, Ken Schaeferwrote: > > I guess you need to check whether it’s an OS issue (e.g. check Windows Event > Log inside the guest VM), or a VMWare issue (are you running the latest > version of VMWare Workstation? Updated the VMTools etc? > > From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On > Behalf Of Greg Keogh > Sent: Wednesday, 17 May 2017 10:58 AM > To: ozDotNet > Subject: [OT] WMWare slow Windows 10 > > Folks, for years I've used free WMware Workstation to run Windows XP, Vista, > 8.x and 10, also Ubuntu. I'm currently up to VMWare v12. > > All of the guest operating systems running smooth and fast, EXCEPT Windows > 10, which is so slow it can take 6 minutes just to launch VS2017, and > everything is unbearably sluggish. > > I've compared all the VM settings, web searched and poked around but can't > find anything obvious that causing this. Has anyone seen this sort of thing > and got any ideas? > > GK
Re: resources.dll not found
Hi Greg Check that your properties.cs has the same names as in the Rex file. I've seen them get out of sync before and had this same error. Davy Sent from my iPhone > On 27 Feb 2017, at 06:35, Greg Keoghwrote: > > I also suspect that some update in either iOS, XCode, OS X, Xamarin Forms or > some other packages is causing my problem. And because there are so many > fragile dependencies in the Xamarin world, it's really hard to know who to > blame. I will probably follow your suggestion and unreference everything and > add it all back again. I hope I don't have to downgrade, as that would be > more error-prone work -- GK > >> On 27 February 2017 at 15:56, David Richards >> wrote: >> Greg, >> >> I agree with you regarding Xamarin development. I can't believe how much >> time I've wasted because of bugs in Xamarin. >> >> I've seen your problem before some time ago but I can't remember what the >> solution was. These kinds of problems happen so often I stopped taking >> notice and just start doing "magical" things to fix them. >> >> Things that I now try to fix mysterious problems that shouldn't occur: >> - Close then reopen the solution. >> - Quit and relaunch Xamarin Studio. >> - Take note of the packages being used. Remove them all. Add them all back >> again. Start with Forms as this will add many of them automatically. >> >> These are my day-to-day fixes that resolve 90% of mysterious problems. >> >> Last week there was an update. I made the mistake of installing this on >> Thursday and it took all up a full day to fix the mess it made. The latest >> version crashed when trying to open projects and seems to have changed the >> way some projects are compiled. For example, in one class, it was skipping >> functions altogether. I had to downgrade to fix it. >> >> I've also found references sometimes get messed up and can't be fixed within >> Xamarin Studio. So I manually add them in the project files. >> >> David >> >> "If we can hit that bullseye, the rest of the dominoes >> will fall like a house of cards... checkmate!" >> -Zapp Brannigan, Futurama >> >> On 27 February 2017 at 14:27, Greg Keogh wrote: Have you tried deleting the resource file (or all of them if more than one) and creating a new one from scratch? Just a stab in the dark. >>> >>> Sort of, I added a fresh test resx file (leaving the old one) and it also >>> generated the same error inside the GetString method. I also tried >>> different cultures, including the invariant one, but no luck. I may as you >>> say, remove ALL resx, clean, put one back and try again. I've got nothing >>> to lose except more hours of my time - GK >> >
Re: Used Azure SQL DB? Why or why not?
That sounds like the app that I'm fighting with each day. I wish they would give us the time to sort it out and migrate to azure, perhaps then I would be able to work from home more often. Davy Sent from my iPhone > On 31 Jan 2017, at 05:24, Greg Low (罗格雷格博士)wrote: > > Recently I saw one where for every command, instead of just executing the SQL > command, the framework did this:
Re: [OT] IT in 'The Martian'
Pathfinder (1996) was a very low tech / love cost proof of concept mission, so a hardened 8 bit processor is not out of the question. Nasa doesn't use of the shelf chips. In it's craft. That's why you will see laptops all over the place in Nasa footage, they don't meet the radiation proof specs of Nasa but are not mission critical. Converting. A - 65 to hex I would need a chart too, or a bit of paper and a pen. Davy Sent from my iPhone > On 6 Jan 2017, at 03:13, Greg Keoghwrote: > Folks, we watched The Martian last night on a friend's huge TV with 3-D > glasses (which really work, it's a technical marvel). Fabulous looking movie, > a bit too long, clearly targeted for the big screen and those sorts of > audiences, science stretched to the limits of credibility but you don't > really care. > > I noticed that IT played a small co-starring role. One astrophysicist boffin > was huddled in the corridor of a super-computer centre with his laptop > plugged directly into one of the racks running slingshot orbit simulations > (is it faster that way?). Matt Damon communicating with a camera pointing to > base-16 placards (he shamefully needed an ASCII chart to decode the digits). > > Matt is using a hex editor at one point to directly to allow cross-probe > communication. I'm not sure if that hex was actually anything like > recognisable machine code, or it was real Mars Rover code from 2006 (did it > use a well-known chip and OS?) > > One lady in the mothership's crew must have been a highly skilled programmer, > as she had to do some emergency drastic refactoring of some sort (I can't > remember the details now). > > A bit of cryptography/steganography ... a NASA guy sent a secret message to > one of the crew using a fake broken email attachment, but the message was > simply encoded as hex digits. > > There were lots of quick screen-shots showing nice graphics and source code. > Luckily they avoided the cliché of having ludicrous complicated meaningless > screens full of little windows and scrolling hex dumps (as in most action > movies, like Die Hard 4). I'm sure I noticed some actual LISP code at one > point, it was quick, but there were many lines of giveaway . A few > other times I saw function definitions in lower case with underscores, so > perhaps it was Python, but it was too quick to be sure. > > Greg K
Re: [OT] node.js and express
Don't waste your time with nodejs, it's an unmitigated nightmare. Someone will mention portability somewhere in the conversation and then you know how high the BS is. People hate microsoft, and especially .net because they have been around for longer than they can remember, it will pass Davy Sent from my iPhone > On 21 Nov 2016, at 07:48, Greg Keoghwrote: > > >> You're not alone Greg. It's like going back to spaghetti but everyone around >> me doesn't agree. > > Thanks heavens someone is sympathetic. I thought I was crazy, but I'm glad to > know you are too! -- Greg
Re: [OT] Ad tracking and security
I use, Adblock plus, Ghostery and no script. Every site I visit has JavaScript tuned off, then I choose which js to run until the site is functional. Some sites NY Times/huffpost for example have so many trackers / ad servers that I just close the window. Davy Sent from my iPhone On 5 Oct 2016, at 02:59, Greg Keoghwrote: >> I thought I’d read that even common adblocker programs are now deciding >> which ads to let through (ie: who has paid them to be “relevant”). I think >> “Adblock Plus” was the topic of the article. >> > > I've been using ABP for several months now in IE11 on my work machine, and > it's quite good, as it seems to remove a lot of garish garbage from the > screens, but not all. I have unticked "Allow some non-intrusive advertising". > The mere presence of such an option indicates that someone has gotten to the > ABP people and corrupted or bribed them into allowing certain paid ads > through. They claim this is an honest and necessary feature, but I think > they're a bunch of traitors to the intellectual aspirations of Western > Civilisation. > > I would like to add patterns to the ABP block list, but the documentation is > impenetrable or incomplete even to a developer, and when I did locate the > magic file and assumed it was the right one, adding my lines had no effect. > The file is gigantic and editing it manually is an unreliable experience. The > instructions on the ABP site don't seem to match reality, or they're talking > about different browsers and don't tell you that. I don't think ABP blocks > cookies, but I've not investigated. > > I have IE11 set to prompt for all cookies. For a couple of hours you will be > prompted to madness, but then it slows away to nothing and you can be sure > that only necessary ones are present. I wrote a small app to list cookies in > a grid and I can delete bad ones. > > GK
Apologies
I was clearing out my drafts folder and the last message got sent by mistake Davy Sent from my iPhone
Re: C# Classes to COM Exposed objects, Autogenerate tool
Hello, It's been a long time since I exposed .net objects to com, but I do remember that with multiple method signatures it makes doing com work a pain in the butt. Si hoc legere scis nimium eruditionis habes. > On Thu, Dec 10, 2015 at 1:10 AM, Arjang Assadi> wrote: > Does Anyone know about any Autogeneration tool to Wrap Existing Classes and > Generate COM exposed objects? I am doing it by hand, it tedious and error > prone, looks like an ideal use case for Roslyn or Resharper.
Re: [OT] Drive encryption
You are right, pro and above only Sent from my iPhone > On 08 Jul 2016, at 08:37, Greg Keoghwrote: > > I don't think Home edition has Bitlocker -- GK > >> On 8 July 2016 at 16:15, David Connors wrote: >> NFI re home edition but I have used BitLocker and also PGP Whole Disk >> Encryption. Both were fine and I didn't see any perf issues at all. >> >>> On Fri, 8 Jul 2016 at 15:59 Tom P wrote: >>> Hi folks, >>> >>> I'm looking to encrypt all data on my external drives and am very confused >>> by my researching so far. What methods do you recommend to do this? >>> >>> Also is BitLocker reliable to encrypt my laptop in general in case it gets >>> lost? I'm running Windows 7 home edition. >>> >>> Thanks >>> Tom >> >> -- >> David Connors >> da...@connors.com | @davidconnors | LinkedIn | +61 417 189 363 >
Re: REST calling REST
Hi I've read that article before, and unless you are working with the very latest version of sql server there are some very big pitfalls to avoid. I know where the code I'm supporting went wrong, all the calls to the database are wrapped in async await, where the database can't cope with the number of requests being made (Oracle 10g) By moving the async calls to the controllers I've increased the number of concurrent connections and the speed of both database and website. Davy Sent from my iPhone > On 21 Jun 2016, at 13:28, Adrian Halidwrote: > > This article may help. > It is very detailed and may have tips on where things have gone wrong. > > https://msdn.microsoft.com/en-us/magazine/dn802603.aspx > > > Regards > > Adrian Halid > > From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On > Behalf Of David Rhys Jones > Sent: Tuesday, 21 June 2016 4:01 PM > To: ozDotNet > Subject: Re: REST calling REST > > Hi > I run across this sort of oddity regulaly > I've just started a project to support an existing system, I recently came > across a DB call that was wrapped in an async await call, I found that it was > throwing exceptions 2 /3 of the time. > > I removed the async await, and the pallalel foreach to populate the objects, > and all was working correctly and running 2 seconds faster, the website > already calls the service async with ajax. > I'm against using async calls inside server code when accessing outside > resources. If the process is too long then it needs refactoring to simplify > the call. > > .02c > Davy > > > > Si hoc legere scis nimium eruditionis habes. > > > On Tue, Jun 21, 2016 at 4:42 AM, Greg Keogh wrote: > Are the calls on the same server? If so remove the async await, from the call > and try again, did you get an error? > > Yesterday I gave up and used a synchronous WebClient.DownloadString inside > the WebApi controller and it worked fine. > > Today as an experiment I rejigged the code a bit. I made the controller > method async Task and inside it I created two Task using > await WebRequest Task.Factory.FromAsync(beginxx,endxx). I did a WhenAll on > the two tasks and they all worked fine. > > One call was to localhost where I was debugging and the other to a remote > server. So today this has disproved my theory (like you had) that debugging > and calling localhost was a problem. Today it all just works! > > It opens up philosophical questions about where in the WebApi call stack > should the asynchrony start and stop. Web searches find lots of often > contradictory arguments and advice on this matter. > > GK >
Re: REST calling REST
Hi Are the calls on the same server? If so remove the async await, from the call and try again, did you get an error? Davy Sent from my iPhone > On 20 Jun 2016, at 08:47, Greg Keoghwrote: > > I sure I did this years ago, but maybe it was SOAP or REST, or a mix, I'm not > sure now. Today I've got a REST service A calling a REST service B and it > stalls on the await HttpClient.SendAsync in A. > > I can run the same code from an NUnit test okay. > > Surely this isn't impossible. Is there some trick I've forgotten? > > GK
[ot] Logon Windiws 10 AzureAD
Hey guys My account doesn't show up in the logon screen in Windows 10. Does anyone know how to use an Azure account to log on? Tried: DavidJones AzureAD\DavidJones david.jo...@myco.co.uk AzureAD\david.jo...@myco.co.uk Non of these seem to work, I managed to get out of an endless safe boot loop by logging on as the Administrator but my AD credentials can no longer be used. Any ideas? Davy Sent from my iPhone
Re: Excel reading surprise
Hi If you don't need to support xslb (binary format) Try DocumentFormat.OpenXml. In nuget Regards Davy Sent from my iPhone > On 28 Apr 2016, at 11:13, Greg Keoghwrote: > > Folks, here's an obscure and sad warning: I eventually got the OleDb code > from yesterday working to read XLSX files, after installing the > AccessDatabaseEngine_x64.exe file and discovering the correct sheet/table > name. The code works in NUnit tests. The code is actually called from a T4 > template in Visual Studio 2015, and the first time I called the code in anger > it said: > > System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is > not registered on the local machine. > > I'm guessing this is due to a bitness problem. You can't have both the 32 and > 64 bit providers installed, so I replaced the 64 bit with the 32 bit and > tried again but it says the table is incorrectly formatted. I tried changing > the connection string in various desperate ways but it just produces > different errors. > > So after the hours of suffering to get the XLSX file reading working and unit > tested, it was all an utter waste of time and I have to abandon it all and > find an alternative way of reading XLSX files in a T4 template. > > GK
Re: Reading XLSX files
Hey again Just looked at the code here, don't specify a query in the constructor pass it to the property after the connection is open. Hth Davy Sent from my iPhone > On 27 Apr 2016, at 14:20, Greg Keoghwrote: > > Folks, maybe 10 years ago I easily read the rows out of an XLS file using > OleDb and a reader. Today I tried to read an XLSX file the same way. First I > discovered I had to install AccessDatabaseEngine_x64.exe to be able to > register a provider to open the file. My test file has a single sheet named > Foo with a few rows of numbers. All the code combinations I've tried like the > one below die with: > > System.Data.OleDb.OleDbException : The Microsoft Access database engine could > not find the object 'Foo'. Make sure the object exists and that you spell its > name and the path name correctly. If 'Foo' is not a local object, check your > network connection or contact the server administrator. > > So I guess the sheet is acting like a table, but it's not found and I'm > flummoxed. Any ideas? Anyone done this sort of thing? > > Greg K > > string excelConnect = $"Provider=Microsoft.ACE.OLEDB.12.0;Data > Source={filename};Extended Properties=\"Excel 12.0 Xml;HDR=YES\";"; > using (var connect = new OleDbConnection(excelConnect)) > { > connect.Open(); > using (var command = new OleDbCommand("SELECT * FROM [Foo]", connect)) > { > using (var adapter = new OleDbDataAdapter(command)) > { >var ds = new DataSet(); >adapter.Fill(ds); >return new SchemaDef(); > } > } > }
Re: Parallel tasks
Hi If you are calling back to the ui thread it should be on as long as you don't try to update the same resource with two different methods / threads at the same time. If you do lock{} the update and wait for the interface to refresh. In my experience querying the same web service from multiple threads from multiple clients results it the web service slowing to an almost crawl. Cache as much as you can on the web service. Davy Sent from my iPhone On 27 Apr 2016, at 09:49, Greg Keoghwrote: >> If you are not waiting for the tasks to finish, won't you run into a race >> condition? > > The backend in my actual case is reading a web service, which can be hammered > by overlapping calls. All of the callbacks will run on the UI thread, so they > can't step on each other. I hope I'm right?! -- Greg
Re: Parallel tasks
Hi Greg If you are not waiting for the tasks to finish, won't you run into a race condition? Davy Sent from my iPhone On 27 Apr 2016, at 09:14, Greg Keoghwrote: >> You can shorten "f.Invoke()" to just "f()". You can elide "r" as well: >> >> new Action(async () => UpdateUI(await GetStuffAsync("key1")))(); >> new Action(async () => UpdateUI(await GetStuffAsync("key2")))(); >> new Action(async () => UpdateUI(await GetStuffAsync("key3")))(); > > I like that shortening, and it's in my code now. I forgot you can go > GetFunc()() because it looks so weird. Exception handling isn't a worry in > this case, luckily -- Greg
Re: Parallel tasks
I would add a callback in the get stuff call that can be used to update the ui Davy Sent from my iPhone > On 20 Apr 2016, at 09:34, Greg Keoghwrote: > > Folks, I want to make the parallel calls to a web service that can take 2 to > 5 seconds. It's like this now: > > Task t1 = GetStuffAsync("Key1"); > Task t2 = GetStuffAsync("Key2"); > Task t2 = GetStuffAsync("Key3"); > await t1; await t2; await t3; > UpdateUI(t1.Result); > UpdateUI(t2.Result); > UpdateUI(t3.Result); > > This runs the GetStuffs in parallel, but the UI doesn't update until all 3 > finish. What's the best way of rejigging this so that each get-and-update > runs in parallel? > > Greg
[ot] upgrading to windows 10
Hey guys Anyone got any advice on upgrading windows 7 to windows 10? Thanks Davy Sent from my iPhone
Re: static interop dll loading issue
I'm surprised that .4 is available on XP. Can you recompile for 3.5 instead? Davy Sent from my iPhone > On 24 Feb 2016, at 02:56, Preet Sanghawrote: > > Hey guys, > > I was wondering if there are any experts on here that may have come across an > issue that I've been working on all day. > > I have 32bit legacy program C++ (VS2010) that makes a call to the .net (4.0) > c# assembly via a static method on a class in the assembly. The call then > loads a windows form class and proceeds to provide some functionality. The > call is via a #using "... my assembly path.dll" in c++ file that is marked as > /clr. The whole calling dll/exe can't be marked as /clr due to it's legacy. > > This works on all tested architectures (w7+ 32/64/Server 2k8+/XP 64 bit) > except Windows XP 32 bit. On the XP 32 bit platform we think the CLR is not > loading before the static loader is loading my assembly dll and causing the > load to terminate. > > I'm not getting any system generated crashes or dumps and the event viewer is > conspicuous by it's silence. Any way I got to this stage by rebuilding > everything on the suspect machine and using VS 2010 and pressing PF5 and I > can see the crash in the load cycle. > > So what I'm asking for is clues as to how to go about further debugging or an > perhaps hints as further resources I can consume further my knowledge of the > loading process on this architecture. > > > (yes I know XP is out of support, unfortunately I'm unable to be likely drop > support in this release due to the client being a govt organisation). > > > > Preet, in Auckland NZ >
Re: VS2015 and Git
Try Downloading the windows git command line and install that. There are missing bits from 2015 Davy Sent from my iPhone > On 29 Jan 2016, at 08:11, David Connors <da...@connors.com> wrote: > > The in proc gitlib and a cygwin based cli both come with vs. > > >> On Fri, 29 Jan 2016, 5:06 PM Davy Jones <djones...@gmail.com> wrote: >> Hi >> >> Do you have git installed on the machine? I had no end of problems until I >> installed the command line version of git. >> >> Davy >> >> Sent from my iPhone >> >>> On 28 Jan 2016, at 08:06, Andrew Coates (DX AUSTRALIA) >>> <andrew.coa...@microsoft.com> wrote: >>> >> >>> My VS is telling me there’s an update to the GIT extensions too >>> >>> >>> >>> Andrew Coates, ME, MCPD, MCSD MCTS, Developer Evangelist, Microsoft, 1 >>> Epping Road, NORTH RYDE NSW 2113 >>> Ph: +61 (2) 9870 2719 • Mob +61 (416) 134 993 • Fax: +61 (2) 9870 2400 • >>> http://blogs.msdn.com/acoat >>> >>> >>> >>> From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] >>> On Behalf Of David Connors >>> Sent: Thursday, 28 January 2016 5:38 PM >>> To: ozDotNet <ozdotnet@ozdotnet.com> >>> Subject: Re: VS2015 and Git >>> >>> >>> >>> Have you installed Update 1 yet? I am just putting that on now and it >>> repaves GIT (says my current tools are deprecated). >>> >>> >>> >>> Might be a last resort before rebuild. >>> >>> >>> >> >>> On Thu, 28 Jan 2016 at 15:16 David Burstin <david.burs...@gmail.com> wrote: >>> >> >>> >>> >>> git show works perfectly. So does git log. And git diff. (No errors, >>> details shown) >>> >>> >>> >>> I too am out of ideas. Like I said, it is like MOST of VS works with Git, >>> just CodeLens and the dropdown don't. Looks like a reinstall is in order. >>> >>> >>> >>> David - thanks so much for your help. I really appreciate you taking the >>> time to try to find a fix for this. >>> >>> >>> >>> Cheers >>> >>> DB >>> >> >>> On 28 January 2016 at 16:04, David Connors <da...@connors.com> wrote: >>> >> >>> What happens if you open a GIT command prompt (Actions menu on the Branches >>> tab) and do a >>> >>> git show >>> >>> and >>> >>> git log >>> >>> >>> >>> ? >>> >>> >>> >>> Do you get any errors? Can you see the author detail in the log? >>> >>> >>> >>> Does git diff return any errors? >>> >>> >>> >>> I am just about out of ideas. >>> >> >>> On Thu, 28 Jan 2016 at 14:30 David Burstin <david.burs...@gmail.com> wrote: >>> >> >>> The URLs are exactly correct and the same as I use for Git to clone the >>> repo. >>> >> >>> On 28 January 2016 at 15:14, David Connors <da...@connors.com> wrote: >>> >> >>> In Team Explorer >>> >>> >>> >>> 1. Click Home >>> >>> 2. Click Settings >>> >>> 3. Click Repository Settings >>> >>> >>> >> >>> Scroll down and show what URLs are listed under Remotes. >>> >> >>> On Thu, 28 Jan 2016 at 13:53 David Burstin <david.burs...@gmail.com> wrote: >>> >> >>> I tried it for a toy project that I only have locally. Same deal - can see >>> history, etc, but no "authors/changes", no dropdown. >>> >>> >>> >>> Then tried it for a clone of the master repo, different branch. Same deal. >>> >>> >>> >>> :( >>> >>> >>> >>> >>> >>> All seems to point to Git/VS integration issue. Only half of VS can see >>> Git, consistently. >>> >>> >>> >> >>> On 28 January 2016 at 14:37, David Connors <da...@connors.com> wrote: >>> >> >>> You could try making a Hello World project / repo on your local machine and >>> seeing if that has the same issue (ie. to see if there is somet
Re: VS2015 and Git
Hi Do you have git installed on the machine? I had no end of problems until I installed the command line version of git. Davy Sent from my iPhone > On 28 Jan 2016, at 08:06, Andrew Coates (DX AUSTRALIA) >wrote: > > My VS is telling me there’s an update to the GIT extensions too > > Andrew Coates, ME, MCPD, MCSD MCTS, Developer Evangelist, Microsoft, 1 Epping > Road, NORTH RYDE NSW 2113 > Ph: +61 (2) 9870 2719 • Mob +61 (416) 134 993 • Fax: +61 (2) 9870 2400 • > http://blogs.msdn.com/acoat > > From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On > Behalf Of David Connors > Sent: Thursday, 28 January 2016 5:38 PM > To: ozDotNet > Subject: Re: VS2015 and Git > > Have you installed Update 1 yet? I am just putting that on now and it repaves > GIT (says my current tools are deprecated). > > Might be a last resort before rebuild. > > On Thu, 28 Jan 2016 at 15:16 David Burstin wrote: > > git show works perfectly. So does git log. And git diff. (No errors, details > shown) > > I too am out of ideas. Like I said, it is like MOST of VS works with Git, > just CodeLens and the dropdown don't. Looks like a reinstall is in order. > > David - thanks so much for your help. I really appreciate you taking the time > to try to find a fix for this. > > Cheers > DB > > On 28 January 2016 at 16:04, David Connors wrote: > What happens if you open a GIT command prompt (Actions menu on the Branches > tab) and do a > git show > and > git log > > ? > > Do you get any errors? Can you see the author detail in the log? > > Does git diff return any errors? > > I am just about out of ideas. > > On Thu, 28 Jan 2016 at 14:30 David Burstin wrote: > The URLs are exactly correct and the same as I use for Git to clone the repo. > > > On 28 January 2016 at 15:14, David Connors wrote: > In Team Explorer > > 1. Click Home > 2. Click Settings > 3. Click Repository Settings > > Scroll down and show what URLs are listed under Remotes. > > On Thu, 28 Jan 2016 at 13:53 David Burstin wrote: > I tried it for a toy project that I only have locally. Same deal - can see > history, etc, but no "authors/changes", no dropdown. > > Then tried it for a clone of the master repo, different branch. Same deal. > > :( > > > All seems to point to Git/VS integration issue. Only half of VS can see Git, > consistently. > > > On 28 January 2016 at 14:37, David Connors wrote: > You could try making a Hello World project / repo on your local machine and > seeing if that has the same issue (ie. to see if there is something borked in > your GIT/VS integration or maybe it is something to do with your local repo > for sumo?) > > On Thu, 28 Jan 2016 at 13:25 David Burstin wrote: > Turned off CodeLens. Shut down VS. Started VS. Loaded solution. Turned back > on CodeLens > > ...and exactly the same as before. > > Might try the old uninstall/reinstall VS2015 if I have a few hours spare. > > On 28 January 2016 at 14:16, David Connors wrote: > This is odd because I had the same issue with codelens when I ran up GIT but > I didn't do anything to fix it - it just started working. > > Did you want to turn all the code lens options off quit/reload/etc and turn > them back on to see if that kicks it into action? > > On Thu, 28 Jan 2016 at 13:09 David Burstin wrote: > I get the entire history! It clearly has no problem connecting to Git, just > that CodeLens and the branches dropdown don't work. Odd indeed! > > On 28 January 2016 at 14:06, David Connors wrote: > This is odd. What happens if you try and view history of master (right click > on View History on master in branches)? > > On Thu, 28 Jan 2016 at 12:34 David Burstin wrote: > This is the bit above the screenshot: > > > > This is after pressing the "home" button: > > > On 28 January 2016 at 13:17, David Connors wrote: > What does it say just above that screenshot? > > It looks like you're in the branches view. What do you get if you click the > little house/home button at the top of the Team Explorer window? > > On Thu, 28 Jan 2016 at 11:04 David Burstin wrote: > Thanks for the quick reply David. > > I installed it yesterday, so it's been a while. > > This is what CodeLens looks like - picks up references but no Git info. > > > This is what Team Explorer looks like: > > > Cheers > Dave > > > On 28 January 2016 at 11:49, David Connors wrote: > How long ago did you install it? Code Lens took a half hour to start working > for me. > > Can you send a screenshot of your team explorer? It sounds like you
Resume_MRebuffet.pdf
Hi guys, I asked a few weeks ago if anyone knew of positions going for a .net developer. My friend is now in Sydney and has sent me his cv. Thanks guys Sorry for the OT post Davy Resume_MRebuffet.pdf Description: Adobe PDF document Sent from my iPhone
Re: Odd text encoding
Probably because binary data was easy to put in and easy to get out, but what you put in is not what you get out. There are also performance implications with binary data, it's usually more secure to store as base64 in a varchar(max) or text. Absolutely no reason to store in an unicode column. Davy Sent from my iPhone > On 10 Sep 2015, at 09:47, Greg Low (罗格雷格博士)wrote: > > The data was stored by Biztalk, and of course it shoved binary data into an > ntext data type column. The next two questions are: > > 1. Why put base 64 encoded data into an ntext (unicode) column when such a > limited range of values can be generated? > 2. Why use a deprecated data type (ntext) in the first place? > > I'm sure that both questions are above my paygrade :-) > > Regards > > Greg > > Dr Greg Low > SQL Down Under > +61 419201410 > 1300SQLSQL (1300775775) > >> On 10 Sep 2015, at 5:10 pm, Thomas Koster wrote: >> >> It is strange that base-64 encoding is even used here at all. Surely >> proper binary data types have been available in relational databases >> since the dark ages? >> -- >> Thomas Koster >> >> >>> On 10 September 2015 at 16:40, Greg Low (罗格雷格博士) wrote: >>> That was my first reaction too. Haven't spent time staring at base64 >>> encoding for a long time. Knew someone would recognise it though. The brains >>> trust comes through again! >>> >>> Regards >>> >>> Greg >>> >>> Dr Greg Low >>> SQL Down Under >>> +61 419201410 >>> 1300SQLSQL (1300775775) >>> >>> On 10 Sep 2015, at 3:55 pm, Stephen Price wrote: >>> >>> How did you get my Azure certificate? wtf?? >>> >>> Seriously though, the trailing == on the end (plus the overall look) makes >>> it look exactly like an Azure publish certificate. >>> On Thu, 10 Sep 2015 at 08:39 Greg Low (罗格雷格博士) wrote: Perfect thanks Thomas. I'll just have to add a base64 decode function and I should be fine. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.com -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Thomas Koster Sent: Thursday, 10 September 2015 10:33 AM To: ozDotNet Subject: Re: Odd text encoding > On 10 September 2015 at 10:21, Greg Low (罗格雷格博士) wrote: > This one’s driving me crazy and I thought the brains trust might have > an idea. > > Here’s a value that’s stored in an ntext column in a SQL Server DB: > H4sIAAAEALVW0W7aMBT9lanvre0wBkNtJEo3DWkFBGGvyDiXYi22M9vpYL/Wh33Sfm > GGJASatKOS95KH3HvPyTk+tvPn6fe1NLg3Bas5PMIsS0H3GVOZtJGm0lBmuZJfuLFKb99t > RCJNzw3cXKytTXsIGbYGQc2V4Ewro1b2iimBZj8SFGDcRbiNom0K8UQrBnGmwaB4qS4OQI > S8AakCmYLJEjsDu4dD5dffg1iC/sZjUF+5/F7RdP2zTEAbJWlyB5byxFRc7/1zFQsyjEFa > vuKM7takYmz/N8ZZJgTV24rqo3+qfeSG8hGMFU7fON2JO/KTeDX09YBXrB3/QgdKWsdWCw > zxwjVPY2qhH8euZOocH3xwmHTxAHaRgjTOswXNbVwsaUIlg6CiC7xs61zSZK0k1AX9g8CB > txDBaAaa04T/2m8ZdDTvJcn5FxYHAjXmp9JxxdHymaFyR6bAnCCXpZg/3yhvOZXPzGxEN3 > vnav57ydMp1y01nNUX2quLkzy6ZxwAgRc3TwLy0o1BvB7gcwNaUgH1PBIv12Au6ZNwGkol > 4f4fIl3kOkfZ7hm2MOm0OteooVS0F6swcHAPzvuwPxjM70k58bxaDB2t2aE0GI+i6fB2Hg > 3Ho3K8qa8OcedKn7USYYBJ+xJ3LjFpADh0NQNEqhjvOoQXxl1PaRLd5DaMV0c9IcH44FVz > x6lrjS6f1vK359184V9pkluuCgoAAA== > > Somehow, that’s apparently meant to be either a) an XML file, or b) a > GZipped XML file. echo "H4s" | base64 -d | gunzip
Re: Web API Accept type
I would provide two different methods. It's easier for you and easier for the end developers to understand. Davy Sent from my iPhone On 17 Aug 2015, at 23:56, Greg Keogh gfke...@gmail.com wrote: Folks, in Web API when you sent an object back in the response it's automatically serialized as JSON or XML depending upon the Accept header. This is great, but I have to cheat the system slightly and send back manually tweaked XML only if the XML serializer is active. Rather than look at the raw text of the request Accept headers, is there is more formal way of knowing which serializer is active (if this means anything) -- GK
Re: MVC Redirect and Async Operations
I'm always wary about just launching tasks like this, threadAbort exceptions are hard to track down. Wouldn't doing this be better? Task t; Try{ t = new Task.. Redirection } finally { await task } Not sure if that would complete before or after the redirect though. A better solution would be create a log4net a sync database provider. Sent from my iPhone On 02 Aug 2015, at 00:22, Greg Keogh gfke...@gmail.com wrote: Task(()= { ... do stuff }).Start() From Framework 4.5 you have the slightly neater looking: Task.Run(() = { ...DoStuff... }); GK
Re: Problem unit testing async calls
As long as you test after the .Result any mocking framework will do. After all it's the result and the exceptions that you are testing. Code coverage on the other hand is a might harder to accomplish without calling the methods directly. Davy Sent from my iPhone On 24 Jul 2015, at 01:07, Bec C bec.usern...@gmail.com wrote: I believe Moq does handle async calls but never tried it myself On Fri, Jul 24, 2015 at 9:00 AM, Tony Wright tonyw...@gmail.com wrote: Ok, I changed a few things around and got my unit test working. Probably the biggest issue was that I was using Telerik JustMock Lite to do my Mocking. It seems to not be able to handle asynchronous WebApi calls. I commented out all the JustMock code, wrote a dummy repository, and now the test is working. It's a pity. Perhaps someone could suggest another Mocking library that doesn't have this issue? (Does Moq handle async calls?) So the final test looks like this: (and yes, I will go back and refactor the name...eventually) [Fact(DisplayName = Calling the NextQuizQuestion api returns a question)] public async void CallingNextQuizQuestionGetsAResult() { //Arrange var triviaRepository = new DummyTriviaRepository(); //Act UnitOfWork uow = new UnitOfWork(triviaRepository); TriviaController controller = new TriviaController(uow); var taskResult = await controller.Get(); var result = Task.FromResult(taskResult).Result; //Assert Assert.IsTypeOkNegotiatedContentResultTriviaQuestion(result); } On Thu, Jul 23, 2015 at 6:27 PM, Tony Wright tonyw...@gmail.com wrote: I understand that point of view but that would mean that I would need two methods, doesn't it? One to execute synchronously and the other calling that one via an asynchronous mechanism. On 23 Jul 2015 5:53 pm, Greg Keogh gfke...@gmail.com wrote: Just as an aside ... I gave up writing async unit tests years ago. After jumping through hoops I realised that testing the code synchronously proves that it works, then adding async testing just tests that the .NET asynchronous infrastructure works (which I expect is does!). Maybe the test harnesses are better at async testing now, but I generally avoid it except for rare critical or fragile async points -- Greg K On 23 July 2015 at 17:28, Cormac Long cormacl...@gmail.com wrote: Hi Tony, Change the return type of your test method to Task rather than void. Cheers, Cormac On Thu, Jul 23, 2015 at 2:42 PM, Tony Wright tonyw...@gmail.com wrote: Hi all, I have been trying to unit test an async call in an MVC app and I can't quite get it right. The application is an MVC app written in dot net. I am using xUnit to test the method, and Fluent Assertions to more naturally describe the expected outcome (BDD). The test case is a Quiz application. Here is the test: [Fact(DisplayName = Calling the NextQuizQuestion api returns a question)] public async void CallingNextQuizQuestionGetsAResult() { //Arrange string userId = t...@blah.com; var triviaRepository = Mock.CreateTriviaRepository(); Mock.Arrange(() = triviaRepository.NextQuestionAsync(userId)) .Returns(() = Task.FromResult( new TriviaQuestion { Title = When was .NET first released?, Options = (new TriviaOption[] { new TriviaOption {Title = 2000, IsCorrect = false}, new TriviaOption {Title = 2001, IsCorrect = false}, new TriviaOption {Title = 2002, IsCorrect = true}, new TriviaOption {Title = 2003, IsCorrect = false} }).ToList() }) ).MustBeCalled(); //Act UnitOfWork uow = new UnitOfWork(triviaRepository); TriviaController controller = new TriviaController(uow); var taskResult = await controller.Get(); var result = Task.FromResult(taskResult); //Assert Assert.IsTypeOkResult(result.Result); } The controller method that I am instantiating is: [ResponseType(typeof(TriviaQuestion))] public async TaskIHttpActionResult Get() { var userId = User.Identity.Name; TriviaQuestion nextQuestion = await unitOfWork.TriviaRepository.NextQuestionAsync(userId); if (nextQuestion == null) { return this.NotFound(); } return this.Ok(nextQuestion); } The test crashes on the line var taskResult = await controller.Get(); due to a timeout. The issue here I believe is that the test is single threaded and it never returns from the call because it doesn't have a synchronisation context to return to. Does anyone know how I can get this test to work? Regards, Tony
Re: MEF - Microsoft Extension Framework. Opinions requested.
Thanks Davy Sent from my iPhone On 31 May 2015, at 16:36, Piers Williams piers.willi...@gmail.com wrote: On the face of it, I think I would gently dissuade your colleague. Having a level of modular isolation for areas of a webapp is not in of itself a bad thing, but you'd be much better off using something like Aufofac's modules *if the need presented* than MEF. MEF is a plugin framework, and even there it leaves a bit to be desired. I struggle to think of a scenario in which I'd use it (again). On 27 May 2015 6:19 pm, David Rhys Jones djones...@gmail.com wrote: Hi all, I recently joined a new team and one of the Developpers is one of those guys that likes to complicate things for the hell of it. The current technology he is trying to push is MEF (Extension Framework) with every web page / section in a new plugin. Can I have some opinions on what it's really like to use MEF. Thanks Davy Si hoc legere scis nimium eruditionis habes.
Re: Code Mechanical Keyboards
I carry a microsoft natural keyboard around with me, typing on a standard straight keyboard hurts my wrists after an hour or two. Three hours and I can't move the fingers in my left hand. I would love a full mechanical keyboard if it was split. Davy
Re: 3d Trilateration
Hi Yeah i've looked at that one before, my problem is 3d in a box not geolocation. i'm currently trying to convert a java class but it's full of bugs. And trying to squash them. Davy Sent from my starfleet datapad. On 8 oct. 2014, at 13:58, Preet Sangha preetsan...@gmail.com wrote: have you hunted around gis.stackexchange.com http://gis.stackexchange.com/questions/66/trilateration-using-3-latitude-and-longitude-points-and-3-distances On 8 October 2014 04:54, David Rhys Jones djones...@gmail.com wrote: Hi all, Does anyone have code / link to a library that can do 3d Trilateration? *I've been looking for the last hour, lots of theory and references to matlab but nothing that looks like what I need.* *Thanks* *Davy.* *Si hoc legere scis nimium eruditionis habes*. -- regards, Preet, Overlooking the Ocean, Auckland
Re: Favicons
In the old days. An ico file was just a bmp renamed. Might possibly work with png as well now. Davy Sent from my starfleet datapad. On 27 févr. 2014, at 07:55, Stephen Price step...@perthprojects.com wrote: Ok thanks. New can of worms. ;) It seems to be working (on a different computer atm) but when I dragged it to the taskbar (how you can pin a website) it shows a large version of the default one. I think I need to add those multiple sizes to the ico. If I edit my current one in VS it shows the small one but not alternate sizes (like how the default one does...) Which leads me to a new question, what's the best (easiest/cheapest) way to import images into an ico file. Any freebie ICO editors about? I don't fancy doing it by hand in Visual Studio. Hmm I wonder if VS has an import image in its editor? Not looked before... On Thu, Feb 27, 2014 at 2:30 PM, Ken Schaefer k...@adopenstatic.com wrote: From memory, if IE fails to find a favicon.ico file in the past, it doesn't ask for one again (basically, why generate another request that will result in a 404?) Not sure what the timeout period is, but if you bookmark the site/add to favourites, it makes another request for favicon.ico. Cheers Ken *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Stephen Price *Sent:* Thursday, 27 February 2014 3:19 PM *To:* ozDotNet *Subject:* Re: Favicons Oh ok... I cleared the cache. I could see it with Chrome but not IE. Not sure what's up with that. Cached somewhere as you say but clearing the cache vis F12 dev tool menu didn't seem to help. Maybe need to close browser entirely. I added the route then took it out... so not sure if your screenshot was with or without. I think I'll add it back in and do some more testing. Looking with fiddler, it's not that its failing to download/find the favicon.ico file, it looks more like the browser isn't even asking for it. (IE11) thanks for the help. On Thu, Feb 27, 2014 at 12:07 PM, Fredericks, Chris chris.frederi...@hp.com wrote: It may be local to you, a cached page somewhere. The icon is showing in IE11 on my desktop and in IE8 and Chrome 33.0 on my laptop: image001.png
Re: Buffer to XML problem
Sorry about the terse message last time. Either the text reader or the stream reader takes an encoding, you have to specify it the same as the encoding in the XML document. If you pass XML to a SQL parameter you use Unicode (UTF-16) otherwise always explicitly use the same encoding, there are lots of times where it will bite you on the bum when you are not expecting it. Davy Sent via telegraph. On 31 Jan 2014, at 01:31, Greg Keogh g...@mira.net wrote: ... When dealing with files .net understands BOM and removes it from returned data but it does not expect to see it in string/memory buffer. You're right, and I think it makes sense now, the 3 lead bytes are just being taken as text, so putting a TextReader in between lets then get interpreted correctly for loading into the XDocument -- Greg
Re: Buffer to XML problem
You need to specify the encoding. Davy Sent from my starfleet datapad. On 30 janv. 2014, at 22:31, Jano Petras jano.pet...@gmail.com wrote: I reckon the BOM neefs to be stripped off becase parse sees it as unicode characters. When dealing with files .net understands BOM and removes it from returned data but it does not expect to see it in string/memory buffer. There are examples on net how to remove it from inmemory buffer so xml parses nicely. On Friday, 31 January 2014, Tristan Reeves tree...@gmail.com wrote: According to http://stackoverflow.com/questions/2111586/parsing-xml-string-to-an-xml-document-fails-if-the-string-begins-with-xml this could be a problem with the pre-amble. One reply says to use using (var xmlStream = new MemoryStream(fileContent)) using (var xmlReader = new XmlTextReader(xmlStream)) { xml = XDocument.Load(xmlReader); } Hope that helps, Tristan. On Fri, Jan 31, 2014 at 8:09 AM, Greg Keogh g...@mira.net wrote: Folks, I can't convert to byte buffer to an XML document. The input buffer contains a serialized string with a UTF8 BOM which starts like this: EFBBBF3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D227574662D38223F3E0D0A3C5573 [cut] . . . ? x m l v e r s i o n = 1 . 0e n c o d i n g = u t f - 8 ? . . U s So I do this: string xml = Encoding.UTF8.GetString(buffer); var doc = XDocument.Parse(xml); However the Parse dies with System.Xml.XmlException : Data at the root level is invalid. Line 1, position 1. What am I missing here? Greg K
Re: Web API weird problems
For problem 2: get codemaid plugin or resharper and reorder your properties: Or you could use an xslt to transform your serialization ordering your properties as you go. Davy. Sent from my starfleet datapad. On 17 janv. 2014, at 09:43, Greg Keogh g...@mira.net wrote: Is anyone in here using Web API in anger? I'm experimenting with creating an API that is simple and easy for non .NET clients to use. Controller methods that return classes serialised as XML contain everything I expect but... *PROBLEM 1* : There are xmlsn= namespaces cluttering up the root node that I can't get rid of. I tried a few tricks in web searches but it changes nothing. Anyone know how to get rid of them and get plain XML? My next hurdle is a POST to create a record. The Request below actually works, but after hours of suffering I overcame two really weird problems to make it work, otherwise you get the dreaded 500 error: *PROBLEM-2* : The XML property elements have to be in alphabetical order (no kidding!!). They are not in order inside the class. *PROBLEM-3* : Related to No.1, I have to put the tedious namespaces in the root element. Greg K POST http://raven/authapi/user/create HTTP/1.1 Content-Type: text/xml Accept: application/xml Host: raven ApiUser xmlns:i=http://www.w3.org/2001/XMLSchema-instance; xmlns= http://schemas.datacontract.org/2004/07/RCS.AuthService.RestApi; Namemax/Name PasswordT0pSecret/Password SpokenNameMax Headroom/SpokenName /ApiUser
Re: What are the Mocking/Testing frameworks/patterns de jour?
I use ncrunch as well, and I love it. It does slow my machine down when it does a full build, but it gets you into the habit of writing small quick unit tests as they run much faster. I've convinced my team into using Specflow and watin when developing new code. Since implementing BDD we have less bugs and are delivering the code much faster than before. Davy Sent from my starfleet datapad. On 8 déc. 2013, at 15:37, Dave Walker rangitat...@gmail.com wrote: Hi, some of us do. I've found that when you get into the zone it's amazing for productivity to not have to stop and run unit tests. The speed of the app is very decent. Also does a code coverage stat - not quite as good as dotcover but it's faster. There is a free alternative that I tried and really disliked - can't remember what it's called but in case you find one. On 9 December 2013 03:31, Wallace Turner wallace.tur...@gmail.com wrote: Dave Walker do you (and/or your colleagues) use ncrunch daily? Would be interested to hear some real world feedback on that
Re: Are BindingSource and BindingNavigator just for writing demos?
Same rule applies don't autobind. You end up with 1-5 connections open on the database. Do your own mapping and binding away from the EF objects. If you don't make the break from the bound objects, you have to deal with objects that have been disassociated from their context and are stale. As ever datalayer is for connecting to the database and translating to and from your private objects. Davy. Ps. My current team went against my advice and now are feeling the pain. Lucky i have nothing to do with that part of the code. Sent from my starfleet datapad. On 7 nov. 2013, at 00:04, Kirsten Greed kirst...@jobtalk.com.au wrote: I am using Entity Framework with Winforms I have set up my object as a data source and would like to do a sales order maintenance screen. Can I use BindingSource and BindingNavigator controls in this scenario? With my VB6 legacy code i learned not to use them, however I want to try again with VS2012 and C# Thanks Kirsten
Re: Restricting Data Chnages
If it's sqlserver Set rowcount 100 But even if you do this your data will get polluted over time. Do an audit of the stored procedures and the triggers. Lock down access on the tables and only allow SP's to access them. Then see where the code is failing and for why. Davy Sent from my starfleet datapad. On 25 sept. 2013, at 07:24, GregAtGregLowDotCom g...@greglow.com wrote: Another option would be to add a trigger that refuses to allow you to modify large numbers of rows. However, you really need to carefully see if that would upset the application. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.com *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.comozdotnet-boun...@ozdotnet.com] *On Behalf Of *anthonyatsmall...@mail.com *Sent:* Wednesday, 25 September 2013 1:17 PM *To:* 'ozDotNet' *Subject:* RE: Restricting Data Chnages It’s a db I inherited so there are many sp that may be doing ‘naughty’ things Anthony Melbourne StuffUps…learn from others, share with others! http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/ -- NOTICE : The information contained in this electronic mail message is privileged and confidential, and is intended only for use of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it. (*13POrtC*) --- *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.comozdotnet-boun...@ozdotnet.com] *On Behalf Of *GregAtGregLowDotCom *Sent:* Wednesday, 25 September 2013 1:01 PM *To:* 'ozDotNet' *Subject:* RE: Restricting Data Chnages You can add a TOP clause into data modification statements to limit how many rows are affected but I suspect that isn’t your real issue. The first question that needs to be addressed is why anyone has access that allows doing that in the first place. That’s the real problem. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.com *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.comozdotnet-boun...@ozdotnet.com] *On Behalf Of *anthonyatsmall...@mail.com *Sent:* Wednesday, 25 September 2013 11:26 AM *To:* 'ozDotNet' *Subject:* RE: Restricting Data Chnages Is it possible to restrict the number of records that can be modified in one query? We had a database that had all its records updated by accident ie 30,000 rows..how can we avoid this in the future? What techniques are suggested? How can we see who\what changed the records? Anthony Melbourne StuffUps…learn from others, share with others! http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/ -- NOTICE : The information contained in this electronic mail message is privileged and confidential, and is intended only for use of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it. (*13POrtC*) ---
Re: Code commenting
Hello If you are doing this in code. It points to the fact that someone is not pulling their weight. Code should not have comments. If you need them to explain something, the code is too complex. If you add them so modifications on one bit of code come back to you so you can fix. Make it simpler. If you add them to Blame later, you should be doing peer reviewed checkins to bring everyone up to the same level. If you are commenting code because it might be useful later. Delete it! That is what source control is for. There is no excuse for comments in code. Davy Sent from my starfleet datapad. On 13 sept. 2013, at 08:56, mike smith meski...@gmail.com wrote: Blame is a useful tool, ofttimes though, I'd call it credit. For instance, you receive a crashdump from an old version, it shows you where the app crashed, and maybe you have a slight idea why. Use blame on a current version, look at changes around the crash line and you've got a lot of the info you might need to generate a hotfix. With all the caveats that hotfixes imply :) If your devs are diligent linking the svn comment with a number from your CR system, that's another link. But I'd hate to see it actually present in the code. On Fri, Sep 13, 2013 at 2:50 PM, Craig van Nieuwkerk crai...@gmail.comwrote: A lot of source control systems give you that out of the box. I know Git and SVN both do with the BLAME command. I wouldn't want the comments scattered throughout the code. On Fri, Sep 13, 2013 at 2:45 PM, anthonyatsmall...@mail.com wrote: Anyone suggest a method to autmaticlly comment code when lines have changed? Would be great to be able to see who changed what when viewing the code. ** ** At the moment,, we write comments like //xxMOD 12AUG13 XX=PROGRAMMER INITIALS ** ** WE use TFS but we like to write comments in code sometimes. Any extensions able to do this? ** ** Anthony Melbourne StuffUps…learn from others, share with others! http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/ -- NOTICE : The information contained in this electronic mail message is privileged and confidential, and is intended only for use of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it. (*13POrtC*) --- ** ** -- Meski http://courteous.ly/aAOZcv Going to Starbucks for coffee is like going to prison for sex. Sure, you'll get it, but it's going to be rough - Adam Hills
Re: [OT] Developer keyboard
Ergonomic keyboards are a must as you get older. I have been using one since 2000. When i type on a normal keyboard for more than a few hours I suffer from tremendous wrist pain and can't type for hours afterwards. Davy Sent from my starfleet datapad. On 14 août 2013, at 19:05, David Richards ausdot...@davidsuniverse.com wrote: A bit off topic and a bit on topic. I've been in the market for a good developer keyboard for a while but never seem to find anything I like. I was just wondering if others on this list had found a decent keyboard. A few qualifying points: I don't want a number pad or at least I don't want one on the right of the keyboard. Not that I have anything against them, I just want my mouse to be closer. I've tested this using a cheap (and crappy) laptop like keyboard and there is a noticeable difference in comfort. I can just as easily by a separate number pad keyboard to position elsewhere. I would prefer the cursor keys and the other navigation keys to be in a reasonable location. My crappy keyboard as some of these along the bottom. It also sacrificed the right Control key in favour of a Scroll Lock key. Who uses scroll lock any more? I don't like those ergonomic keyboards that split the keyboard to be comfortable for two hands. I don't know about the rest of you but I spend at least as much time with one hand on the mouse and the other on the keyboard as I do with both hands on the keyboard. So the ergonomic aspects are actually a hindrance when typing with one hand. I don't care about media buttons or any other specific use button. I never user them. They just make the keyboard bigger. 20% of the keys on my current keyboard will never be used. Obviously I want the keys to be comfortable to use 8 hours a day. The recently announce keyboard from microsoft is fairly close to what I'm looking for: http://arstechnica.com/gadgets/2013/08/microsofts-new-ergonomic-keyboard-is-just-plain-weird-looking/ But it's ergonomic style is a bit of a negative. Any thoughts? David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama
Re: Deflate Zip library care
Try re zipping the files that you previously zipped straight from windows. The windows zip routines aren't 100% compatible. I've had problems before where zipping a website for deployment with windows on my end and unzipping at the server with winzip didn't work. Hence the move to 7z. You can roll your own zip compression in c# with the compression namespace there is no need to depend on the iis version of compression. Davy Sent from my starfleet datapad. On 18 juil. 2013, at 08:21, Greg Keogh g...@mira.net wrote: Are you sending these files over HTTP? Doesn’t HTTP provide the ability to compress files between server and client? I had a quick look at some pages and docs on this. It seems to be dependent on the IIS version, having the compression module installed and the client side being compression-compatible browsers. I don't know how all this affects a WCF service and SL client. I'd have to do lots more research to see if the burden of doing compression could safely and completely moved to the environment. Id' be interested to hear anyone's experience with this -- Greg
Re: Deflate Zip library care
Or 7z. Library. What are you ziping between the server and the client? Sent from my starfleet datapad. On 18 juil. 2013, at 00:15, Ian Thomas il.tho...@iinet.net.au wrote: Why not use .NET 4.5? (not 4.0) Or does this introduce a lot of recompiles, in other parts of the application suite you’re working on? Ian Thomas Victoria Park, Western Australia *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.comozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh *Sent:* Wednesday, 17 July 2013 11:45 PM *To:* ozDotNet *Subject:* Deflate Zip library care I ran into some zip/deflate trouble tonight you should be aware of.
Re: Parallet.ForEach
The data above it comes from a yield return, although parallel.foreach was still faster than doing it all in line. ListT was much much faster, shaved 2000ms off of the process. I read some of the books/articles mentioned and i've been following the parallel blog for ages. But that was back when 4.0 came out. This is the first time I have used 4.0 on a task that requires more than 3.5 syntax. I had forgotten alot of info. I must be getting old :( Davy Sent from my starfleet datapad. On 25 juin 2013, at 08:54, Corneliu I. Tusnea corne...@acorns.com.au wrote: Here is a very good (but very old) presentation about the PFX: http://blogesh.files.wordpress.com/2009/05/getting-the-most-out-of-pfx.pptx Slide 33 has the partitioning details. On Tue, Jun 25, 2013 at 4:45 PM, Corneliu I. Tusnea corne...@acorns.com.auwrote: David/Greg, Ihe IEnumerable is not an issue with Parallel.ForEach. The PFX library will look for few other interfaces for your object and decide the partitioning strategy based on that. There are multiple paritioners that will be picked up based on your source: Range (used for IList), Chunk (used for IEnumerable - it's slow as it has to wait for each object to partition), Stripe (optional), Hash (for joins). http://blogs.msdn.com/b/pfxteam/archive/2007/12/02/6558579.aspx http://blogs.msdn.com/b/pfxteam/archive/2011/11/11/10235999.aspx You can write your own custom partitioners if you know how the data is structured and can optimize the partition allocation. http://msdn.microsoft.com/en-us/library/dd560853.aspx http://msdn.microsoft.com/en-us/library/dd997411.aspx On Tue, Jun 25, 2013 at 3:46 PM, Greg Keogh g...@mira.net wrote: 1. Don't use IEnumerable and Parallel.ForEach, ListT is much faster. I don't have the bigger picture here, but IEnumerable and Parallel.ForEach go together like pancakes and ice cream. I'm even getting into the habit these days of making public methods that return collections prefer to return IEnumerableT. This means I have the freedom to consume them in parallel processing. Albahari's book C# in a Nutshell discusses parallel processing in general in chapter 23, and the Parallel class in particular over 7 dense pages. Richter covers the general subject in chapter 26 with 5 pages on Parallel. I'm pretty sure all your issues will be clarified in these pages and they're a really good read. Cheers, Greg
Re: Default constructors
Hi I delete them, i first encountered them while doing nhibernate work. But it meant that i could not get the code coverage of my unit tests to where i wanted. So i deleted them and spent an hour writing coverage tests. .02c Davy Sent from my starfleet datapad. On 6 mars 2013, at 06:15, Stephen Price step...@perthprojects.com wrote: Thanks guys, sounds like i'm on the right track. Dave, the objects look just like generated DTOs, so if they were passed about empty then its probably better covered with validation (client/server), but I get what you mean. They wouldn't be much use empty but I think there are other ways to indicate the intent than the Obsolete attribute. I like Mike's answer too, If only because it matched with my feelings about it. :) cheers! Stephen On Wed, Mar 6, 2013 at 1:09 PM, David Burstin david.burs...@gmail.comwrote: Hi Stephen, Just taking a stab at it. Are any of the parameters in the overloaded constructors dependencies of the object being constructed? If the object requires these dependencies that would be a good reason to force the paramaterized constructors, as using the default would potentially leave the object in an unworkable state. Cheers Dave On 6 March 2013 15:59, Stephen Price step...@perthprojects.com wrote: Hey all, The project i'm working on at the moment has some generated code from a tool called MyGeneration TOOL. It has marked the default constructors of the Data classes with: [Obsolete(For serialization only, false)] It would seem that they have ignored this and are using the default constructors and then populating the properties, rather than calling the overloads with parameters. In some cases it seems quite valid to just call the default constructor (ie a new data object yet to be populated for example). I've done some searching and can't find any justification for marking the default constructors Obsolete. Given that the code is generated and then manually pasted into the classes I'm tempted to just remove the Obsolete attributes. It would clean up the Warnings generated drastically. Just want to figure out if it might bite me for some reason down the track. flames, opinions, ideas, suggestions and feedback welcome :) cheers, Stephen
Re: Async coding pattern
Async/await. = begininvoke endinvoke Tasks = backgroundwork / threadpool Events are still events you can't replace them with the new 4.0 threading. Davy Sent from my starfleet datapad. On 3 mars 2013, at 05:18, David Kean david.k...@microsoft.com wrote: Why still using event based async, when you can use async/await in Silverlight? http://nuget.org/packages/Microsoft.Bcl.Async/1.0.14-rc *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.comozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh *Sent:* Friday, March 1, 2013 8:54 PM *To:* ozDotNet *Subject:* Async coding pattern Folks, I have some skeleton code like this in a Silverlight app: client.GetFooCompleted += (s, e) = { Trace(GetFoo result is {0}, e.Result); }; client.GetFooAsync(rowId); This works fine, but then I noticed that the completion handler code keeps getting added on every call and the completion code runs 1, 2, 3, 4, etc times. Is there an elegant way of rejigging this code to get the correct one-call-one-completion behaviour. Greg
Re: Async coding pattern
Only add events when you create the class or in the property set. I've never had this problem. .02c Davy Sent from my starfleet datapad. On 2 mars 2013, at 05:54, Greg Keogh g...@mira.net wrote: Folks, I have some skeleton code like this in a Silverlight app: client.GetFooCompleted += (s, e) = { Trace(GetFoo result is {0}, e.Result); }; client.GetFooAsync(rowId); This works fine, but then I noticed that the completion handler code keeps getting added on every call and the completion code runs 1, 2, 3, 4, etc times. Is there an elegant way of rejigging this code to get the correct one-call-one-completion behaviour. Greg
Re: SPAM-LOW Re: WCF service best practises
I must be getting old. XML-rpc (simple XML http) XML-soap complex ish Wcf. Really complex Rest/Jason complex ish Web API simple A full turn of the wheel in 12 years. I get a new intern on my team next week, I wonder what new ideas he will bring. Maybe flat text config files? Davy the Older Sent from my starfleet datapad. On 1 févr. 2013, at 10:45, Paul Glavich subscripti...@theglavs.com wrote: Webapi is a reaction to attitudes as described below. People were foregoing WCF due to complexity and a variety of other reasons. MVC was being used (with a bit of code) to produce simple JSON/XML Rest api’s. The team took this onboard, altered their view of world as they were writing the Web Web Api and thus we have WebApi. As with most things, simplicity wins out and WebApi was the framework attempt at that. Ofcourse WCF can do REST too, you just have to twiddle a few hundred different knobs on the right way. I would argue WCF is not bullshit. WCF comprises way more than REST and has a very good feature set (albeit with a some implementation flaws). Support for MSMQ, TCP, ServiceBus etc… all via config is no easy feat. you want to do an intermittently connected app then use some sort of message queuing framework/system or roll your own And the circle of development life continues….. - Glav *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.comozdotnet-boun...@ozdotnet.com] *On Behalf Of *David Connors *Sent:* Friday, 1 February 2013 9:10 AM *To:* ozDotNet *Subject:* SPAM-LOW Re: WCF service best practises On Fri, Feb 1, 2013 at 7:23 AM, Craig van Nieuwkerk crai...@gmail.com wrote: ASP.NET WebAPI seems to be the new hotness. I don't have much experience with WCF, but everyone I talk to says it is too heavy and complicated. WebAPI tries to simplify things. WCF is a bunch of bullshit. People who use it just do so for the sake of adopting some shiny new technology - it is just pointless middleware for the sake of it. I don't understand why it exists anyway - as if we are some day doing to need to re-platform off tcp any time soon. If I needed to do a lot of IPC stuff today I'd just use rest/json like everyone else on the Internet. If you want to do something screaming fast, use protobufs. If you want to do an intermittently connected app then use some sort of message queuing framework/system or roll your own. I don't know why a common API needs to sit on top of a bunch of unrelated use cases, doing none of them very well. $0.02. -- David Connors da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors
Re: [OT] sql convert datetime problem; forcing order of AND statements
Hi SQL always executes right to left, all parts of your query are executed but the filter is only applied on your results. However, the sqlserver optimiser can and will rearrange your query for you so even checking to see if it is a date first ( to the right ) is not guaranteed to work. So you need a case when to do your processing. Davy Sent via telegraph. On 29 Oct 2012, at 08:46, Emily Waghorne ozdot...@emigram.com wrote: Hi Wal, I'm not sure it's a case of one being executed first, because I assume the where clause has to be executed in its entirety before the engine decides if it matches or not. You are thinking like the operator in c# which only executes the second half of the comparison if the first half passes first. So basically you have to write it so that it filters on IsDate and only then you run your convert. The best way might depend on the volume if data you have. Sub query? CTE? Emily On Monday, 29 October 2012, Wallace Turner wrote: I'm running into an issue with a select query; it appears the CONVERT operator is performed before any other condition in the WHERE clause. Consider the data below: biac.png Now some queries, This one works, note only 6 rows are returned: SELECT Value,CONVERT(DATETIME, [Value],6) from DatesTest WHERE IsDate([Value])=1 hjffbgac.png This one does *not *work: Conversion failed when converting date and/or time from character string. SELECT Value from DatesTest WHERE IsDate([Value])=1 AND CONVERT(DATETIME, [Value],6) GETDATE() 1) Why is the CONVERT statement being executed first? 2) How can the IsDate be forced to execute first so the second statement works? Cheers Wal
Re: [OT] sql convert datetime problem; forcing order of AND statements
As far as I am aware, and coming from a time when we didn't have optimisers. All parts are evaluated A part, in the case of a case else is is the statement as a whole. Select * from t where Id = 3 and date 1997 Without the optimiser, It does Date 1997 Id = 3 Select * With the optimiser it does Id =3 Date 1997 Select * The example provided I have no idea which the optimiser thinks is more performant, the point being you can't write standard logic in SQL, all parts are executed. A select case is a special construct to get around the problems. I would not like to do the convert date on a string of characters over and over any way. Are all these dates stored in the same way? Davy Sent via telegraph. On 29 Oct 2012, at 10:25, Les Hughes l...@datarev.com.au wrote: Davy Jones wrote: Hi SQL always executes right to left Are you talking about boolean evauluation? If so... False. (At least for 2008 R2 which I have in front of me) -- Les Hughes l...@datarev.com.au
Re: Opinions of TypeScript?
I haven't looked at it and probably won't. As far as I can see, the only new thing is static typing? JavaScript already has oo. There are enough technologies around js already why confuse matters more? Davy Sent from my starfleet datapad. On 4 oct. 2012, at 10:27, Greg Keogh g...@mira.net wrote: Folks, I just heard about TypeScripthttp://en.wikipedia.org/wiki/TypeScript. It superficially seems like a good idea. Has anyone tried it? I’m downloading the VS2012 MSIhttp://www.microsoft.com/en-us/download/details.aspx?id=34790for it to see what it’s like. Let’s face, anything that makes JavaScript development easier will be welcome, but will TypeScript help or hinder? -- Greg
Re: [OT] Almost Friday: New Programming Language, Objective CorporateSpeak++
Needs a Dynamic synergy { } And #IPO. Conditional Davy Sent from my starfleet datapad. On 4 oct. 2012, at 13:06, Preet Sangha preetsan...@gmail.com wrote: 338.gif 2012/10/5 Les Hughes l...@datarev.com.au http://www.floopsy.com/post/**32660494624/programming-** language-objective-**corporatespeakhttp://www.floopsy.com/post/32660494624/programming-language-objective-corporatespeak :) -- Les Hughes l...@datarev.com.au -- regards, Preet, Overlooking the Ocean, Auckland
Re: LINQ question
var t = ( from t in things where t.id = lookupID select t.id ).FirstOrDefault(); Because I prefer the SQL syntax. Davy Sent via telegraph. On 26 Jul 2012, at 14:47, Wallace Turner wallacetur...@gmail.com wrote: that doesnt work Mike? did you mean: int? foundId = context.Things.Where(t = t.ID = lookupID).Select(t = * (int?)* t.ID).SingleOrDefault(); On 26/07/2012 8:05 PM, Michael Minutillo wrote: Try int? foundId = context.Things.Where(t = t.ID = lookupID).Select(t = t.ID).SingleOrDefault(); Michael M. Minutillo Indiscriminate Information Sponge http://codermike.com On Thu, Jul 26, 2012 at 7:26 PM, Greg Keogh g...@mira.net wrote: I have to find an object in an EF4 entity collection with a specific ID property and return the int value if it’s found and return (int?)null if otherwise. This skeleton code crashes of course if the ID isn’t found. int? foundId = context.Things.SingleOrDefault(t = t.ID == lookupID).ID; So what is the best way of recoding this elegantly as a one-liner so it gives me the ID or null when not found? It has to be a one-liner because it’s in a select clause. Greg