Re: Ozdotnet list
st ten years since I had to do anything Admin like. The Admin >> list seems to be gone) >> >> >> >> I've noticed that Discourse.org now exists and is open source. And Free. >> And has code highlighting built in. And also has elist delivery out of the >> box. As well as a web interface if that floats your boat. Ticks all the >> boxes from what we were looking for many years ago. >> >> >> >> Full feature list is here https://www.discourse.org/about/ >> >> >> >> I'd like to propose we move to it and actively promote it once it's all >> up and running. Given the lists currently existing cover a few different >> topics, not just AusDotNet, we should move them all over. Except >> Silverlight. Don't even talk to me about that. Just don't. Ok? >> >> >> >> Seriously, stop looking at me. >> >> >> >> So how do we brand it? OzDev? Did we ever end up with a domain name? It >> would be a good time to get one if not. >> >> >> >> The best part about this is David will have to do most of the work, but >> if we still have any Admins left on this list (maybe it's just me and >> David?) assistance would be good, just put your hand up. >> >> >> >> I have a fond memory of the AusDotNet list and have been on it for my >> entire developer career. It's been invaluable. Time to bring it kicking and >> screaming into the Internet of today, a limelight for fellow Aussie >> developers both existing, and yet to be. We have a big community and I'd >> like to be able to give back to it. >> >> >> >> Will do some work on a logo (or outsource it to my daughter who'd doing a >> graphic design degree)... >> >> >> >> Discuss. >> >> Stephen >> >> -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] node.js and express
This is getting an off-topic post even more general, but this thread also suggests to me part of why we're a hard industry to get proper engineering-level standards applied. We might start to apply standards, but then the technology shifts from under us and the standards are out of date. We then need to update the standards to work with the new technology. (And as others have said here, we're still not sure the new technology is better, but "everyone's" already using it. Or we continue to use the now out-of-date technology because that's what the standards apply to, and "everyone else" moves on.) Not sure what the solution is, of course. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] Windows 10 anniversary upgrade
Yeah, I deliberately installed the Anniversary Upgrade, but I didn't expect it to start downloading emails that I already get on Gmail, through Outlook Express on a WinXP kept around mostly for that purpose, and on my phone. I didn't need yet another copy downloaded. I have successfully turned that off, though I wasn't sure of the right settings, seeing as I had previously barred the Windows Email app from accessing email (in an attempt to allow calendar, which does now work, I think). On 15 August 2016 at 10:38, Ken Schaefer <k...@adopenstatic.com> wrote: > If you have access to MSDN, then switch to the LTSB (long term servicing > branch) version – it might help avoid surprises. > > > > From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] > On Behalf Of Greg Keogh > Sent: Monday, 15 August 2016 8:46 AM > To: ozDotNet <ozdotnet@ozdotnet.com> > Subject: [OT] Windows 10 anniversary upgrade > > > > Yesterday morning I rushed to my PC to watch a live stream of a music > competition. Twenty minutes later I get to sign in because the anniversary > upgrade arrived without warning. Now I find the signin screen, the elevation > prompt, and file open dialogs have changed appearance and behaviour, tray > icons I removed have returned, the "useless" metro apps I removed have > returned, I'm getting Alert popups that I suppressed, the desktop colour has > changed, and Explorer tree icons that I carefully removed with registry > edits have returned. > > > > Who's managing my PC? Who owns it? > > > > Greg -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Interview question pseudocode (was RE: [OT] Internal Developer Training)
If the question was *What happens here?" or "Analyse this code (in various languages).", I would say it's not too bad as you can mention it should return 2 in any language that accepts returning from a finally, which happens to include VB.NET indirectly, but I could believe there are languages that return 1 because the finally happens some what out of band. But, no, it's not a question I'd ask. Regards, Mark Hurd. Sent from my Windows Phone. -Original Message- From: "Arjang Assadi" <arjang.ass...@gmail.com> Sent: 9/02/2016 1:21 PM To: "ozDotNet" <ozdotnet@ozdotnet.com> Subject: Re: [OT] Internal Developer Training Hello " I've found that especially their C# skillsets are limited " , What would facilitate that finding? I have been wondering what makes one bad at language and still get to be a programmer? for example what is point of quiz code like this : try divide by 0 catch return 1 finally return 2 is this type of coding common practice that would necessitate it being an interview question? How much language knowledge is enough? Is there a checklist ? so one can put the langauge skills to rest and move on to architectural concepts instead? Doing raw programming instead of using established, patterns framework and tapping into prebuilt infrastructure doeasn't far outweighs obscure language skills in a given language? Not having a go at you, but since you have found lack of language skills on professional programmers I have to ask you! Just going to the source Luke! Regards Arjang On 9 February 2016 at 13:00, Dave Walker <rangitat...@gmail.com> wrote: Hi all, I've recently taken over a new team which has a wide variety of technical skill from complete beginner to senior developer. Talking to the team I've found that especially their C# skillsets are limited and can be greatly improved. So far we've organised for everyone to have a pluralsight account and encouragement is given to spend work time watching videos however it feels a little bit disconnected. I'd really like to have a more formal ongoing set of training but as it stands I have no experience implementing this. There is limited budget so can't just send everyone off on a training course and not really looking for an overnight fix but more of a program that improves different skills over time to a certain level. My thoughts for now were to mix between: * Book club - everyone reads a chapter of 'Clean code' and we gather weekly to discuss it * Pluralsight club - same but with a pluralsight video * One on one peer programming where the more senior members help the less experienced * Demo sessions/lectures by more experienced developers from outside the team Has anyone else ever tried to take on something like this? If so how did you go about it and what advice can you give about this? Cheers, Dave
Re: Bug in System.Uri parser?
Subject to valid options on the public System.GenericUriParserOptions being mappable to the specific private System.UriSyntaxFlags you can probably create an instance of System.GenericUriParser that /does/ allow UserInfo. But then you can't System.UriParser.Register for an existing (and, in this case, built-in) scheme. (But it would only be a "little bit" of reflection to write your own Unregister, or even Reregister, if you really want to correct this issue now yourself.) On 12 November 2015 at 15:37, Mark Hurd <markeh...@gmail.com> wrote: > Yeah, note that NetPipeSyntaxFlags > > http://referencesource.microsoft.com/System/R/88aaba2e83d81ad0.html > > and thus NetTcpSyntaxFlags does not include UriSyntaxFlags.MayHaveUserInfo > > so, they intended to not allow user:password in these Uris, or it is a > large oversight. > > > On 12 November 2015 at 14:33, Thomas Koster <tkos...@gmail.com> wrote: >> On 11 November 2015 at 17:43, Thomas Koster <tkos...@gmail.com> wrote: >>> I am parsing a URL to connect to a WCF service. Try this: >>> >>> new Uri("net.tcp://guest:guest@myserver:12345"); >>> >>> I get a UriFormatException that complains about an invalid port >>> number. Uri.TryCreate is no better. >>> >>> It works if I remove the userinfo (credentials). It also works if I >>> don't use a scheme with a dot in it. I need both, however. >>> >>> As far as I can tell, this *is* a valid URI according to RFC 2396 and >>> RFC 3986. It works in Mono. It works in other languages. I think >>> .NET's URI parser is busted (Framework 4.5). >> >> On 12 November 2015 at 10:32, Thomas Koster <tkos...@gmail.com> wrote: >>> Using UriBuilder to create this Uri is also broken. Try this: >>> >>> var ub = new UriBuilder(); >>> ub.Scheme = "net.tcp"; >>> ub.UserName = "guest"; >>> ub.Password = "guest"; >>> ub.Host = "myserver"; >>> ub.Port = 12345; >>> >>> The Uri property getter for ub throws the same UriFormatException as above. >> >> On 12 November 2015 at 12:52, Mark Hurd <markeh...@gmail.com> wrote: >>> Yeah, I tried a couple of variations on >>> >>> var ub = new UriBuilder("net+tcp://guest:guest@myserver:12345/") >>> ub.Scheme = "net.tcp" >>> >>> and ub.Uri property throws as you mention. >> >> This means UriBuilder is implementing the Uri property with something >> silly like this: >> >> public Uri Uri >> { >>get >>{ >>return new Uri(ToString()); >>} >> } >> >> This suspicion is confirmed by the reference sources[1]. >> >> The round-trip via string is wasteful and unnecessary and spreads the >> parsing bug in Uri over the UriBuilder class as well. UriBuilder >> should be able to trivially construct a Uri instance without parsing >> or round-tripping via string. >> >> Speaking of reference sources, I had a quick scan over the parsing >> code here[2]. OMG, it's thousands of lines of manual string twiddling, >> like a kid with no comp sci education might have done. The cyclomatic >> complexity must be astronomical. No wonder it's broken. >> >> [1] >> http://referencesource.microsoft.com/#System/net/System/uribuilder.cs,b59ac7e3edbfe76c >> [2] http://referencesource.microsoft.com/#System/net/System/URI.cs >> >> -- >> Thomas Koster > > > > -- > Regards, > Mark Hurd, B.Sc.(Ma.)(Hons.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Bug in System.Uri parser?
Yeah, note that NetPipeSyntaxFlags http://referencesource.microsoft.com/System/R/88aaba2e83d81ad0.html and thus NetTcpSyntaxFlags does not include UriSyntaxFlags.MayHaveUserInfo so, they intended to not allow user:password in these Uris, or it is a large oversight. On 12 November 2015 at 14:33, Thomas Koster <tkos...@gmail.com> wrote: > On 11 November 2015 at 17:43, Thomas Koster <tkos...@gmail.com> wrote: >> I am parsing a URL to connect to a WCF service. Try this: >> >> new Uri("net.tcp://guest:guest@myserver:12345"); >> >> I get a UriFormatException that complains about an invalid port >> number. Uri.TryCreate is no better. >> >> It works if I remove the userinfo (credentials). It also works if I >> don't use a scheme with a dot in it. I need both, however. >> >> As far as I can tell, this *is* a valid URI according to RFC 2396 and >> RFC 3986. It works in Mono. It works in other languages. I think >> .NET's URI parser is busted (Framework 4.5). > > On 12 November 2015 at 10:32, Thomas Koster <tkos...@gmail.com> wrote: >> Using UriBuilder to create this Uri is also broken. Try this: >> >> var ub = new UriBuilder(); >> ub.Scheme = "net.tcp"; >> ub.UserName = "guest"; >> ub.Password = "guest"; >> ub.Host = "myserver"; >> ub.Port = 12345; >> >> The Uri property getter for ub throws the same UriFormatException as above. > > On 12 November 2015 at 12:52, Mark Hurd <markeh...@gmail.com> wrote: >> Yeah, I tried a couple of variations on >> >> var ub = new UriBuilder("net+tcp://guest:guest@myserver:12345/") >> ub.Scheme = "net.tcp" >> >> and ub.Uri property throws as you mention. > > This means UriBuilder is implementing the Uri property with something > silly like this: > > public Uri Uri > { >get >{ >return new Uri(ToString()); >} > } > > This suspicion is confirmed by the reference sources[1]. > > The round-trip via string is wasteful and unnecessary and spreads the > parsing bug in Uri over the UriBuilder class as well. UriBuilder > should be able to trivially construct a Uri instance without parsing > or round-tripping via string. > > Speaking of reference sources, I had a quick scan over the parsing > code here[2]. OMG, it's thousands of lines of manual string twiddling, > like a kid with no comp sci education might have done. The cyclomatic > complexity must be astronomical. No wonder it's broken. > > [1] > http://referencesource.microsoft.com/#System/net/System/uribuilder.cs,b59ac7e3edbfe76c > [2] http://referencesource.microsoft.com/#System/net/System/URI.cs > > -- > Thomas Koster -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Bug in System.Uri parser?
Yeah, I tried a couple of variations on var ub = new UriBuilder("net+tcp://guest:guest@myserver:12345/") ub.Scheme = "net.tcp" and ub.Uri property throws as you mention. On 12 November 2015 at 10:32, Thomas Koster <tkos...@gmail.com> wrote: > On 11 November 2015 at 17:43, Thomas Koster <tkos...@gmail.com> wrote: >> I am parsing a URL to connect to a WCF service. Try this: >> >> new Uri("net.tcp://guest:guest@myserver:12345"); >> >> I get a UriFormatException that complains about an invalid port >> number. Uri.TryCreate is no better. >> >> It works if I remove the userinfo (credentials). It also works if I >> don't use a scheme with a dot in it. I need both, however. >> >> As far as I can tell, this *is* a valid URI according to RFC 2396 and >> RFC 3986. It works in Mono. It works in other languages. I think >> .NET's URI parser is busted (Framework 4.5). > > Using UriBuilder to create this Uri is also broken. Try this: > > var ub = new UriBuilder(); > ub.Scheme = "net.tcp"; > ub.UserName = "guest"; > ub.Password = "guest"; > ub.Host = "myserver"; > ub.Port = 12345; > > The Uri property getter for ub throws the same UriFormatException as above. > > This is all *very* annoying. > > Thomas Koster -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Mobile passwords
On 11 November 2015 at 16:05, mike smith <meski...@gmail.com> wrote: > Device entry of passwords is a nightmare. If you multi-hit the virtual > keyboard even slightly you get accented characters which of course do not > work. This is one time the *** to represent a password field is > infuriating. Yes, I know its wrong, now show it to me so I can see where > it is wrong! Some apps have a check box to display the password or not. > ++1 for these! > The only mobile device I've used (that was smart enough to browse anywhere that I cared how passwords are entered) is my Windows Phone, and the default password UI there seems to show the last typed key just long enough to note if it's wrong, due to fat or slow fingers. I assumed that would be the "obvious" compromise for the ** UI. > snip > > > -- > 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 > -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Sharing a database file
Because the functionality of setting up and installing a Windows Service is almost "out-of-the-box" available now, and has been available fairly easily since the start of the .NET Framework AFAIR, I'd go for that if at all possible. We have a range of "agents" that require a console to auto-logon so they can run. (The agents are still VB6-based but they implement interfaces and, via COM, run .NET assemblies.) If I was starting from scratch, I'd use Windows Services, probably with a "management" UI available from an external process triggered from a System Tray icon. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 11 November 2015 at 14:46, Greg Keogh <gfke...@gmail.com> wrote: > Howdy again, I'm thinking aloud about a problem here in case there is > lateral thinking available. > > We have a mature app that uses a single-file database that is locked. Now > new apps want to use this file as well, but how can they share it? The usual > fix would be to (1) Migrate it into something like SQL Server (2) Wrap the > file in code in a different process and expose it as a service. > > Option 1 has too many dependencies that aren't available. Option 2 is easy > to code, but you have to manage the lifetime of the process and perhaps make > it a Windows Service, which makes a bigger install and runtime footprint. > > At the moment I'm wondering if the "service" could be a hidden console or > WinForms app that is registered in HKLM Run, or similar. That way it's a > "fake lightweight service". > > Greg K
RE: Mobile device photos
Just confirmed the browse button allowed me to choose a photo from various sources on my Windows Phone 8.1. I can choose to use the camera to take a new photo with one more "click", so the capture itself seems to be ignored. Mark Hurd. Sent from my Windows Phone. -Original Message- From: "ILT" <il.tho...@outlook.com> Sent: 22/10/2015 1:50 PM To: "'ozDotNet'" <ozdotnet@ozdotnet.com> Subject: RE: Mobile device photos Windows Phone 8.1 – anyone tried it (Chrome is n/a on these devices) Ian Thomas Albert Park, Victoria From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Kirsten Greed Sent: Thursday, October 22, 2015 2:02 PM To: 'ozDotNet' Subject: RE: Mobile device photos The built in browser (Android Browser 4 on mine ) does bring up the camera From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Joseph Cooney Sent: Thursday, 22 October 2015 1:42 PM To: ozDotNet Subject: Re: Mobile device photos Chrome is great. My brother works on the chrome team. Are you saying I can't trust my own family? On Thu, Oct 22, 2015 at 12:39 PM, DotNet Dude <adotnetd...@gmail.com> wrote: Don't let Greg hear you mention Chrome :p On Thursday, 22 October 2015, Kirsten Greed <kirst...@jobtalk.com.au> wrote: I think Mercury came with my phone. Will try installing Chrome From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Joseph Cooney Sent: Thursday, 22 October 2015 1:32 PM To: ozDotNet Subject: Re: Mobile device photos I was unfamiliar with the Mercury browser too. Not sure what tech it is based on, but by the Play store's metrics it has been downloaded between 500,000 and 1,000,000 times. This sounds like a lot, but then you look at the numbers and see that Firefox has been downloaded between 100,000,000 and 500,000,000 times. Unless your metric show a compelling reason to do otherwise I wouldn't support boutique 3rd party browsers. https://play.google.com/store/apps/details?id=com.ilegendsoft.mercury=en https://play.google.com/store/apps/details?id=org.mozilla.firefox=en It would be worth checking to see if the android 'built-in' browser (which is not Chrome) supports this, as it is likely much more widely used. Joseph On Thu, Oct 22, 2015 at 12:06 PM, David Burstin <david.burs...@gmail.com> wrote: Mine worked on my HTC m8 using Chrome. What and why Mercury browser? On 22 October 2015 at 12:37, Kirsten Greed <kirst...@jobtalk.com.au> wrote: I went to the url on my android phone with it's Mercury browser but nothing happens when I touch Choose File From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Craig van Nieuwkerk Sent: Thursday, 22 October 2015 10:24 AM To: ozDotNet Subject: Re: Mobile device photos Basically all it does it bring up the camera where you can take a photo. Then when you do a form POST it will be submitted like a normal input[type=file]. It even displays a little preview of the photo next to the input. Open this on your phone https://jsfiddle.net/wkwq6kLz/ Craig On Thu, Oct 22, 2015 at 10:12 AM, Greg Keogh <gfke...@gmail.com> wrote: I have done this before. This will basically work like a standard file upload input but will use the camera to select the file. Goog grief! That's like black magic. So you click the button rendered next to the control and what happens? In my case it looks like the initial devices in the field will be iPads. I'll read up on the expanded element and make a test page and try it on the weekend. Greg -- w: http://jcooney.net t: @josephcooney -- w: http://jcooney.net t: @josephcooney
Re: Odd text encoding
Note that the original XML would have been smaller than the base64 compressed text if you removed the unused namespaces :-) (Of course it presumably would have compressed to smaller again.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 10 September 2015 at 15:32, Nelson <nelson.honey...@gmail.com> wrote: > Stephen, > > That base64 encoding - see https://en.wikipedia.org/wiki/Base64 > the == at the end is for padding. > > > base64 is a common way to encode binary data in plaintext string (gzip in > this our case here) > > > Regards, > > Nelson Chan > > On 10 September 2015 at 15:55, Stephen Price <step...@perthprojects.com> > 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 (罗格雷格博士) <g...@greglow.com> 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 <ozdotnet@ozdotnet.com> >>> Subject: Re: Odd text encoding >>> >>> On 10 September 2015 at 10:21, Greg Low (罗格雷格博士) <g...@greglow.com> >>> 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 >>> >>> > > -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Visual Studio startup delay
That sounds like a network delay, due to attempting to access, say, a shared drive that is not actually available. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 19 March 2015 at 13:39, Greg Keogh g...@mira.net wrote: Folks, sometime in the last couple of weeks I noticed that Visual Studio 2014 was taking a long time to start, but only when I ran it as Administrator. Launching it as my normal user account makes it come up in a second. The last time this happened I used procmon to discover that thousands of small HTML files were being written due to me accidentally leaving fuslog active, but that's not happening this time. This time neither procmon or Fiddler show any unusual activity of any type around the pause. VS simply stops for exactly 30 seconds while the CPU sits at 0% busy, then it appears as normal. This exact 30 second delay has be stumped. Any ideas anyone? Greg K
Re: [OT] Unbelievable ad tracking
On 23 December 2014 at 17:24, David Connors da...@connors.com wrote: Or: 7) Sit on your arse in front of the TV watching endless shit for dickheads ads for stuff you DON'T want and revel in your new freedom. I must be the only person here who thinks that targeted ads are a good idea. Endless ads for boat add-ons and things I can BBQ pork with ... Mmmm pork. Imagine if TV was that good. No, I mentioned it when suggesting DuckDuckGo earlier in this thread: On 22 December 2014 at 10:45, Mark Hurd markeh...@gmail.com wrote: Personally I prefer to get targeted ads rather than random ads. But if you want to avoid Google's tracking, use DuckDuckGo: http://donttrack.us/ https://duckduckgo.com/ -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) 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 -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] Unbelievable ad tracking
I don't know if it was one person's 1 pixel tracker continued into multiple replies or if a couple of you have them added to your messages automatically, but they've been ironic anyway! -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] Unbelievable ad tracking
On 22 December 2014 at 17:01, Greg Low (博士低格雷格) g...@greglow.com wrote: You can lodge a BAS with the ATO using it. (You can’t with IE 11)… That's funny! I never tried to lodge with IE11 but I had to use it (and not Chrome) to actually set up the authentication/authorization used by the ATO. I don't recall the problem now, but Chrome didn't work and IE11 did. Once it was set up, Chrome worked to actually access bp.ato.gov.au. 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 -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Programmatically call forward
On: *21forward number# Off: #21# -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 16 December 2014 at 18:58, Craig van Nieuwkerk crai...@gmail.com wrote: I have a client who wants to be able to have a button in our app to turn on/off call forwarding on their phone system. Does Telstra (or Optus) have any API anyone knows about for things like this? Craig
Re: TraceSource without config
Actually Tom, the page you link to DOES list code To initialize trace sources, listeners, and filters without a configuration file, though not recommended. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 3 December 2014 at 09:24, Tom P tompbi...@gmail.com wrote: Hi Greg According to the following page you can have the defaults in the configuration file and override things in code as you need dynamically http://msdn.microsoft.com/en-us/library/ms228984(v=vs.110).aspx Still need entries in a config file but they can be overridden which is good Thanks Tom On 2 December 2014 at 17:38, Greg Keogh g...@mira.net wrote: Folks, many parts of the FCL (like Remoting and WCF) write trace information out to a TraceSource class, presumably like this (does this look right?): private TraceSource ts = new TraceSource(My.Library, SourceLevels.All); : ts.TraceInformation(Hello world!); The only way I can find at the moment to listen to what a library like that is tracing is to put something like this in the App's config file: system.diagnostics sources source name=My.Library listeners add name=consListener type=System.Diagnostics.ConsoleTraceListener/ /listeners /source /sources /system.diagnostics Does anyone know how bypass the config section to do this in code? I've been fiddling and searching the web but every example or tutorial I find uses a config file. Greg K
Re: VB.NET (was Re: VS2013 Windows Phone project)
Yes, there are still VB.NET programmers around. My workplace is using C# for many new projects but we have lots of VB.NET (and some VB6) legacy stuff that won't go away. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 20 November 2014 16:07, DotNet Dude adotnetd...@gmail.com wrote: Did someone mention vb.net? Finally! Now I can sleep well knowing I'm not completely a dinosaur...yet. :p On Thu, Nov 20, 2014 at 1:01 PM, Greg Keogh g...@mira.net wrote: C# is showing up in more and more places. Xamarin, Unity 3d, and I'm sure its elsewhere. I couldn't help but notice that too, it really gives street cred to C# ... Xamarin chooses C# as their primary language, but I see they have F# support documentation as well. Whatever happened to VB.NET? I miss the old VB sucks Fridays! Greg
Re: Bare bones web app
And I produced a web service, using a simple pass-through aspx label: http://stackoverflow.com/a/2817637/256431 -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Debugging Function parameters
In that case, the error is not coming from any of the parameters as you've described them, as they all accept Nothing as a valid value, or this is optimized code. If this is called with SomeObj.AddCustomer(...) then SomeObj is Nothing. Also, of course, if some of the arguments are expressions that may contain Nothing, you can Step Into the specific evaluations since VS2008 (at least). Otherwise your (possibly optimized) code is not reporting the position of the error correctly. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 8 April 2014 20:47, anthonyatsmall...@mail.com wrote: Exception occurs at the function call, don't get a chance to step through -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Sam Lai Sent: Tuesday, 8 April 2014 8:25 PM To: ozDotNet Subject: Re: Debugging Function parameters I haven't done VB.NET for a long while so this is probably a silly question, but why can't you just step into that function see where it is failing? On 8 April 2014 18:10, anthonyatsmall...@mail.com wrote: I have a function with about 10 arguments, one of the variables is failing, ie Object reference not set to an instance of an object. Is it possible to determine which variable is causing the issue? Public Function AddCustomer(ByVal CustomerId As Nullable(Of Integer), ByVal Company As String, ByVal TradingAs As String, ByVal AccessName As String, ByVal Address As String, ByVal Address2 As String, ByVal Suburb As String, ByVal State As String, ByVal Postcode As String, ByVal CountryId As Integer, ByVal PostalAddress As String, ByVal PostalAddress2 As String, ByVal PostalSuburb As String, ByVal PostalState As String, ByVal PostalPostcode As String, ByVal PostalCountryId As String, ByVal Phone As String, ByVal Fax As String, ByVal Email As String, ByVal Firstname As String, ByVal Lastname As String, ByVal UserEmail As String, ByVal Username As String, ByVal UserPassword As String, ByVal Website As String, ByVal Mobile As String)
Re: Data validation on a business object done by a rules engine - looking for a SIMPLE rules engine
On 8 April 2014 21:33, Greg Harris g...@harrisconsultinggroup.com wrote: Hi Everybody, snip Or would we be better off just writing the validation method in C# and doing a quick recompile? Best of both worlds, even if only for development: use a web project rather than a web application, then you can get automatic recompilation whenever you change the source. Many Thanks Greg Harris -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] Couple of fun/useful(?) things
Not really off topic, and not actually spam, like Gmail thinks. On 9 April 2014 10:56, osjasonrobe...@gmail.com wrote: Couple of things which I though may be fun/use/interest: snip -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] Weird symptoms and SSD
I'd also not trust the backups from now on either. I.e. don't overwrite previous backups with current ones, until you can check that the contents haven't been corrupted already. -- Regards, *Mark Hurd*, B.Sc.(Ma.)(Hons.) On 25 March 2014 14:20, ben.robb...@jlta.com.au wrote: My guess is a drive based on a SandForce controller. You’ve described the symptoms I had before my SandForce SDD died a couple of years ago. I was going to replace it with a newer SandForce drive until I Googled a bit and then opted to go with an Intel 510 which used a Marvell controller and have had no problems with it. I’d back up everything you want to keep that is on that drive ASAP. Ben *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *GregAtGregLowDotCom *Sent:* Tuesday, 25 March 2014 11:26 AM *To:* ozDotNet *Subject:* RE: [OT] Weird symptoms and SSD Hi Greg, Always horrible to hear that. What sort of drive was it? Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913fax SQL Down Under | Web: www.sqldownunder.com *From:* ozdotnet-boun...@ozdotnet.com [ mailto:ozdotnet-boun...@ozdotnet.com ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Greg Keogh *Sent:* Tuesday, 25 March 2014 2:00 PM *To:* ozDotNet *Subject:* [OT] Weird symptoms and SSD Folks, I have a warning post: Since I installed a fresh Windows 7 on an SSD as Xmas I've been suspicious of how one time in 20 it will stop and say Bad boot drive and I have to power off and on again and then it always starts okay. No other symptoms have been observed. Well today, I was shutting down my PC when it blue screened on the way down, it said SERVICE_EXCEPTION. Just to be safe I rebooted it normally to check it was okay. First problem. IE 32-bit shortcut says it's invalid, but I can see the iexplore.exe in the correct place. Double-clicking it does nothing. The 64-bit iexplore.exe tells me The file or directory is corrupted and unreadable. Then I notice most of my Start menu All Programs are gone. The Administrative Tools menu is empty. I searched for an hour but none of the advice is relevant or useful. Last known good config recover did nothing. I even thought I had a virus, but found no evidence. Finally I did a chkdsk C: /F and rebooted and I saw about 20 repairs (including iexplore.exe) and now it seems to be back to normal. However I suspect the SSD is about to die unpredictably and all of my mysterious symptoms were side effects. I'm just posting this in case it might be useful for someone in a similar situation. Now I'm going to the shops to get a new SSD and psych myself up for a possible Windows reinstall over the whole weekend. At Xmas it took 4 x 12 hour days to get to a satisfactory working state. *Greg K* This email is intended for the named recipient only. The information it contains may be confidential or commercially sensitive. If you are not the intended recipient you must not reproduce or distribute any part of this email, disclose its contents to any other party, or take any action in reliance on it. If you have received this email in error, please contact the sender immediately and delete the message from your computer.
Re: Visual Studio Macros stopped working?
Yes, but many of us are still using older versions to support existing code bases. I still have to support VB6 too. At least we can still debug (or at least step through) VB6 code in the later IDEs. As the KB article explains, and I repeat in my SO rewrite of it here: http://stackoverflow.com/a/22063369/256431 all the previous .NET IDEs that did have macros were broken by the update. I also know there are third party macro facilities for VS2012+ but I don't know if they were broken. For completeness, it doesn't affect Express users either :-) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 5 March 2014 21:31, Arjang Assadi arjang.ass...@gmail.com wrote: Weren't Macros taken out of VS2013? http://stackoverflow.com/questions/12062515/can-i-record-play-macros-in-visual-studio-2012-2013 On 27 February 2014 19:26, Mark Hurd markeh...@gmail.com wrote: It's not something you did I've been assuming my macros stopped working because of local actions on my machine. But I finally confirmed with a Google search that a recent Windows Update fixed a security issue that broke the macros functionality! The workaround is here: http://support.microsoft.com/kb/2934830 -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Visual Studio Macros stopped working?
On 6 March 2014 12:18, David Kean david.k...@microsoft.com wrote: Thanks. It's a known issue that we're tracking and coming up with a plan to address those VS customers affected by it. Good. It's not too hard to find once you decide to start Googling for the problem, but, like I said in my StackOverflow question, I originally assumed it was something I did. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Fwd: Visual Studio Macros stopped working?
It's not something you did I've been assuming my macros stopped working because of local actions on my machine. But I finally confirmed with a Google search that a recent Windows Update fixed a security issue that broke the macros functionality! The workaround is here: http://support.microsoft.com/kb/2934830 -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Problem with FileSystem.DeleteFile method in root directory
I spent five minutes confirming what happens in Vista if a normal user attempts to delete a file in C:\ that they've been given permission to write to. (I didn't want to adjust C:\'s rights to actually allow them to add and delete files themselves.) It does require elevation (of course) and I then couldn't see the file in the Recycle Bin. (I attempted to open Explorer as Administrator to confirm if I could see it then, but I don't think I really succeeded.) However it was returned when I used Explorer's Undo feature, so it was stored somewhere :-) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: out of memory..urgent...Solution
I am surprised this solves your memory problem, as although the UTF8 GetString(Byte[]) defers to Encoding's base method, that returns the result of GetString(Byte[], int, int) which is overridden by UTF8, which calls String.CreateStringFromEncoding. This uses String.FastAllocateString to create the string of size based upon UTF8's override of GetCharCount, which I haven't reviewed closely, but it doesn't look like it's an estimate :-) The String's internal Char[] is manipulated directly by UTF8's internal GetChars, so unless GetCharCount does get it vastly wrong, I don't see how your fix, which starts with a 16 byte StringBuilder buffer that will be increased by the 10 chars each time you Append, with the existing content copied across each time. In summary, in your last loop iteration there will need to be almost twice your whole string required in memory for a short time as the last chunk is Appended. Whereas as far as I see in the (Reflected) code, the simple GetString should just hold the whole String once and work within it. So if your fix really is a fix, I suggest there's a bug in UTF8's GetCharCount (or I'm wrong and it /is/ just estimating how many Chars are needed). -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 13 September 2013 14:16, anthonyatsmall...@mail.com wrote: If you are interested..memeory issue was resolved by doing the following… Public Shared Function byteArrayToString(ByVal b() As Byte) As String Dim ss As New System.Text.UTF8Encoding Dim sString As String Dim sb As New StringBuilder Dim cursor As Integer Dim sChunk As String Try ' sString = System.Text.Encoding.UTF8.GetString(b) While cursor b.Length Dim arr2() As Byte If (cursor + 10) (b.Length) Then arr2 = New Byte(b.Length - cursor - 1) {} Array.Copy(b, cursor, arr2, 0, b.Length - cursor) Else arr2 = New Byte(10 - 1) {} Array.Copy(b, cursor, arr2, 0, 10) End If sChunk = System.Text.Encoding.UTF8.GetString(arr2) sb.Append(sChunk) cursor += 10 End While ' sString = ss.GetString(b) Return sb.ToString Catch ex As Exception Throw ex End Try End Function 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.com] On Behalf Of David Kean Sent: Wednesday, 11 September 2013 2:20 AM To: ozDotNet Subject: RE: out of memory..urgent Memory isn’t unlimited. Basically, when you convert from a byte array - string, you have two copies of the same data (one for the byte array and one for the string) in memory. What exactly are you doing? You are typically better off chunking and reading smaller amounts of data at a time. Use something like a StreamWriter over a stream to automatically handles the byte - text conversion. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of anthonyatsmall...@mail.com Sent: Monday, September 9, 2013 8:05 PM To: ozDotNet Subject: out of memory..urgent Getting out of memory exception when I try to Dim s as string Dim b() as Byte s=System.Text.Encoding.GetEncoding(“utf-8).GetString(b) Definitely something about the length of b..works fine most of the time except if b length is very large 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
Re: Future of .NET
Another non-.NET opinion, admittedly maily because he want's a fully open source solution: http://www.codinghorror.com/blog/2013/03/why-ruby.html -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: decimal.ToString() (JSON Serialization)
Note that, obviously, one of Decimal's claims to fame is that it considers trailing zeros as significant, so serializing /should/ record those details. If you want to adjust that, use Decimal.Round(value, 2), but note that this does not add trailing zeros, only removes extras. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 11 August 2013 14:32, Corneliu I. Tusnea corne...@acorns.com.au wrote: Hi, Anyone working today? How can I force the NewtonSoft Json Serializer to serialize two decimals the same way? decimal a = 1234.1200M; decimal b = 1234.12M; var sa = JsonConvert.SerializeObject(new { value = a }); var sb = JsonConvert.SerializeObject(new {value = b}); Console.WriteLine(sa); Console.WriteLine(sb); Results are: {value:1234.1200} {value:1234.12} How can I force it to serialize them both with 4 decimals so the results are identical? Even simpler, ignoring the serializer, how can I make sa.ToString() == sb.ToString() ? The Json Serializer is only doing a simple .ToString() behind the scenes. Regards, Corneliu
Re: decimal.ToString() (JSON Serialization)
On 11 August 2013 18:27, Corneliu I. Tusnea corne...@acorns.com.au wrote: Yes, that's my issue. It seems that if you somehow tell is there are multiple zeros is keeps than and displays them during the .ToString(). This is what I ended up doing: snip // we really really really want the value to be serialized as 0. not 0.00 or 0.! //This is very important for all our hash calculations value = Math.Round(value, 4); value = Math.Roundvalue+0.1M)/1)*1)-0.1M, 4); // divide first to force the appearance of 4 decimals base.WriteValue(value); You can simplify this to just: value = Math.Round(0.M + value, 4); -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Testing ComVisible in vbscript
Unless you include the /codebase option in the RegAsm call, your CreateObjects only work if they're in the current working directory of the script (unless you have defined extra details in wscript.exe.config, cscript.exe.config, or machine.config). I've also had issues confirming I have the right object name to create. In other words, ProgIdAttribute does not always seem to be processed. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 1 August 2013 15:26, Greg Keogh g...@mira.net wrote: It's working now, but I'm not sure what I did. It's something to do with regasm version. If I run regasm from the VS2012 command prompt then CreateObject fails, if I run it specifically from the Framework64\v4.0.30319 folder it works. Both regasm seem to have the same version and run correctly but give different behaviour. I haven't got time to diagnose why it does and doesn't work at the moment (who was that guy who said everything works for me a couple of weeks ago?) Greg K
Re: [OT] RSS feed formatting
When I view source of http://aka.ms/AtHomeRSS the second line is: ?xml-stylesheet type='text/xsl' href='RssPretty.xslt' version='1.0'? On 16 July 2013 18:31, Ian Thomas il.tho...@iinet.net.au wrote: Sorry, I can’t see any explicit XSLT file referenced in the RSS (View Source, in Internet Explorer) – and I would have thought that saving the XML file itself and then opening that in IE, then either (if explicitly named) the browser would locate the XSLT, or ( as you suggested) “ If it's not specified or if the file is missing, IE will just use a default one which is the XML view you saw.” – but not true. So, I’m still in ignorance. Ian Thomas Victoria Park, Western Australia From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Richards Sent: Tuesday, 16 July 2013 10:49 AM To: ozDotNet Subject: Re: [OT] RSS feed formatting Its referenced in the file. Just look at the source, you'll see it at the top of the file. If it's not specified or if the file is missing, IE will just use a default one which is the XML view you saw. David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama On 16 July 2013 10:01, Ian Thomas il.tho...@iinet.net.au wrote: I did assume there was an XSLT file behind, but I don’t think it is referenced – or is it – in the XML itself? Is it always, or is there a default name for the transformation file? Ian Thomas Victoria Park, Western Australia From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Richards Sent: Tuesday, 16 July 2013 9:03 AM To: ozDotNet Subject: Re: [OT] RSS feed formatting You're not saving the CSS. In the example you gave, try grabbing the CSS file as well: http://www.microsoft.com/atwork/community/RssPretty.xslt David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama On 16 July 2013 08:54, Ian Thomas il.tho...@iinet.net.au wrote: This is a naïve question, maybe someone can explain. If I browse to an RSS feed (eg, Microsoft at Work) the browser formats it consistently. Yet, saving the XML file itself and then later opening the saved-to-disk file in the same browser (eg, IE10) the display is the standard XML syntax-highlighted view for any XML file. What is happening? Ian Thomas Victoria Park, Western Australia -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] RSS feed formatting
OK, I see now, once you actually subscribe there's no xsl. On 16 July 2013 22:08, Mark Hurd markeh...@gmail.com wrote: When I view source of http://aka.ms/AtHomeRSS the second line is: ?xml-stylesheet type='text/xsl' href='RssPretty.xslt' version='1.0'? On 16 July 2013 18:31, Ian Thomas il.tho...@iinet.net.au wrote: Sorry, I can’t see any explicit XSLT file referenced in the RSS (View Source, in Internet Explorer) – and I would have thought that saving the XML file itself and then opening that in IE, then either (if explicitly named) the browser would locate the XSLT, or ( as you suggested) “ If it's not specified or if the file is missing, IE will just use a default one which is the XML view you saw.” – but not true. So, I’m still in ignorance. Ian Thomas Victoria Park, Western Australia From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Richards Sent: Tuesday, 16 July 2013 10:49 AM To: ozDotNet Subject: Re: [OT] RSS feed formatting Its referenced in the file. Just look at the source, you'll see it at the top of the file. If it's not specified or if the file is missing, IE will just use a default one which is the XML view you saw. David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama On 16 July 2013 10:01, Ian Thomas il.tho...@iinet.net.au wrote: I did assume there was an XSLT file behind, but I don’t think it is referenced – or is it – in the XML itself? Is it always, or is there a default name for the transformation file? Ian Thomas Victoria Park, Western Australia From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Richards Sent: Tuesday, 16 July 2013 9:03 AM To: ozDotNet Subject: Re: [OT] RSS feed formatting You're not saving the CSS. In the example you gave, try grabbing the CSS file as well: http://www.microsoft.com/atwork/community/RssPretty.xslt David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama On 16 July 2013 08:54, Ian Thomas il.tho...@iinet.net.au wrote: This is a naïve question, maybe someone can explain. If I browse to an RSS feed (eg, Microsoft at Work) the browser formats it consistently. Yet, saving the XML file itself and then later opening the saved-to-disk file in the same browser (eg, IE10) the display is the standard XML syntax-highlighted view for any XML file. What is happening? Ian Thomas Victoria Park, Western Australia -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] RSS feed formatting
That seems to be an artifact of IE's processing of RSS. The URL of the subscribed page (as seen in the Properties of the page) is: http://www.microsoft.com/athome/community/rss.xml which is what the shortened url http://aka.ms/AtHomeRSS expands to. On 16 July 2013 22:20, Mark Hurd markeh...@gmail.com wrote: OK, I see now, once you actually subscribe there's no xsl. On 16 July 2013 22:08, Mark Hurd markeh...@gmail.com wrote: When I view source of http://aka.ms/AtHomeRSS the second line is: ?xml-stylesheet type='text/xsl' href='RssPretty.xslt' version='1.0'? On 16 July 2013 18:31, Ian Thomas il.tho...@iinet.net.au wrote: Sorry, I can’t see any explicit XSLT file referenced in the RSS (View Source, in Internet Explorer) – and I would have thought that saving the XML file itself and then opening that in IE, then either (if explicitly named) the browser would locate the XSLT, or ( as you suggested) “ If it's not specified or if the file is missing, IE will just use a default one which is the XML view you saw.” – but not true. So, I’m still in ignorance. Ian Thomas Victoria Park, Western Australia From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Richards Sent: Tuesday, 16 July 2013 10:49 AM To: ozDotNet Subject: Re: [OT] RSS feed formatting Its referenced in the file. Just look at the source, you'll see it at the top of the file. If it's not specified or if the file is missing, IE will just use a default one which is the XML view you saw. David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama On 16 July 2013 10:01, Ian Thomas il.tho...@iinet.net.au wrote: I did assume there was an XSLT file behind, but I don’t think it is referenced – or is it – in the XML itself? Is it always, or is there a default name for the transformation file? Ian Thomas Victoria Park, Western Australia From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Richards Sent: Tuesday, 16 July 2013 9:03 AM To: ozDotNet Subject: Re: [OT] RSS feed formatting You're not saving the CSS. In the example you gave, try grabbing the CSS file as well: http://www.microsoft.com/atwork/community/RssPretty.xslt David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama On 16 July 2013 08:54, Ian Thomas il.tho...@iinet.net.au wrote: This is a naïve question, maybe someone can explain. If I browse to an RSS feed (eg, Microsoft at Work) the browser formats it consistently. Yet, saving the XML file itself and then later opening the saved-to-disk file in the same browser (eg, IE10) the display is the standard XML syntax-highlighted view for any XML file. What is happening? Ian Thomas Victoria Park, Western Australia -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] T-SQL GroupBy and Sum on a DateTime
You can (must) use a Where clause if you refer to soh.OrderDate directly, such as with a Between clause, which would allow you to specify any date range you want. On 16 July 2013 15:52, Greg Keogh g...@mira.net wrote: Greg L I rejigged my query to follow your sample and it's working. I DID NOT use the studio query designer, which I think was leading me astray. It's just a damn nuisance that you can't use a HAVING on the whole OrderDate as this makes selection of rows in a range like 2013-05-14 to 2013-07-01 tricky to compose out of pieces of dates. Is there a nifty trick to simplify the date range selection? -- Greg K SELECT SUM(sod.LineTotal) AS TotalValue, DATEPART(year,soh.OrderDate) AS OrderYear, DATEPART(month,soh.OrderDate) AS OrderMonth FROM Sales.SalesOrderHeader AS soh INNER JOIN Sales.SalesOrderDetail AS sod ON soh.SalesOrderID = sod.SalesOrderID GROUP BY DATEPART(year,soh.OrderDate), DATEPART(month,soh.OrderDate) HAVING DATEPART(year,soh.OrderDate) BETWEEN 2005 AND 2012 ORDER BY OrderYear, OrderMonth; -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Still trying to fix authentication on an ASP.net application: some accounts work and others don't
Here's some DotLisp methods to extract locked-out details: ; This retrieves the list of users currently locked-out. (def (locked-out) (sqlselect username from aspnet_users u join aspnet_membership m on u.userid=m.userid where islockedout0 :connect *default-connect-string :returns 'col)) ; This unlocks a user. (def (unlock user) (sql(+ update m set islockedout=0 from aspnet_users u join aspnet_membership m on u.userid=m.userid where islockedout0 and username= (quote-string user)) :connect *default-connect-string :returns 'non-query)) ; This retrieves the password if you're using clear-text password storage. (def (get-password user) (sql(+ select password from aspnet_users u join aspnet_membership m on u.userid=m.userid where username= (quote-string user)) :connect *default-connect-string :returns 'val)) You can effectively ignore the DotLisp and see these as SQL queries. -- Regards, *Mark Hurd*, B.Sc.(Ma.)(Hons.) On 11 July 2013 13:23, Katherine Moss katherine.m...@gordon.edu wrote: Thanks. I’m also checking all of the stored procedures; I think there is one for at least every action on the site (there are 697 of them). I’ll go to the forums if I cannot find what I’m looking for, though I know that this is very easy. And I’m curious, if you don’t use ASP.net membership built into the framework, then what on earth do you use for membership in ASP.net applications? ** ** *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *GregAtGregLowDotCom *Sent:* Wednesday, July 10, 2013 8:31 PM *To:* ozDotNet *Subject:* RE: Still trying to fix authentication on an ASP.net application: some accounts work and others don't ** ** Hi Katherine, ** ** I’ll have to let someone else that uses that membership provider answer that one. I took one look at it when it was released and decided it wasn’t for me. I felt like I was in a parallel universe. Everyone in the room was talking about how fast it was to build and I was looking at the methods, etc. and thinking “didn’t they ever read any of the framework design guidelines?” ** ** Regards, ** ** Greg ** ** Dr Greg Low ** ** 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913fax SQL Down Under | Web: www.sqldownunder.com ** ** *From:* ozdotnet-boun...@ozdotnet.com [ mailto:ozdotnet-boun...@ozdotnet.com ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Katherine Moss *Sent:* Wednesday, 10 July 2013 11:07 PM *To:* ozDotNet *Subject:* RE: Still trying to fix authentication on an ASP.net application: some accounts work and others don't ** ** That’s the funny thing; when I try and retrieve the passwords for either of these two accounts, instead of having email directed to the local server (I don’t have SmarterMail configured yet), I get the “we can’t locate your account” message from Sueetie, then when I go to retrieve the user name of the account, I was able to get a temporary email sent to the local server (only for my account, and not the default administrator account), so figuring that the temp password expired since it wasn’t working when Forms authentication had accidentally gotten shut off, I attempted to make another temporary password via the forgot user name link on the page. It was then when my account got locked out. Never happened before, and as far as I can tell, the default administrator account is nonexistent now. But it is only these two accounts that are causing problems now; everyone elses works fine. So my solution to this problem is instead of futzing around trying to figure out why these aren’t working, I could make my friend an administrator and allow her to delete them and then recreate them. (she’s an admin anyway.) But my problem is how to query the ASP.net membership tables in the database in order to ensure that the change gets replicated from database to site. Correct me if I’m wrong, but this is the aspnet_roles table I’m looking to access, right? And if so, what is the statement I would use to make this change? (I’m very weak in Transact-SQL at the moment, but it’s thanks to cool folks like you guys that I learn). Looks like flipping forms authentication on and off really shuddered this thing. Jees. ** ** *From:* ozdotnet-boun...@ozdotnet.com [ mailto:ozdotnet-boun...@ozdotnet.com ozdotnet-boun...@ozdotnet.com] *On Behalf Of *GregAtGregLowDotCom *Sent:* Wednesday, July 10, 2013 12:03 AM *To:* ozdotnet@ozdotnet.com *Subject:* RE: Still trying to fix authentication on an ASP.net application: some accounts work and others don't ** ** Hi Katherine, ** ** It’s not saying that the account or the password are wrong. It’s saying that the account is locked out. Is it set up to automatically unlock accounts after a period of time? Is there a flag in the database that holds the authentication details
Re: the Open Source community for .NET developers: the value of joining and developing OS VS. for-proffit development
BTW You might want to choose another name: Project Jenks does have a number of hits https://www.google.com.au/search?q=Project+Jenks -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 10 July 2013 22:38, Katherine Moss katherine.m...@gordon.edu wrote: I'll have to look into that if I find it fits my needs, though I think that the Jenks Project needs to be open source if my plans for it are going to work out the way I'd like.
Re: the Open Source community for .NET developers: the value of joining and developing OS VS. for-proffit development
It's not truly hidden unless you go to great lengths to obfuscate it. That's true except when you don't actually provide the software to the consumer. Software as a service makes it quite feasible to provide great technology without giving out the source or binary code. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 9 July 2013 12:03, Stephen Price step...@perthprojects.com wrote: ah ok. Only reason you would hide your code is if it is a secret, as in part of your business intellectual property. An algorithm, or whatever that no one else has, and that sets you apart from your competition. It is important from a business perspective to keep what's yours as yours. Arguably, I guess. That would be situations where your income comes from your product and that people are prepared to pay for it because no one else can do what your product does. You can make money from selling your time, or a product, or for providing a service. When you say hiding your code I assume you mean closed source versus open source. It's not truly hidden unless you go to great lengths to obfuscate it. It's not a bad thing to want to protect your IP. Same as its not a bad thing to want to have open source code. Really depends what you are trying to do. As for making money from coding, yeah there are numerous ways. There's apps in market place, Ads, freeware, Shareware. In app purchases, and donations. Contracting and Permanent jobs for someone else. Write a product or service and charge people to use it. All part of the excitement and challenge of working as a developer. :) So yes I agree there's more than hiding your code and charging for your stuff. I do detect a hint of judgement or invalidation against hiding your code and charging for it. It's not right or wrong, but thinking makes it so.
Re: Visual studio and SharpDevelop: who uses which on this list and why?
On 4 May 2013 11:14, David Burstin david.burs...@gmail.com wrote: On 04/05/2013 11:25 AM, Tristan Reeves tree...@gmail.com wrote: full featured meaning, um, not full featured. Or at least not if you consider having any plugin work with VS a feature. LOL. Ah Microsoft, gotta love 'em. rant Yeah. Gotta love that they provide an excellent development environment at a fair price and then provide a free version that also gives a great development experience. Or did you want the free version to be exactly the same as the paid version? This whole freetard sense of entitlement gives me the sh*ts. /rant I agree with David's rant, though I do also see Tristan issue, in that the free version is clearly nobbled because you can't access the expansion points that are clearly still there. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] Gmail and spam
Gmail definitely does ignore self emails -- sometimes! I don't know what exactly determines when it does and does not, but some mailing lists are afflicted and some not. (Of course some mailing lists explicitly don't return mail to the sender, or can be configured to do so, but it is confusing when that is turned off and yet Gmail doesn't seem to acknowledge receiving the message back.) Also note when sending via Gmail's servers (from and) to your Gmail account (but via an external email client i.e. via SMTP) the same message is in my Gmail Sent Items and Inbox. It's not seen as two separate messages. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 3 May 2013 11:35, David Connors da...@connors.com wrote: On Fri, May 3, 2013 at 10:24 AM, David Burstin david.burs...@gmail.com wrote: I've noticed that my gmail spam folder (spam for the last 30 days) has dropped from an average of around 500 emails down to about 60. Anyone else had a similar experience? Any ideas why the sudden drop? Some sort of google fu magic. When I first moved over I was getting 30K spam a month, then that dropped to 5k, now I have 303 spams in my spam folder. I don't know what they are doing but I like what they are doing. On a possibly related note, yesterday I sent myself an email from gmail to another account I have. That account is set up to forward its emails back to my gmail account. No idea, they might have de-duped - but the headers would be different if it was forwarded. Sounds like a bug. David.
Re: Sending emails from extra domains in Office 365
Ha! That's what I do with Outlook Express. I didn't think it'd still be the same! -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 26 April 2013 11:50, g...@greglow.com wrote: Magic Grant. That's the winner. It's a pity that it's necessary but this would of course work and is simpler. Regards, Greg -Original Message- From: Grant Castner [mailto:gcast...@castnerit.com] Sent: Wednesday, 24 April 2013 9:25 PM To: Greg Low; 'ozDotNet' Subject: RE: Sending emails from extra domains in Office 365 Hi Greg, One more option if you are using Outlook. It involves setting up a phantom POP account. More information on using distribution lists as well. http://community.office365.com/en-us/forums/158/p/12859/58290.aspx Cheers, Grant -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Low Sent: Wednesday, 24 April 2013 5:52 PM To: 'Ian Thomas'; 'ozDotNet' Subject: RE: Sending emails from extra domains in Office 365 Wow, that's interesting thanks Ian. So it looks like the only way of doing it is to set up a distribution group for each email address rather just adding the email address to each user. I'll give it a shot tomorrow. Regards, Greg Greg Maybe this is the way to do it? http://community.office365.com/en-us/forums/158/t/22116.aspx Otherwise, I know a SMBiT Pro member (Robert Crane, in Brisbane) who would be able to definitively answer your question. Ian Thomas Victoria Park, Western Australia -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Low Sent: Wednesday, April 24, 2013 3:01 PM To: 'Mark Hurd'; ozDotNet Subject: RE: Sending emails from extra domains in Office 365 Yes, I'm guessing the answer is going to be that you can't... (I was trying to replace our use of Gmail) Regards, Greg -Original Message- From: Mark Hurd [mailto:markeh...@gmail.com] Sent: Wednesday, 24 April 2013 4:54 PM To: Greg Low; ozDotNet Subject: Re: Sending emails from extra domains in Office 365 IIRC Gmail took a while to implement that second feature too... -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 24 April 2013 13:32, Greg Low (GregLow.com) g...@greglow.com wrote: Sorry, have no idea why that one ended up blank. This was it: Hi Folks, Office 365 had the option to add another domain so you can receive email addressed to another domain. Ie: if you are a...@lincoln.com in Office 365, you can add abelincoln.com as an extra domain, then add a...@abelincoln.com as an extra email address to receive mail on. Anyone how you to then send email in Office 365 from a...@abelincoln.com? Regards, Greg 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
Re: Glimpse...trace.write
I haven't looked into glimpse (or the code corresponding to the use of HttpPost()), but could this be interesting threading issues? Does it never log this trace or just sometimes? Does it matter if you use Debug or Release compiles? (I assume you're assured this code is executing because of other actions it takes that you've removed for this post.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 24 April 2013 14:25, ifum...@gmail.com wrote: Using glimpse which is great but I have noticed an issues..i think? It appears to output my trace.write(“”) to glimpse most of the time except for example…. HttpPost() Function requestbyemail(oEmail As ForgotModel) As ActionResult Trace.Write(ForgotController::requestbyemail) ‘Not showing in glimpse End function Am I using glimpse wrong? Anthony
Re: Running code snippets
Yes, I second LinqPad, developed by an Australian, Joseph Albahari of linqpad.net, and currently updated. I have the Snippet Compiler Live 2008 Ultimate Edition for Developers (Alpha), from Jeff Key of sliver.com, installed, but it hasn't been updated for a while -- the syntax checker doesn't know about VB.NET features that do still compile correctly. I haven't used it with C# to know for sure how good it is with that. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 12 March 2013 10:30, Preet Sangha preetsan...@gmail.com wrote: Not sure about VS but I've used linq pad to do this. On 12 March 2013 12:57, Greg Keogh g...@mira.net wrote: Folks, what's the best way of conveniently running code snippets from inside Visual Studio 2012? Years ago I used some app to run snippets, but it was inconvenient and I never reinstalled it. Perhaps there are new tricks in the Immediate window or some similar window I'm not aware of. Quite often I want to just run one to five C# lines of code and see the output, then forget it. Greg K -- regards, Preet, Overlooking the Ocean, Auckland
Re: Custom Attribute
I was playing with Attributes to understand when they were created and found they were only created when someone looked for them. So I'd guess you'd need to ensure something does reevaluate the attribute. I'd guess you might have to mark the attribute, or its usage, in some way as not permanent for code access purposes. On 4 March 2013 13:47, Stephen Price step...@perthprojects.com wrote: Hey all, I've written a custom attribute that duplicates the behaviour of PrincipalPermissionAttribute (It checks the user roles against my own Authentication service instead of looking at the Thread.CurrentPrincipal) I've noticed that it works but only seems to check the first time you access the method its decorating. Its like it assumes it has permission first time so will have access from then on. Problem being if the user logs out and logs back in as someone who isn't in the correct role, it doesn't check and lets them in when if it were to check, it would fail. Is there some kind of message or something to signal that the CodeAccessSecurityAttribute (the one i'm inheriting as PrincipalPermissionAttribute is sealed) should reevaluate it? Not even sure what to search for on Google... I've found a couple of similar implementations but nothing mentions this issue that I've found. cheers, Stephen -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: LINQ select nullable Id
int? id = (from t in things where t.Name == Foo select new int?(t.Id)).FirstOrDefault(); On 4 March 2013 18:19, Greg Keogh g...@mira.net wrote: Folks, I want to select the int Id of an entity in a DbSet, or int? null if it's not found. Like this wrong sample: int? id = (from t in things where t.Name == Foo select t.Id).FirstOrDefault(); In this case I get int zero if there is no match but I want null. Is there some way of rearranging this to get an Id or null? Remember that the query has to convertible down to SQL. Greg K -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Help..reference not working..still no resolution..
This is still just showing Common.dll /is/ being built against the 4.0 libraries. We need to see the build command for that, not the one confirming it's already gone wrong. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 20 November 2012 16:40, ifum...@gmail.com wrote: Common.dll is set to framework v3.5 but he output panel says i'm trying to use v4...see output below... C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360, 9): warning MSB3258: The primary reference C:\Common.dll could not be resolved because it has an indirect dependency on the .NET Framework assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 which has a higher version 4.0.0.0 than the version 2.0.0.0 in the current target framework. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360, 9): warning MSB3258: The primary reference C:\Common.dll could not be resolved because it has an indirect dependency on the .NET Framework assembly System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 which has a higher version 4.0.0.0 than the version 2.0.0.0 in the current target framework. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360, 9): warning MSB3258: The primary reference C:\Common.dll could not be resolved because it has an indirect dependency on the .NET Framework assembly System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 which has a higher version 4.0.0.0 than the version 2.0.0.0 in the current target framework. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360, 9): warning MSB3258: The primary reference C:\Common.dll could not be resolved because it has an indirect dependency on the .NET Framework assembly System.Data.SqlXml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 which has a higher version 4.0.0.0 than the version 2.0.0.0 in the current target framework. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360, 9): warning MSB3258: The primary reference C:\Common.dll could not be resolved because it has an indirect dependency on the .NET Framework assembly System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a which has a higher version 4.0.0.0 than the version 2.0.0.0 in the current target framework. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360, 9): warning MSB3258: The primary reference C:\Common.dll could not be resolved because it has an indirect dependency on the .NET Framework assembly System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a which has a higher version 4.0.0.0 than the version 2.0.0.0 in the current target framework. CoreResGen: All outputs are up-to-date. CoreCompile: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections. Generic,System.Data,System.Diagnostics,System.Linq,System.Xml.Linq /optioncompare:Binary /optionexplicit+ /optionstrict:custom /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /optioninfer+ /nostdlib /rootnamespace:Sby.Intellilog /sdkpath:C:\Windows\Microsoft.NET\Framework\v2.0.50727 /doc:obj\Debug\Sby.Intellilog.xml /define:CONFIG=\Debug\,DEBUG=-1,TRACE=-1,_MyType=\Windows\,PLATFORM=\A nyCPU\ /reference:C:\data\tfs\CSO\sbh\intelliLogData\bin\Debug\intelliLogData.dll, C:\data\tfs\CSO\sbh\thirdparty\Catalyst Development\SocketTools .NET Edition\Redist\v2.0.50727\SocketTools.MailMessage.dll,C:\Windows\Microsoft. NET\Framework\v2.0.50727\System.configuration.dll,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll,C:\Wi ndows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,C:\data\tfs\CSO\sbh \packages\System.Data.SQLite.1.0.82.0\lib\net20\System.Data.SQLite.dll,C:\da ta\tfs\CSO\sbh\packages\System.Data.SQLite.1.0.82.0\lib\net20\System.Data.SQ Lite.Linq.dll,C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,C:\Wi ndows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll /debug+ /debug:full /filealign:512 /out:obj\Debug\Sby.Intellilog.dll /resource:obj\Debug\Sby.Intellilog.Resources.resources /target:library IntelliTraceListener.vb My Project\AssemblyInfo.vb My Project\Application.Designer.vb My Project\Resources.Designer.vb My Project\Settings.Designer.vb SingletonLogger.vb Socket.vb sqllite.logging.vb Build FAILED. -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Mark Hurd Sent: Monday, 19 November 2012 6:08 PM To: ozDotNet Subject: Re: Help..reference not working.. You've built Common.dll with the 4.0
Re: Help..reference not working..
You've built Common.dll with the 4.0 framework DLLs. Note you may have done this with the 3.5 compiler, if your settings were adjusted that way at the time. You'll have to rebuild it with the 3.5/2.0 framework. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 19 November 2012 16:50, ifum...@gmail.com wrote: I have class project that i use everywhere but some of the projects that are using it as a project reference will not compile anymore. Project is sba.common Says ‘common’ is not a member of ‘sba’ When i look at the build log..i can see that it is trying to use framework 4 when all the projects i am using are set to 3.5 frameworkanyone see anything obvious? C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3258: The primary reference C:\Common.dll could not be resolved because it has an indirect dependency on the .NET Framework assembly System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a which has a higher version 4.0.0.0 than the version 2.0.0.0 in the current target framework. CoreCompile: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Vbc.exe /noconfig /baseaddress:1100 /imports:Mic Anthony
Re: [OT] sql convert datetime problem; forcing order of AND statements
This works for me, but I don't truly know if it is still really dependent upon evaluation order, although I'd hope not. Note the Where IsDate clause is not needed if you want to consider non-date values as NULLs. With sub AS (SELECT Value AS Text, CASE WHEN IsDate(Value)=1 THEN CONVERT(DATETIME, Value, 6) ELSE NULL END AS Value FROM DatesTest -- WHERE IsDate([Value])=1 ) select * from sub where sub.Value GETDATE() -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 7 November 2012 20:26, Wallace Turner wallacetur...@gmail.com wrote: Thank you for responding; what I'm taking away from what you said is: Always go the sub query if there's a convert and not all the input data is valid for it. Perhaps you can edumacate me: I'm trying the following query but *still* getting the conversion error: select * from ( SELECT Value from DatesTest WHERE IsDate([Value])=1 ) sub where CONVERT(DATETIME, sub.Value,6) GETDATE() Cheers On 6/11/2012 5:45 PM, Piers Williams wrote: Sorry to see this late, but I think the answers are a bit incomplete. As other have said, you should use a sub query (or cte) to force it in this type of circumstances. Unless you do, the order that the convert and where run are determined by the query plan, so depend on indexes, statistics and so forth. If the optimiser thinks it can exclude more rows using indexes etc... it'll do that first (even if that involves doing the convert) and leave the IsDate to the 'residual predicate' (ie afterwards). That's the problem you are seeing. Your where clauses can be resolved in any order. Actually even your working case can fail too. I've hit this loads of time converting numbers tables to date ranges. Always go the sub query if there's a convert and not all the input data is valid for it. On 29 Oct 2012 15:35, Wallace Turner wallacetur...@gmail.com 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: Now some queries, This one works, note only 6 rows are returned: SELECT Value,CONVERT(DATETIME, [Value],6) from DatesTest WHERE IsDate([Value])=1 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 image/pngimage/png
Re: time did not exist
Yeah, according to Wikipedia WA trialled DST from 3/12/06 to 2009, so these errors start 12 months before and occur again at the end of 2008 for Perth. I've tried the same test around 30 June and 3 December and found no more issues. Testing end of March/start of April finds only single hours (and no exceptions) in the range of the normal DST changes, including Perth in 2007-09. Similarly for norther hemisphere time zones in late September/early October. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 8 November 2012 18:49, Ian Thomas il.tho...@iinet.net.au wrote: Was 2005 through 2008 when WA experimented with DST again? (Still a bug, but this could be a reason.) Possibly – it has been a fraught issue (typical WA parochialism, a characteristic which the natives have become proud to espouse) Check out Wikipediahttp://en.wikipedia.org/wiki/Daylight_saving_in_Australiaon Australian daylight saving – it does give an idea of the history from 1970s until now. ** ** -- **Ian Thomas** Victoria Park, Western Australia **
Re: time did not exist
Further: (TimeZoneInfo:ConvertTimeFromUtc (DateTime. 2008 12 31 13 15 0) wstTimezone) 31/12/2008 10:15:00 PM (TimeZoneInfo:ConvertTimeFromUtc (DateTime. 2008 12 31 14 15 0) wstTimezone) 31/12/2008 11:15:00 PM (TimeZoneInfo:ConvertTimeFromUtc (DateTime. 2008 12 31 15 15 0) wstTimezone) 1/1/2009 12:15:00 AM (TimeZoneInfo:ConvertTimeFromUtc (DateTime. 2008 12 31 16 15 0) wstTimezone) 1/1/2009 12:15:00 AM (TimeZoneInfo:ConvertTimeFromUtc (DateTime. 2008 12 31 17 15 0) wstTimezone) 1/1/2009 1:15:00 AM (TimeZoneInfo:ConvertTimeFromUtc (DateTime. 2008 12 31 18 15 0) wstTimezone) 1/1/2009 2:15:00 AM But (wstTimezone.IsAmbiguousTime (DateTime. 2009 1 1 12 15 0)) False (wstTimezone.IsAmbiguousTime (DateTime. 2008 12 31 15 15 0)) False (wstTimezone.IsAmbiguousTime (DateTime. 2008 12 31 16 15 0)) False (I didn't look up the documentation to confirm whether IsAmbiguousTime should work with Utc or Local, but neither are showing true, and yet 1/1/09 12:15 AM local is ambiguous as above.) The UTC - Local - UTC round trip is wrong by an hour between 31/12/08 5 PM and 11:59:59 PM (UTC), with the two hours before that generating times (Local 1/1/09 Midnight to 1AM twice) that are Invalid for return to UTC. So as well as not existing between 1/1/09 Midnight to 1AM, WA was out of phase by an hour until Midnight UTC! On 8 November 2012 12:56, Mark Hurd markeh...@gmail.com wrote: In this case you've found an hour where WA didn't exist according to Microsoft's TimeZone data: In DotLisp, with wadate as your date and wstTimezone as you've retrieved it: (wstTimezone.GetUtcOffset (.AddMinutes wadate 60)) 09:00:00 (wstTimezone.GetUtcOffset (.AddMinutes wadate -1)) 09:00:00 (TimeZoneInfo:ConvertTimeToUtc (.AddMinutes wadate -1)wstTimezone) 31/12/2008 2:59:00 PM (TimeZoneInfo:ConvertTimeToUtc (.AddMinutes wadate 60)wstTimezone) 31/12/2008 4:00:00 PM All the local times in between are invalid. Drop a note at Connect. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 8 November 2012 10:44, Wallace Turner wallacetur...@gmail.com wrote: This question is similar to [this][1] stackoverflow question insofar as the Exception thrown is clear and explicit: I'm converting the 1st Jan 2009 (perth time) to UTC and getting *System.ArgumentException: The supplied DateTime represents an invalid time* [TestMethod]public void TestMethod1(){ var date = DateTime.Parse(1-Jan-2009 00:00); var wstTimezone = TimeZoneInfo.FindSystemTimeZoneById(W. Australia Standard Time); Trace.WriteLine(wstTimezone.IsInvalidTime(date));//is invalid Trace.WriteLine(TimeZoneInfo.ConvertTime(date, wstTimezone, TimeZoneInfo.FindSystemTimeZoneById(UTC)));//throw Exception} 1) I'm more curious than concerned - *Can anyone out here in the west recall why this time might be invalid?* One hour either side of this works ok; I can't recall daylight savings moving/changing during this period. 2) In general, how are people handling cases like this? For example, if you have a user who wants to select all the foos from 1st Jan 2009 onwards then you would naturally get the start time in the users timezone (1-Jan-2009 00:00) and convert to UTC - this is especially problematic if you only allow the user to select the start and end date (no times) which means you'd have to ask the user to select a different date completely because 'midnight didnt exist in your timezone on the selected date' Hope I'm making sense Wal [1]: http://stackoverflow.com/questions/2416439/exception-calling-when-timezoneinfo-converttimetoutc-for-certain-datetime-values -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Greetings
On 11 October 2012 13:38, Marvin Hunkin startrekc...@gmail.com wrote: hi. using vb 2010, win forms. and using a screen reader, jaws for windows from http://www.freedomscientific.com. okay, going to past the form code from the first form, frmMain. okay. Marvin. code snipped And your question is? -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Windows 8 and the Start Button
And the Ubuntu 12.04 upgrade has caused problems itself... -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 4 October 2012 16:54, noonie neale.n...@gmail.com wrote: Not yet... but getting closer. It is sad that it's taken too long :-( On Oct 4, 2012 4:50 PM, David Richards ausdot...@davidsuniverse.com wrote: On 4 October 2012 15:51, Stephen Price step...@perthprojects.com wrote: Eventually, they won't have a choice. :) Linux *awkward silence* David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama
Re: VNC over wireless vs cabled
On 20 September 2012 21:45, Greg Low (GregLow.com) g...@greglow.com wrote: Hi Ian, Yes, I came to Tight VNC by looking at VLC Media Player. It really feels like it shouldn’t be rocket science to try to do this. It seems insane to send your screen images out to the cloud and then back in to ten other machines in the same room, that are on the same network. There has to be a simpler way. Assuming what you describe works, can you install what ever is reflecting the packets back from the cloud on your own machine? I'd guess your problem is that the wired connection is sending all packets it sees where as the wireless connection is only sending packets it knows the receiver wants. I.e. you need to get multicast packets to be delivered wirelessly... 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 -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Users who compulsively highlight or click text as they read it -are you out there?
I'd like to add that, while I'm not afflicted with the condition under discussion, I have disabled the Wikipedia options to edit text on double click because when I do want to just select and copy text, too often did I miss-double-click and start editing when I didn't want to. And if I recall correctly, that was only with headings that were available for double-click to edit. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Very simple LINQ query
For completeness, the VB.NET If is lazily evaluated too (but not the old IIf). -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 28 March 2012 21:38, Michael Minutillo michael.minuti...@gmail.com wrote: Yeah. In C# the expressions are lazily evaluated as well so you won't get an Admin created unless the query returns no result. Michael M. Minutillo Indiscriminate Information Sponge http://codermike.com On Wed, Mar 28, 2012 at 6:10 PM, Mark Hurd markeh...@gmail.com wrote: On 28 March 2012 19:16, Peter Maddin petermad...@iinet.net.au wrote: Great! Thanks every one for their suggestions This works well snip var individual = query.FirstOrDefault(); if(individual == null) individual = new Admin(); All of your samples have this. In VB.NET there is the two-valued If statement that can simplify this to Dim individual = If(query.FirstOrDefault, New Admin()) I believe the C# equivalent is var individual = query.FirstOrDefault()??(new Admin()); -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: redirect trace to textbox performance
On 23 February 2012 17:17, ifum...@gmail.com wrote: I have been redirecting the trace.writeline output to a textbox in most of my applications. Its works great and helps me resolve issues very quickly but i find it can decrease the performance of the application dramatically. Anyone suggest the better way do this? I am aware of log4net etc but interested in other people suggestions/opinions. I use a sub like this to make it thread safe Private Sub objTraceListener_TextChanged(ByVal sText As String) Handles objTraceListener.TextChanged I haven't actually looked it up to confirm, but I guess the TextChanged event is actually (sender As Object, sText As String) and the infrastructure used to allow alternative event signatures seems a bit interesting. Whether it is actually a performance issue though, I don't know -- profile it. snip Anthony -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: GetMethod disambiguate
I haven't looked recently (i.e. with .NET 4.0) but the last I heard was the Refection API was not really up to date with generics and you're probably better off getting all the relevant methods (with GetMethods) and analysing them yourself :-( On 7 January 2012 10:50, Greg Keogh g...@mira.net wrote: Folks, I’m using reflection to get a method of an object, but there are two methods that look like this: Foo.CreateObject(); Foo.CreateObjectT(); I can’t figure out how to call GetMethod(???) to get the first one. Anyone know off the top of their head?! Greg -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Setting DOS environment variables
Environment variables *should* be inherited from the creating process to the child process, though I believe the Win32API makes that optional. Once the child process is created it has its own environment variables that can be adjusted internally (and SET is a built-in from CMD for that reason), but are not generally able to be changed by external processes. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 26 October 2011 10:28, Greg Keogh g...@mira.net wrote: Chaps, I think I’ll abandon this experiment again. I’m not happy with the way the new function stuffs your values into the HKCU or HKLM hives and the values are not instantly available to the caller. I just wanted to knock up a bit of code which did the same thing as the SET command, but it doesn’t seem possible. Perhaps I could cheat and look inside the SET command and set what API calls it’s making. I’ll bet it’s just manipulating some secret collection. Where is the SET command binary image? Can anyone disassemble it? – Greg
Re: Name of process
And just emphasising the answer to the question asked: the process is interpolation. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 14 October 2011 17:32, Ian Thomas il.tho...@iinet.net.au wrote: Not the answer you want – just to point out that this is a not-uncommon requirement, and software tools exist. This is a simple problem for any GIS software: interpolation on an existing shape, or constructing a shape with a defined number of points equi-spaced. Of course, the maths behind the user interface (tools) is rigorous, and yes splines are used because most often the shape or curve is irregular. A very capable product is manifold GIS, which is .NET-codeable (or, can use VBA scripting). It is quite cheap (www.manifold.net ). There is a very good user fraternity. I use it - But I’m not offering to generate the results you want. Ian Thomas Victoria Park, Western Australia From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Boccabella Sent: Friday, October 14, 2011 2:29 PM To: 'ozDotNet' Subject: Name of process Hi there I am trying to find the name of a process so I can then look for coding example on google to do it. Unfortunately it will be in VB6. Imagine. You have an irregular shaped circle with 400 points on the circumference. Each point is represented numerically as the radius from the center to that point. Now - you need to give this to a system that requires 1000 point, so you need to 'generate' additional points that would lie on the circumference if the original circle was plotted with 1000 instead of 400. I think the term is interpolating with bsplines but I am not sure. The company I work for manufactures lenses for specticles and some of the equipment will trace the shape of a lens using 400, 100, or 1000 points. And other machines that cut the lenses want 1000 points. So I need to convert the 400 point traces to 1000 ones. Many thanks for any advice Dave David J. Boccabella Proprietor Anubis Systems Phone: 0433 808 525 Fax: 3200 0085 Email: davidboccabe...@anubis-systems.com This e-mail and it's contents is confidential to Anubis Systems. It's wrong, and in a .sig :-( This e-mail, any attachments, or any part of can not be reproduced without the express written permission of Anubis Systems
Re: XMLSerializer error
IIRC these are because the XmlSerializer generates the C# code required for the serialisation and compiles it on the fly and the file not found errors are signals to it that this has not yet been done. There may be a fix whereby you ensure the serializer IS pre-compiled. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 12 October 2011 14:47, Ian Thomas il.tho...@iinet.net.au wrote: I have a class called root, which describes an XML data structure that I read from a disk file into a stream. All works OK, but this line Dim xSerializer As New XmlSerializer(GetType(root)) produces two consecutive System.IO.FileNotFoundException errors. This doesn’t cause any problems at all, but I’m interested in why this occurs and what the fix is. Ian Thomas Victoria Park, Western Australia
Re: Simple or hard solution
Note that if this were possible, Anthony Mayan's request to display all arguments to a function would be possible, because reflection can give you the argument names, as was mentioned. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 29 September 2011 17:01, djones...@gmail.com wrote: Hello Spring iexpression will do this for you, So would lua. .Net 4 and use the dlr to use a language that supports it. However, you will be complicating your life. Are there valid reasons for doing this or is it just a way to get around a huge switch case statement. I've spent the last 2 weeks trying to unravel a spring implementation of dynamic code injection. From the original spec I can see no reason for doing it this way, except to not write 5 class implementations. I've given up trying to remove the code, it's too complex to do without rewriting the underlying algorithm. .02€ Davy --Original Message-- From: Anthony Mayan Sender: ozdotnet-boun...@ozdotnet.com To: ozDotNet ReplyTo: ozDotNet Subject: Simple or hard solution Sent: 29 Sep 2011 07:42 I have a function sub SayHello(word as string) Dim x as string=word trace.write(word) ''works fine of course trace.write(eval(x)) 'is this possible?? or how can i make this possible end sub When all you have is a hammer, every problem looks like a nail. I feel much the same way about xml
Re: Get Method Argument values?
Yeah, I got that far and also noticed you could get the location of the locals, but I didn't have time to determine what you'd need to do to locate the parameter values from that. I'd guess there is an external (outside .NET) debugging API that'll do it more simply, though it'd probably rely on the .PDB being present. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 28 September 2011 02:04, Anthony Mayan ifum...@gmail.com wrote: thanks Billl...did some more research and appear to have to implement Aspect Oriented Programming using .NET which i never knew existed...mm...something to learn when i have time. On 9/28/11, Bill McCarthy bill.mccarthy.li...@live.com.au wrote: Wouldn't your code have to be in the method anyway ? BTW: the code for adding the , will probably add a , where not appropriate and your making unneeded calls to GetParameters() etc. Change to For i as Integer= 0 .. If i 0 Then key = , Cleaned up a little: Dim method As MethodBase = MethodBase.GetCurrentMethod() Dim params = method.GetParameters Dim key As String = method.Name ( For i As Integer = 0 To params.Length - 1 If i 0 Then key = , Dim ptype = params(i).ParameterType key = If(ptype.IsByRef, ByRef , ) params(i).Name As params(i).ParameterType.ToString.TrimEnd(c) Next key = ) Still doesn't answer your question though. I'm not sure you can as it would be interception so you won't get that via reflection, although you could probably look in the stack to get the values . |-Original Message- |From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet- |boun...@ozdotnet.com] On Behalf Of Anthony Mayan |Sent: Tuesday, 27 September 2011 11:40 PM |To: ozDotNet |Subject: Get Method Argument values? | |Using the below cod to retrieve the argument names of the current method |which works fine..how would would i get the values? | | Dim method As MethodBase = MethodBase.GetCurrentMethod() | Dim key As String = method.Name ( | For i As Integer = 0 To method.GetParameters().Length - 1 | key = DirectCast(method.GetParameters().GetValue(i), |System.Reflection.ParameterInfo).Name | If i method.GetParameters().Length - 1 Then | key = , | End If | Next | key = ) | | |thanks in advance
Re: [OT] Security clearance for work in Canberra
I agree with Tony. Your future employer will always get you clearance confirmed. There is no point initiating it your self. Of course you'll save everyone a lot of hassle if you report in your resume anything that may be a red flag. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 26 September 2011 21:35, Tony Wright ton...@tpg.com.au wrote: It would be seen as irrelevant. No agency would rely on an outside obtained security clearance. What a massive hole in security that would be! They won’t care about the cost of a security clearance if they think they have the right person. T. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Tom Rutter Sent: Monday, 26 September 2011 10:33 AM To: ozDotNet Subject: [OT] Security clearance for work in Canberra Gday, Moving to Canberra in a few months and I hear getting a security clearance would help find jobs in the government. Any advice on the process for this? Is it possible to secure a claerance on my own? Costs? How? No luck with my Googling skills yet Cheers Tom
Re: Assembly binding woes
Can't help, but that sounds like a well enough explained problem for stackoverflow.com. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 19 September 2011 15:57, Matt Siebert mlsieb...@gmail.com wrote: Hi all, I have some assembly binding weirdness happening that I don't fully understand. I have some theories but I'd like to understand it a bit better. I have a solution with two primary entry points: 1. A .NET 4.0 WPF application 2. A .NET 3.5 class library that is loaded as a plugin for a 3rd party application Both of these assemblies have a dependency on Autofac, but the .NET 3.5 class library uses Autofac for .NET 3.5 while the .NET 4.0 WPF app uses Autofac for .NET 4.0. Obviously, when sending build output to the same folder one Autofac.dll overwrites the other so I've added post-build commands to move Autofac to relevant sub-folders (NET35 and NET40). For the WPF app I've added an app.config file with a probing privatePath=NET40 / element which correctly resolves the dependency. For the .NET 3.5 DLL it's a little trickier. I can't add a probing / element since it would need to go in the 3rd party host app's config file, and the path would be outside the host's appbase path. Instead, my DLL provides an AssemblyResolve event handler that finds and loads the DLL. This all works fine. The plugin DLL described so far, let's call it Lib1.dll, implements a type, say DerivedType, that is inherited from BaseType in Lib2.dll. DerivedType overrides a method with a ContainerBuilder parameter so it can add registrations to the container. The sequence of events is as follows: 1. Host app loads Lib1.dll and calls DerivedType.Startup 2. DerivedType.Startup calls BaseType.Startup 3. BaseType subscribes to AssemblyResolve and calls SomeMethod that directly uses a ContainerBuilder 4. The AssemblyResolve handler finds and loads Autofac.dll 5. BaseType.SomeMethod executes and calls SomeVirtualMethod(ContainerBuilder builder) DerivedType in Lib1.dll overrides SomeVirtualMethod but this doesn't get called, however, BaseType.SomeVirtualMethod does execute. This seems consistent with the dependency being loaded into the LoadFrom context and therefore not being used to resolve dependencies of Load context assemblies, but the code is using Assembly.Load(), not LoadFrom(). I'm not sure if I've explained this very well, but hopefully somebody can shed some light on why this is happening? Cheers.
Re: [OT] SMS Gateways
Be careful with SMS Global: http://www.google.com.au/search?q=SMS+Global+ACCC http://www.austlii.edu.au/au/cases/cth/FCA/2011/855.html -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 10 August 2011 07:12, Kirsten Greed kirst...@jobtalk.com.au wrote: Thanks Paul Glen, I am checking out their trial now. Kirsten From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Paul Evrat Sent: Wednesday, 10 August 2011 6:06 AM To: ozDotNet Subject: Re: [OT] SMS Gateways Kirsten, I have been using SMS Global and have had no real trouble. www.smsglobal.com.au . Easy to use and reliable. There are lots of options if you Google and volume and price considerations can become the basis for chosing. Regards .. Paul Evrat. From: Kirsten Greed kirst...@jobtalk.com.au Sender: ozdotnet-boun...@ozdotnet.com Date: Wed, 10 Aug 2011 05:52:41 +1000 To: 'ozDotNet'ozdotnet@ozdotnet.com ReplyTo: ozDotNet ozdotnet@ozdotnet.com Subject: [OT] SMS Gateways Hi All Can anyone recommend an SMS Gateway, so that I can write apps that send text messages? Thanks Kirsten
Re: ASP.NET ItemCommand before PreInit
On 29 July 2011 10:53, Greg Keogh g...@mira.net wrote: Folks, I ran into an unexpected trap in the ASP.NET page lifecycle last night. I wonder if others have hit this problem and have a better workaround. To protect against crashes due to session timeouts or IIS restarts I usually have something like this in the PreInit event of a common base page for all of my aspx pages: Could this be your issue: How have you defined the common base page? If it is a Master page, the event ordering is interesting. snip I was just surprised and tricked by the sequence of processing. Greg -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Set property of texbox by name
On 28 July 2011 11:24, DotNet Dude adotnetd...@gmail.com wrote: On Tue, Jul 26, 2011 at 11:59 PM, Les Hughes l...@datarev.com.au wrote: James Chapman-Smith wrote: Hi David, What do you mean by incredibly slow? How many buttons are we talking about? I just did a test with 1000 buttons and it took 3.47 milliseconds. With 5000 buttons it was 16.78 milliseconds. Did I miss something? Cheers. James. I'm with you James. I usually do something like (psuedoish) snip if (b.Name.ToString().ToLower().Trim() = foo) b.Text = bar; IMO 1) ToSring is unnecessary 2) Trim is unnecessary 3) Use String.Compare rather than ToLower and then equality compare I agree with all those points, but if you /are/ using the .ToLower-like comparison, you should use .ToUpperInvariant, because it caters for more special cases. snip -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [ot] Junior dotnet/web programmer required to start yesterday!
On 18 July 2011 16:05, ifumust ifum...@gmail.com wrote: On 18/07/2011 8:59 AM, Scott Barnes wrote: urgent Jnr Developer wanted = Can't afford Snr Developer Pay. Spidey senses tell me this is a classic case of McDonalds Cook vs Jnr Developer equation. My money would be McDonalds ;) work less hours for the same pay :D --- Regards, Scott Barnes http://www.riagenic.com On Fri, Jul 15, 2011 at 9:14 PM, David Connors da...@codify.com wrote: On Fri, Jul 15, 2011 at 6:46 PM, Michael Ridland rid...@gmail.com wrote: What a great opportunity. I would love an opportunity to work in someone's backyard and have my main job priority being able to meet deadlines. I'm sure those deadlines were set by someone very experienced at software estimation and are very realistic. Can we ban this spammer please? As per Les' comments - job ads/request for offers are fine so long as you're not some mindless recruiter dumping CVs into the list. We're here to help each other and that includes finding jobs and filling jobs (even if the pay and conditions are not what you want). There is no point in starting a ban war anyway because anyone can join ozdotnet and I don't moderate or vet new members. David. PS: fwiw, I agree that smallbizaustra...@gmail.com DOES sound like some sort of MLM/work from home blah spam address ... but the market will sort that out. -- David Connors | da...@codify.com | www.codify.com Software Engineer Codify Pty Ltd Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417 189 363 V-Card: https://www.codify.com/cards/davidconnors Address Info: https://www.codify.com/contact i think i got more comments from the dotnet list then actual applicantsdidn't know it was such a sensitive issue! lolits all good..i now have someone if any was interested. Yes..we do pay peanuts...but we only want monkeys! Anthony At least you're honest. Hopefully your prospective applicant saw this whole discussion :-) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: TestQuest
I assume you've used ProcessMonitor or FileMonitor to determine that. When you don't mind devenv crashing, try finding the handle in ProcessExplorer and closing it. See if any resulting error helps tell you who/what is writing to the file. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 12 July 2011 01:08, Stephen Price step...@littlevoices.com wrote: Yeah, I wondered so did a full scan. Its a work machine and it uses Trend. It might be something installed as part of the image, but I doubt that as I installed Visual Studio myself. Virus scan found nothing. Its got to be an add in or Visual studio itself as SysInternals is showing devenv.exe as the process opening the file. I'll keep looking, its suspicious when you can't identify something like this. I might just be paranoid. Why? Who's asking? ;) thanks Stephen On Mon, Jul 11, 2011 at 9:11 PM, Peter Maddin petermad...@iinet.net.au wrote: I just checked. I don’t have a file like that. Probably wrong but I checked the sil extension. Not too many Google hits. Silhouette Designer - CAD/CAM for designing clothes. Does not seem you. Also got a hit on SmartInspect (http://www.gurock.com/smartinspect/). Ever tried that? Maybe time for full virus/malware sweep. Regards Peter From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Stephen Price Sent: Monday, 11 July 2011 4:33 PM To: ozDotNet Subject: TestQuest I've got Visual Studio constantly writing to a file in my temp folder called ..\AppData\Local\Temp\TestQuest-2011-07-11-08-28-37.sil I've done a search for it, no idea what it's for. I've disabled all of my plugins and addins in case its one of them, but it's still doing it. my Devenv.exe task is just sitting at 13% when its doing it and everything grinds to a halt while its doing its thing. Very annoying. I've rebooted and still no luck stopping it. Anyone else actually have this file in their Temp folder? Know what it is? The contents of the file is a heap of nulls, etx, eot, my machine name, with a header of SILF. Also some what looks like calls to AutoMainDTE2010CodeView.get_CurrentFileNameMyMACHINENAME It's cramping my style. cheers, Stephen
Re: [OT] Software ownership (was BYO Computer @ Suncorp)
I don't recall were I got this from (perhaps it was once explicitly in an employment agreement and I've assumed it was general) but I was under the impression that ALL employee's coding (at work or home and I am referring to employees, not contractors) is owned by the employer (or at least has first rights to it). This is why open source development on work or /own/ time is an issue. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] ozdotnet own posts
BTW Although the ozdotnet post acknowledgement does arrive, it has the wrong timestamp, and this is also the case for the Ping list acknowledgement, so I don't think it is a list-specific configuration issue. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 19 June 2011 12:26, Mark Hurd markeh...@gmail.com wrote: I've just tested on the Ping list with a non-Gmail account and both settings for own posts worked as expected. It /is/ Gmail doing its thing here. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 17 June 2011 08:38, David Connors da...@codify.com wrote: On Fri, Jun 17, 2011 at 7:08 AM, Greg Kennedy gkenne...@gmail.com wrote: I've always assumed that gmail was responsible for not showing your own emails. As far as I know that feature of mailman has never worked. You SHOULD get an acknowledgement of your post though - and the fact that feature works meant I never investigated why you don't get a copy of your own. I might see if there is a new version of mailman when I get a chance. -- David Connors | da...@codify.com | www.codify.com Software Engineer Codify Pty Ltd Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417 189 363 V-Card: https://www.codify.com/cards/davidconnors Address Info: https://www.codify.com/contact
Re: [OT] ozdotnet own posts
I've just tested on the Ping list with a non-Gmail account and both settings for own posts worked as expected. It /is/ Gmail doing its thing here. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 17 June 2011 08:38, David Connors da...@codify.com wrote: On Fri, Jun 17, 2011 at 7:08 AM, Greg Kennedy gkenne...@gmail.com wrote: I've always assumed that gmail was responsible for not showing your own emails. As far as I know that feature of mailman has never worked. You SHOULD get an acknowledgement of your post though - and the fact that feature works meant I never investigated why you don't get a copy of your own. I might see if there is a new version of mailman when I get a chance. -- David Connors | da...@codify.com | www.codify.com Software Engineer Codify Pty Ltd Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417 189 363 V-Card: https://www.codify.com/cards/davidconnors Address Info: https://www.codify.com/contact
Re: unit testing gone mad
I wouldn't be writing these tests just for themselves, but they do check if someone attempts to change the base class without knowing what is going on. Similarly for the member tests. If these were perhaps created automatically, that would be OK, just. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 6 June 2011 12:02, Tristan Reeves tree...@gmail.com wrote: ClassForUseInheritsBaseClass On Mon, Jun 6, 2011 at 6:22 AM, Heinrich Breedt heinrichbre...@gmail.com wrote: Just wondering, what is the name of the test? On Jun 5, 2011 5:06 PM, Tristan Reeves tree...@gmail.com wrote: Hi list, I'll describe the situation in as little detail as possible. There's some code in which a class BaseClass, and a class ClassForUse : BaseClass are defined. BaseClass is used in a unit test that calls its constructor with mocks. ClassForUse is used in production with a 0-param constructor which calls the base constructor with hard-coded arguments. Forgetting (for now) any issues with all this (and to me there are plenty), we then find the following unit test: [Setup] var _instance = new ClassForUse(); [Test] Assert.That(_instance is BaseClass); ...to me this is totally insane. But I seem unable to articulate exactly the nature of the insanity. A little further on we have (pseudocode) [Test] Assert _instance._MemberOne is of type A Assert _instance._MemberTwo is of type B Assert _instance._MemberThree is of type C where the members are (if not for the tests) private members set by the 0-param constructor which pushed them into the base constructor. (all hard coded). So...is this really insane, or is it I who am crazy?? It's made more perplexing to me because the author of this code says it's all a natural result of TDD. And I am far from a TDD expert. I would love some feedback about this Modus Operandi. esp. any refs. It seems obviously wrong, and yet I am unable to come up with any definitive argument. Thanks, Tristan.
Re: SQLite bulk insert performance
Isn't that exactly the same as the default mode for SQL Server? On 29 May 2011 12:52, Joseph Cooney joseph.coo...@gmail.com wrote: I wouldn't bother e-mailing the SQLite folks. This is by design, and is a well known behaviour with SQLite. From memory if you don't explicitly have a transaction then one gets created for each operation, which slows things down. Joseph On Sun, May 29, 2011 at 10:27 AM, Greg Keogh g...@mira.net wrote: Here’s a serious heads-up for you: Last night I was bulk migrating about 20 rows from my old SQL Express database into my new SQLite one. I wondered why it took about 10 minutes to insert 1000 rows into one table, and when it got to the 6 row table I was curious about how long that would take. So I left the machine running while we met friends for dinner at a Turkish restaurant. Four hours later it’s still running the same step. I noticed that a journal file was flickering madly in Windows Explorer, so I guessed it was some transactional problem. My code is plain ADO.NET like this: using (SQLiteCommand ...) { using (SQLiteCommand ...) { for (...) { ExecNonQuery(... INSERT ...) } } } This morning a few web searches hinted that I had to use PRAGMA synchronous = OFF. That’s too weird, so I put a using DbTransaction around the bulk inserts and now the whole migrations runs in 10 seconds. I’m going to cc a copy of this post to the authors of SQLite, as this is a shocking gotcha. I’m utterly gobsmacked by the poor performance of the inserts without a transaction around them. Greg -- w: http://jcooney.net t: @josephcooney -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Non Standard Column Names
I'm not on SQLDownUnder, but is the problem that [Test ID] is an autoincrement column and so is not included in the Inserted columns? -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 4 May 2011 12:18, Anthony asale...@tpg.com.au wrote: Oops..wrong group..sorry From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Anthony Sent: Wednesday, 4 May 2011 12:16 PM To: 'ozDotNet' Subject: Non Standard Column Names alter TRIGGER [dbo].[trgTest] ON dbo.vwTest INSTEAD OF UPDATE AS BEGIN SET NOCOUNT ON --I cannot chnage field names..yes...very bad field names! UPDATE Debt SET [Print Filecover?]=Ins.[Print Filecover?] FROM Debt INNER JOIN inserted AS Ins ON Debt.[Test ID] = Ins.[Test ID] END Anyone explain why i get error Invalid column name 'Test ID'.
Re: Is it possible to override a class?
I've got the free CodeRush Xpress (from DevExpress) installed so I don't know for sure it isn't helping, but from the Object Browser (and from Class View for your own objects) I can right click on any class and choose Find All References. This lists every reference in a Find Symbol Results view (which does have some idiosyncrasies -- like not including the references in any well defined order I can see). If you double click on the reference in this view the actual class name reference is selected in the code. Then you could just paste the new name. And/or you can use searchreplace if you feal safe to do so and do the Find All References after to check they've all been changed, as you suggest. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 29 April 2011 16:42, Wallace Turner wallacetur...@gmail.com wrote: Just a word of warning, that search does not find class members so it will miss: private Button _button = new Button(); however when using the designer they are initialized inside a method so R# will find them. You can do a different search to find any expression that is 'new Button()' but it returns duplicate results(msg me if you want to know how) If I was going to do what you're doing I *would* use Find/Replace that comes with Visual Studio and then use r# to check whether I missed any. On 29/04/2011 3:01 PM, Anthony wrote: That excites me J thanks Wallace! *From:* ozdotnet-boun...@ozdotnet.com [ mailto:ozdotnet-boun...@ozdotnet.com ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Wallace Turner *Sent:* Friday, 29 April 2011 4:12 PM *To:* ozDotNet *Subject:* Re: Is it possible to override a class? The find/replace method is OK but Resharper can go one better. Consider these three instantiations ofButton _button1 = new System.Windows.Forms.Button(); _button2 = new Button(); _button3 = new DumbAlias.Button(); So its likely you'll find all instances declared like _button1. If you remember you'll look for instances like _button2. It's likely you'll miss _button3. Use Resharper to find them all in one go. Resharper - Find - Search With Pattern Then enter the following pattern Click Find and you should see Now if that doesn't excite you what does ?!
Re: Is it possible to override a class?
On 29 April 2011 13:43, ben.robb...@jlta.com.au wrote: Actually in this scenario I'd just do a search and replace too. However Resharper can help here and what I typically do in this situation is select a usage of the class I want to replace (e.g. Button) and use the find usages feature to find all instances and I can see how the class is used, then use search and replace to change to the new class (Button - MyButton), then refresh the find usages to ensure I got them all. Of course that much is available in the basic Visual Studio. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Raising property changed events
I believe it was in this mailing list that we previously confirmed using GetCurrentMethod, even when included in convoluted ways, guarantees the method will not be inlined. Can you show an example where GetCurrentMethod does not return the expected method? -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 23 March 2011 14:27, David Kean david.k...@microsoft.com wrote: Below is not guaranteed to work, if we inline the set, GetCurrentMethod will return the wrong method. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Burela Sent: Tuesday, March 22, 2011 7:57 PM To: ozDotNet Subject: Raising property changed events Raising property changed events seems like something that most applications need to do at some stage. C#3 introduced the auto property i.e. public bool IsBusy { get; set; } I am surprised that there isn't a way built into the framework to automatically raise changed events Anyway, i saw this code used at a client site. it seems like a smart way to handle the raised event without using fragile strings that might not get updated when you change the property name private bool isBusy; public bool IsBusy { get { return isBusy; } set { isDialogProcessing = value; RaisePropertyChanged(System.Reflection.MethodBase.GetCurrentMethod().Name.Substring(4)); } } Thought I'd throw it out there. See how other people are handling property changed events in their own projects. I'm sure there is an AOP way of introducing them. But all the AOP demos I have watched seem to increase compilation times by heaps. -David Burela
Re: Raising property changed events
On 23 March 2011 15:00, Mark Hurd markeh...@gmail.com wrote: I believe it was in this mailing list that we previously confirmed using GetCurrentMethod, even when included in convoluted ways, guarantees the method will not be inlined. Gmail says GetCurrentMethod has /not/ been mentioned before on this mailing list since I've been part of it, so I'm remembering that wrong. Can you show an example where GetCurrentMethod does not return the expected method? This request still stands however. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: IE9 RTW
And it is not on XP, so not available to me. I assume it's not available for server 2k3 but I haven't checked yet. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Rethrowing exceptions
IIRC in the Reflector output of the Framework there are a number of similar constructs. Some can be explained (such as the ones in the Microsoft.VisualBasic namespace) where they explicitly WANT to lose the extra history so the exception looks like it is local to the VB routine and not from something deeper in the framework. But there are other versions of this construct, including with just Throw, where I cannot confirm the reason. Of course, the shared source may explain it it due to logging and other code being commented out in the live build. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 11 March 2011 08:57, Noon Silk noonsli...@gmail.com wrote: You did not mean to send this only to me, I'm sure :P Anyway, the point is that you can log something and then throw it up the chain for someone else to deal with. It's appropriate to log errors, but just because you log doesn't mean you can actually do anything better than crash (upwards). I think it should also be purely throw; as I believe throw ex loses some history. On Fri, Mar 11, 2011 at 9:24 AM, Arjang Assadi arjang.ass...@gmail.com wrote: What is the point of catching and throwing the same exception e.g. : catch (Exception ex) { throw ex; } ? Thank you in advance Regards Arjang -- Noon Silk
POP3 Service
We were almost ready to switch from our current server 2003 system to a server 2008 system and my last task was to install the POP3 service and apply the scripts we were using with 2003 to shift a range of incoming address to one account. With a day to go I got around to trying to get this done and I find Microsoft, in their infinite wisdom, dropped the POP3 service from Server 2008! So we're looking for options (the switchover has now been postponed a week), and, seeing as we do have specific needs, I thought I'd at least look into the state of the art VB.NET freeware POP3 Servers, hoping one would already integrate with the Microsoft SMTP Service. However I'm having trouble finding any .NET source code for POP3 servers: I have seen http://sourceforge.net/projects/cses/ but have yet to look at it. Are there any VB.NET POP3 Servers? -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: POP3 Service
Scratch cses it has no POP3 implementation. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 11 March 2011 16:56, Mark Hurd markeh...@gmail.com wrote: We were almost ready to switch from our current server 2003 system to a server 2008 system and my last task was to install the POP3 service and apply the scripts we were using with 2003 to shift a range of incoming address to one account. With a day to go I got around to trying to get this done and I find Microsoft, in their infinite wisdom, dropped the POP3 service from Server 2008! So we're looking for options (the switchover has now been postponed a week), and, seeing as we do have specific needs, I thought I'd at least look into the state of the art VB.NET freeware POP3 Servers, hoping one would already integrate with the Microsoft SMTP Service. However I'm having trouble finding any .NET source code for POP3 servers: I have seen http://sourceforge.net/projects/cses/ but have yet to look at it. Are there any VB.NET POP3 Servers? -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Getting all instances of a type from all assemblies
Using reflection, if your assemblies have been loaded, it is simply enumerating AppDomain.GetCurrentDomain.GetAssemblies, then for each assembly GetTypes, and finally for each type GetInterfaces. (That is off the top of my head without looking up the details.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 23 February 2011 11:21, Paul Jones jonesy_bo...@hotmail.com wrote: G'Day programmers, I've been away from the coding game for a few years now so take it easy on me please. I'm trying to get all implementations of an interface (IStartup) in all of my assemblies (main executable and referenced class libraries) but having no luck doing this dynamically (with no hard coding of type or assembly names). I've attempted to do it manually using classes in System.Reflection but happy to use an IoC container which I imagine is possible for this type of requirement. Any help or hints would be appreciated. Cheers, Paul
Re: Non-standard time zone handling (was Re: Fwd: Red Gate will be charging $35 for .NET Reflector)
OK we're in a situation similar to the StackOverflow question: http://stackoverflow.com/questions/2939188 We have an existing code base that used UTC throughout and just relied on the standard XmlSerialization of DateTime. Then the client noticed their existing clients ignore the UTC of the Xml and assume it is local time, so we needed to switch to their local time, not our server's. (We're not in the position to say their clients are in the wrong.) It seems the correct and supported solution is to refactor all our DateTimes to DateTimeOffsets and write our own XmlSerialization classes because the default doesn't cut it. It was easier to get the server time zone to be the client's local time, then the standard XmlSerialization produces the right results with non-UTC DateTimes. But we didn't want to change our server's time zone to that of the client. However, .NET's time zone is stored in only two places, both of which only allow resetting to unset and setting to the computer's current time zone. I just produced code to setup a time zone that is not the computer's current time zone and place that in the two places. As I said I don't use any other private APIs, just simply allow a ReadOnly property, with a set internal to the get, to receive a value the internal set can't provide itself without us momentarily setting the O/S time zone to the time zone we want to use. And this is a web service (a web site expecting and emitting Xml, but not using SOAP or any other standard) so it is a single install. (We will be moving it to a Win2008 server from a Win2003, but we're expecting to stay with .NET 3.5(2.0).) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 3 February 2011 14:51, David Kean david.k...@microsoft.com wrote: *DO NOT* rely on private implementation details of .NET, we are free to change these in any release (be it hotfix, security update, GDR, service pack or full release). When I'm working on these types, be it fixing a bug or adding features, I don't want to have to (and I don't) worry about what customers I'm going to break by changing things that we never documented or guaranteed. You should also be aware that we don't ship the exactly same changes on all platforms, for example, Windows 7 shipped with a version of .NET 2.0/3.5 that is not available on any other platform, I know we made changes to private implementations on that platform that broke some customers, so who says that you application won't break on other or future OS versions? Let's figure out a way of doing this without needing to rely on updating private fields. What exactly are you trying to do? What are you hitting that requires you to update the CurrentTimeZone? -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Mark Hurd Sent: Wednesday, February 02, 2011 6:09 PM To: ozDotNet Subject: Re: Fwd: Red Gate will be charging $35 for .NET Reflector No, as I said I had to update two private fields. Do you expect the time zone stuff in .NET 2.0(3.5) to be updated in any service packs? In any case it is better than any of the public API solutions I could find that require you to use either UTC or your computer's local time zone. I know DateTimeOffset can be used for other time zones but the XmlSerialization of those is too much work. IF a service pack breaks the two private fields I'm updating we'll review the situation. Of course you could be asking for legal (licensing) reasons and that's a whole 'nother story, cause I believe we're not allowed to reflect the framework, as that would be a form of reverse engineering which is expressly disallowed. I believe the out here is local laws allow it when using it to work in with existing systems, like some client's request to work with their time zone. On 3 February 2011 11:48, David Kean david.k...@microsoft.com wrote: I'm hoping that you did that by calling only public API and not taking a dependency on anything private... -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Mark Hurd Sent: Wednesday, February 02, 2011 5:14 PM To: ozDotNet Subject: Re: Fwd: Red Gate will be charging $35 for .NET Reflector On 3 February 2011 11:22, Arjang Assadi arjang.ass...@gmail.com wrote: Same as Silky said, what is used for? Well I just used it to determine what I would need to do to change the time zone in .NET only, rather than changing the computer's time zone. And seeing as this is a 2.0 project I'm fairly happy with the results (only two private fields updated). I.e. I don't expect any future service packs to completely change the time zone handling. As such I'll probably pay for a new .NET Reflector, but only when the free one gets VB.NET ByRef arguments right. (BTW I don't like mixing top and bottom posting, but I don't have time to fix David's post within mine
Re: Fwd: Red Gate will be charging $35 for .NET Reflector
On 3 February 2011 11:22, Arjang Assadi arjang.ass...@gmail.com wrote: Same as Silky said, what is used for? Well I just used it to determine what I would need to do to change the time zone in .NET only, rather than changing the computer's time zone. And seeing as this is a 2.0 project I'm fairly happy with the results (only two private fields updated). I.e. I don't expect any future service packs to completely change the time zone handling. As such I'll probably pay for a new .NET Reflector, but only when the free one gets VB.NET ByRef arguments right. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Fwd: Red Gate will be charging $35 for .NET Reflector
No, as I said I had to update two private fields. Do you expect the time zone stuff in .NET 2.0(3.5) to be updated in any service packs? In any case it is better than any of the public API solutions I could find that require you to use either UTC or your computer's local time zone. I know DateTimeOffset can be used for other time zones but the XmlSerialization of those is too much work. IF a service pack breaks the two private fields I'm updating we'll review the situation. Of course you could be asking for legal (licensing) reasons and that's a whole 'nother story, cause I believe we're not allowed to reflect the framework, as that would be a form of reverse engineering which is expressly disallowed. I believe the out here is local laws allow it when using it to work in with existing systems, like some client's request to work with their time zone. On 3 February 2011 11:48, David Kean david.k...@microsoft.com wrote: I'm hoping that you did that by calling only public API and not taking a dependency on anything private... -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Mark Hurd Sent: Wednesday, February 02, 2011 5:14 PM To: ozDotNet Subject: Re: Fwd: Red Gate will be charging $35 for .NET Reflector On 3 February 2011 11:22, Arjang Assadi arjang.ass...@gmail.com wrote: Same as Silky said, what is used for? Well I just used it to determine what I would need to do to change the time zone in .NET only, rather than changing the computer's time zone. And seeing as this is a 2.0 project I'm fairly happy with the results (only two private fields updated). I.e. I don't expect any future service packs to completely change the time zone handling. As such I'll probably pay for a new .NET Reflector, but only when the free one gets VB.NET ByRef arguments right. (BTW I don't like mixing top and bottom posting, but I don't have time to fix David's post within mine at the moment.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] VBScript return string runtime error
I've replicated your problem with a simple VB6 class. I'm not sure of the actual cause but your fix is: id = client.SendRequest((request)) because the working client.SendRequest(request) is really client.SendRequest (request) or Call client.SendRequest((request)). The call corresponding to the original id = line Call client.SendRequest(request) or client.SendRequest request fails with TypeMismatch for me. I assume the problem is VBScript only deals with Objects most of the time, and so doesn't like the original accurate type being passed to the (correct) accurate type, but the () returns the object to Object, which it doesn't mind passing anywhere. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 28 November 2010 18:09, Greg Keogh g...@mira.net wrote: I’ve been running experiments for almost two hours solid now, making mock functions and passing different arguments and return types in all combinations I can think of. I’ve cleaned my environment, registered, unregistered, etc. Everything works perfectly in unit tests, only in the VBS file I find this specific failure rule: I cannot get a return value from a method call that has a COM object as an argument. Sadly, I can’t just pass primitive types as the arguments to the function, as it takes far too many and some are collections. I think I’ll give up and have a glass of wine. Greg
Re: [OT] VBScript return string runtime error
On 29 November 2010 21:59, Greg Keogh g...@mira.net wrote: snip I'd been searching for hours and never found any such syntax or clues anywhere. Where did you get that trick? I've known putting brackets around an expression forces ByVal semantics for a long time, but the key point here was the reminder that this is VBScript and not VB.NET, so I knew the silent difference between the working and non-working code. Thanks heaps, Greg -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Setting CMD-window title
On 30 November 2010 11:20, Mark Hurd markeh...@gmail.com wrote: Back in VB6 the App object was available to libraries to use, and so they could adjust App.Title. I never did get around to work out what it did and whether it was possible to replicate in .NET (i.e. allow an assembly to adjust the main application's title). Just confirming: I'm talking normal Windows applications, not a CLI app. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: [OT] System Idle Process Running at 98% and I cant use my PC
Interesting. I thought my computer's blank moments (normally during late startup i.e. during userinit) were 16-bit hardware drivers not allowing co-processing. Perhaps it is just imminent hardware failure for me too. (In my case I think it is the DVD-ROM drive -- I don't use it very much and it occasionally does not appear on the device list, but this doesn't necessarily correspond to when the blank moments occur.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 22 November 2010 17:50, Kirsten Greed kirst...@jobtalk.com.au wrote: Hi David, David Wallace It turns out cloning the drive fixed the problem I am now on a new drive, and thankfully things are working fine Kirsten From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Wallace Turner Sent: Thursday, 18 November 2010 9:35 AM To: ozDotNet Subject: Re: [OT] System Idle Process Running at 98% and I cant use my PC try running ResMon (start - run - resmon.exe) and see if anything looks abnormal. I take it you are not using an SSD... On 18/11/2010 4:45 AM, Kirsten Greed wrote: Hi All Can anyone advise corrective action for a computer that becomes unresponsive? – Seemingly having something to do with the hard drive activity The disk light is on and the disk is whirring Task manager shows no stress on the CPU or memory At regular intervals my computer becomes unresponsive for a minute or so Thanks Kirsten
Re: [OT] System Idle Process Running at 98% and I cant use my PC
On 23 November 2010 19:57, David Connors da...@codify.com wrote: On 23 November 2010 19:20, Mark Hurd markeh...@gmail.com wrote: Interesting. I thought my computer's blank moments (normally during late startup i.e. during userinit) were 16-bit hardware drivers not allowing co-processing. Perhaps it is just imminent hardware failure for me too. You won't have any 16-bit drivers on any version of Windows from NT/Win2K onward. Yeah, that's why I put it in quotes. It was just that whatever causes the stalls does not get reflected in historic TaskManager graphs. (In my case I think it is the DVD-ROM drive -- I don't use it very much and it occasionally does not appear on the device list, but this doesn't necessarily correspond to when the blank moments occur.) If a new DVD-ROM is going to make your life that much better, I'd suggest that is $19 well spent. :) Good point. But the problem doesn't last, hasn't happened for a while and is negligible compared to how long it takes to load my roaming profile anyway :-) -- David Connors | da...@codify.com | www.codify.com Software Engineer Codify Pty Ltd Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417 189 363 V-Card: https://www.codify.com/cards/davidconnors Address Info: https://www.codify.com/contact -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: XML problem reading sub elements
Hopefully you've solved it yourself by now, but you need to use partElem.Elements(stores).Select((e)=e.Value).ToList or something similar. (NB I don't use C# day to day, so I may have that syntactically incorrect, but you should get the idea.) -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Help with Filesystem
If you don't mind using the Microsoft.VisualBasic namespace (and assembly, but not Microsoft.VisualBasic.Compatibility), the FileSystem module is still available to you in C#, with FileOpen, FileClose, FileGet and FilePut, with RecordLength and RecordNumber parameters. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On 17 November 2010 13:11, David Boccabella davidboccabe...@anubis-systems.com wrote: Ok. So it’s a calculate and SEEK I just remember the old (and simple) VB6 system of defining a record and then just using GET and PUT to handle it, and was hoping that there was a ‘modern’ way to do it. Take Care Dave
Re: xml query
Minor optimisations in .net noobie's code: Dim result As String = (From c In doc.Header.From.Credential Where c...@domain = BranchID Select c.Identity.Value).FirstOrDefault() BTW The tag[index] syntax is new to me: it's not valid VB9. Is it just a typo for tag(index), or a new feature in VB10? -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Use of GCHandle.Alloc and Free
On Tue, Oct 12, 2010 at 6:29 PM, Greg Keogh g...@mira.net wrote: Folks, we had a shocking problem today where C# code was listening for events from a VB6 component. The COM classes exposed by the VB6 app are nested and a bit complicated to describe, but a nested class which exposed events was randomly producing the dreaded “COM object that has been separated from its underlying RCW cannot be used”. The random nature of the problem hinted that it was garbage or dispose related. After a bit of suffering I found the following solution (feature and Cursor are COM classes): GCHandle cursorHandle = GCHandle.Alloc(feature.Cursor, GCHandleType.Normal); feature.Cursor.NotifyMoveNext += event handler; feature.ShowModalDialog(...); if (cursorHandle.IsAllocated) { cursorHandle.Free(); feature.Cursor.NotifyMoveNext -= event handler; } It used to randomly die on the removal of the event handler. The Alloc and Free seem to have totally solved the problem. This code seems a bit obscure and arcane, so I was wondering if anyone had comments on it. Perhaps there are better ways. Greg It looks to me simply like you need to hold the reference to feature.Cursor until you remove the event handler. To test this, simply change your code to var cursorHolder = feature.Cursor; feature.Cursor.NotifyMoveNext += event handler; feature.ShowModalDialog(...); feature.Cursor.NotifyMoveNext -= event handler; GC.KeepAlive(cursorHolder); Of course if other things are afoot and sometimes cursorHandle.IsAllocated is False, then the above may not be what you need. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: What is the name of two combobexes that show Classes and it's members on top of the text editor?
I think you're looking for this: http://stackoverflow.com/questions/1194908/visual-studio-keyboard-shortcut-for-method-name-combobox/1239254#1239254 To answer your question, according the above answer, it is called the Navigation Bar. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On Tue, Sep 28, 2010 at 8:36 AM, Arjang Assadi arjang.ass...@gmail.com wrote: Hello all What is the name of two combobexes that show Classes and it's members on top of the text editor? Trying to find the a short cut for qucik browsing around. Regards Arjang
Re: [OT] SQL injection attack vectors
On Wed, Sep 1, 2010 at 2:14 PM, David Connors da...@codify.com wrote: On 1 September 2010 13:47, silky michaelsli...@gmail.com wrote: It's hard to blame the programmers totally for this, as it's almost always a business issue that has lead to the poor implementation (security not being a priority). I don't know that it is fair to say it is 'almost always a business issue'. I don't think it really takes much more time to write a parameterised stored procedure that does not execute SQL versus sticking strings together in a haphazard/dodgy fashion. Developers should step up and take responsibility and pride in the quality of the work they produce IMNSHO. I know that in our case we're using non-parameterised queries because another programmer wrote a (otherwise) rather useful framework that handled other database issues, including hitting multiple databases and joining the results together. That framework is now in our common utilities, as is my QuoteString which is our only SQL injection defence :-( So far it's only caused SQL syntax errors when particularly curly Unicode is submitted. -- David Connors | da...@codify.com | www.codify.com Software Engineer Codify Pty Ltd Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417 189 363 V-Card: https://www.codify.com/cards/davidconnors Address Info: https://www.codify.com/contact -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
Re: Properties
The thing with properties is that once you have them, changes can be completed without changing the interface, including the binary compatibility of public interfaces. Nevertheless, if your class of variables is not public I too would consider just using fields. -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) On Wed, Aug 25, 2010 at 10:43 AM, Jeff Sinclair jeff.sinclair.em...@gmail.com wrote: Can some one tell me why people get so worked up about all fields being private and accessed only via properties. If you have a class which is only used essentially as group of variables, eg to put into a data structure like a tree or something then why not public fields? Do all those properties really add any value? Jeff