RE: Microsoft BUILD / Windows 8

2011-09-18 Thread John Li


On switching apps:
Good-old Alt-Tab works for me? Or Ctrl-Alt-Tab to keep it open and pick?

John



 From: ton...@tpg.com.au 
 To: ozdotnet@ozdotnet.com 
 Subject: RE: Microsoft BUILD / Windows 8 
 Date: Sun, 18 Sep 2011 11:41:15 +1000 
  
  
 I have to agree with what you’re saying about flicking between apps.  
 And you’ve got a tablet - it’s even harder with a mouse! 
  
  
  
 As far as I can tell, you have to go so close to the left border of the  
 desktop and then it seems to only show the previous view/app you were  
 using. I would have thought it would show all the apps that you  
 currently have activated (but are probably suspended) allowing you to  
 slide between the various apps. 
  
  
  
 Also, it took me a while to figure out that the start button was still  
 available because it was so far down in the bottom left corner that I’m  
 surprised I actually stumbled across it with the mouse. 
  
  
  
 I know it’s early days and it’s designed for touch – but I’m worried  
 it’s going to upset a lot of people if they don’t work out how to make  
 that more intuitive. There’s is a lot of existing hardware that it’s  
 going to have to run on that is not touch ready. 
  
  
  
 T. 
  
  
  
 From: ozdotnet-boun...@ozdotnet.com  
 [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Burela 
 Sent: Saturday, 17 September 2011 5:54 PM 
 To: ozDotNet 
 Subject: Re: Microsoft BUILD / Windows 8 
  
  
  
 For those wanting to play with it inside a virtual machine, i'd  
 recommend you instead boot directly into Win8 as a VHD instead. 
  
 Here is a guide from Scott Hanselman 
  
 http://www.hanselman.com/blog/GuideToInstallingAndBootingWindows8DeveloperPreviewOffAVHDVirtualHardDisk.aspx
  
  
  
  
  
  
 One of those annoying things I'm finding with the new tile interface,  
 is trying to swap from one app to another. You need to keep flicking  
 your finger from the left to cycle through the apps. It makes it really  
 difficult to know if your app is still actually in the back stack, or  
 where exactly it is. I keep flicking through, cycling through twice  
 only to discover that my app isn't open any more, or I keep missing it  
 and need to keep cycling through again. 
  
 Having a way to switch apps with say, similar to how you can quick  
 switch on iOS would make it so much more functional. 
  
  
  
 -David Burela 
  
 On 16 September 2011 16:33, Grant Maw  
 grant@gmail.commailto:grant@gmail.com wrote: 
  
 No, Win7 64 bit host. x64 Win8 preview. 
  
  
  
 On 16 September 2011 14:36, Winston Pang  
 winstonp...@gmail.commailto:winstonp...@gmail.com wrote: 
  
 Grant, were you doing it on a 32bit host environment? installing the  
 x64 Win8 preview build? 
  
  
  
 On Fri, Sep 16, 2011 at 2:27 PM, Grant Maw  
 grant@gmail.commailto:grant@gmail.com wrote: 
  
 To get it working on VirtualBox (assuming you had the same unexpected  
 error that I got) you need to do this : 
  
 In the settings for your virtual box, motherboard tab, make sure you  
 have selected Enable IO APIC, then on the Processor tab, make sure  
 Enable PAE/NX is selected. 
  
  
  
 I have also read somewhere that people are having trouble getting the  
 networking to work properly. I didn't have this issue but the current  
 wisdom for this is to go into settings and on Network-Adapter1-Advanced  
 choose the generic (Intel PRO/1000 MT) network card. 
  
  
  
 Hope that helps 
  
  
  
 Grant 
  
 On 16 September 2011 14:19, Winston Pang  
 winstonp...@gmail.commailto:winstonp...@gmail.com wrote: 
  
 Ah, nice, thanks Ken, I was using virtual box, but it crapped itself.  
 So I thought it  was across the board. 
  
  
  
 On Fri, Sep 16, 2011 at 1:27 PM, Ken Schaefer  
 k...@adopenstatic.commailto:k...@adopenstatic.com wrote: 
  
 Applications like VMWare Workstation will let you run 64bit VMs even if  
 the host OS is 32bit 
  
  
  
 Cheers 
  
 Ken 
  
  
  
 From:  
 ozdotnet-boun...@ozdotnet.commailto:ozdotnet-boun...@ozdotnet.com  
 [mailto:ozdotnet-boun...@ozdotnet.commailto:ozdotnet-boun...@ozdotnet.com]  
 On Behalf Of Winston Pang 
 Sent: Friday, 16 September 2011 10:58 AM 
  
 To: ozDotNet 
 Subject: Re: Microsoft BUILD / Windows 8 
  
  
  
 Man it totally sucks. 
  
  
  
 I wanted to install x64 on a VM but forgot that my current install of  
 windows is 32bit, so it wont run the Windows 8 x64 version, which is  
 the only version that has the VS2011 express dev tools, GAHHH 
  
  
  
 And that link requires MSDN subscription only. 
  
  
  
  
  
 On Fri, Sep 16, 2011 at 12:01 PM, David Kean  
 david.k...@microsoft.commailto:david.k...@microsoft.com wrote: 
  
 Please also play around with the developer tools, I’d suggest  
 downloading the Visual Studio 11 Developer Preview  
 (http://blogs.msdn.com/b/jasonz/archive/2011/09/14/announcing-visual-studio-11-developer-preview.aspx)
   
 over the Express edition. 
  
  
  
 One thing you should be 

RE: Decompilation - help unravelling syntax

2010-12-19 Thread John Li


Essentially it is all the magic late-binding stuff which VB does for you when 
you forget to go Option Strict On.
 
 
 RuntimeHelpers.GetObjectValue(x)
just returns x boxed so you can omit it and the compiler puts it in for you.
 
 NewLateBinding.LateIndexGet(instance, New Object() {a}, Nothing)
as the name suggests is a late bound index get, such as: instance[a]
 
 NewLateBinding.LateGet(x, Nothing, methodName, New Object() {arg0, 
 arg1}, Nothing, Nothing, Nothing)
is a function call, equivalent to x.methodName(arg0, arg1)
 
 

The following is roughly equivalent source in VB (if you include the 
Try-Finally and GetEnumerator calls):
 
 
For Each instance In someEnumerable
  eArrayList.Clear()
  eArrayList.AddRange(Strings.UCase(@@@   instance(e)).Split())
  If ((Not sArrayList.Contains(instance(b)) And 
eArrayList.Contains(Strings.UCase(sGENRE))) And Not 
Module1.EdescList.Contains(SHOP)) Then
Dim obj44 As Object = instance(b).replace(, and)
sArrayList.Add(obj44)
dArrayList.Add(instance(a))
uArrayList.Add(instance(a))
cArrayList.Add(instance(f).length.ToString)
  End If
Next
 
 

John
 
P.S. I happen to recognise where the code is coming from, especially since you 
didn't quite completely sanitise it :p



 From: il.tho...@iinet.net.au
 To: ozdotnet@ozdotnet.com
 Subject: Decompilation - help unravelling syntax
 Date: Mon, 20 Dec 2010 12:21:19 +0800

 A Monday brain exercise:

 I have to reconstruct something (obtained by decompiling with Reflector
 Pro), and would like some help unravelling some of the verbosity (VB.NET,
 Framework 3.5 I think).

 Here's a sample (presented as best I can) -

 Do While enumerator.MoveNext
 Dim instance As Object = RuntimeHelpers.GetObjectValue(enumerator.Current)
 eArrayList.Clear()

 eArrayList.AddRange(DirectCast(NewLateBinding.LateGet(NewLateBinding.LateGet
 (Nothing, GetType(Strings), UCase, New Object()
 {Operators.ConcatenateObject(@@@ , NewLateBinding.LateIndexGet(instance,
 New Object() {e}, Nothing))}, Nothing, Nothing, Nothing), Nothing,
 Split, New Object(0 - 1) {}, Nothing, Nothing, Nothing), ICollection))

 If ((Not
 sArrayList.Contains(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGe
 t(instance, New Object() {b}, Nothing))) And
 eArrayList.Contains(Strings.UCase(sGENRE))) And Not
 Module1.EdescList.Contains(SHOP)) Then
 Dim obj44 As Object =
 RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(NewLateBinding.LateInde
 xGet(instance, New Object() {b}, Nothing), Nothing, replace, New
 Object() {, and}, Nothing, Nothing, Nothing))
 sArrayList.Add(RuntimeHelpers.GetObjectValue(obj44))

 dArrayList.Add(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(ins
 tance, New Object() {a}, Nothing)))

 uArrayList.Add(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(ins
 tance, New Object() {a}, Nothing)))

 cArrayList.Add(NewLateBinding.LateGet(NewLateBinding.LateIndexGet(instance,
 New Object() {f}, Nothing), Nothing, length, New Object(0 - 1) {},
 Nothing, Nothing, Nothing).ToString)
 End If
 Loop


 Some variable types left out, but clear enough I think.

 As you might guess, it's a partial parsing of some JSON rendered to a
 string.

 (Of course it will be easier to just rewrite the parsing, but I am
 interested in the decompilation. I haven't looked at MSIL at all.)
 
 Ian Thomas
 Victoria Park, Western Australia
 

RE: C# to Delphi (more accurately - Delphi to C#)

2010-12-15 Thread John Li


(OT- On Experts Exchange)
If you just want to read the answers, visit the page with Google as a referrer 
and scroll all the way down.

John


 Date: Thu, 16 Dec 2010 10:08:10 +0800
 From: petermad...@aapt.net.au
 To: ozdotnet@ozdotnet.com
 Subject: Re: C# to Delphi (more accurately - Delphi to C#)

 Thanks for the suggestion.

 I think a dll would be less effort but this could be another option.

 Use to have an Experts Exchange account. I needed this to solve a
 particular problem, once I had the solution I did not have much further
 use for it and it lapsed.

 I think it has a free trial period. I will consider this if the other
 directions I have become dead ends.


 On 16/12/2010 9:59 AM, Ian Thomas wrote:

 Peter

 You have the VCL controls for the Delphi app, I suppose (you said you
 had the source)?

 There is a question (with an acceptable solution) on Experts Exchange
 here
 – but unless a member, you won’t be able to judge its usefulness.

 Embedding VCL (Win32) control on external C# application form
 Asked by roknjohn in
 Delphi Programming, .NET, C# Programming Language
 Tags: Delphi, C#

 I have two applications, one written in C# (Windows Forms) and the
 other in Delphi (Win32). Is it possible to render a TPanel (or other
 component) within the running Delphi application onto some container
 control within the C# application? I've tried using the SetParent API
 function, but this results in a OutOfMemory runtime exception in the C#
 app. However, I am able to embed the entire Delphi app's main form on
 the C# app, using SetParent, but I would like to only embed a portion,
 TPanel/TFrame.



 I recall that someone on this list uses Experts Exchange.



 

 Ian Thomas
 Victoria Park, Western Australia

 

 From:
 ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Peter Maddin
 Sent: Thursday, December 16, 2010 9:33 AM
 To: ozDotNet
 Subject: Re: C# to Delphi



 I tried using TurnSharp but this is really expecting a standard Delphi
 project (dpr) file.
 The code I needed to convert is a control (dpk) file. This is not a
 selectable option.

 I converted the demo project that uses this control and it claimed 93.8%.
 I checked the generated code and the critical code for the
 EllipticCurve was not present (In truth I did not expect it to be as
 this is a control integrated into the IDE)

 I would have to spend some time taking the control code and making it a
 standard unit within a delphi project.
 I would then have to do the same with all the other controls needed.

 While this is do-able I have not coded in Delphi for quite a few years
 and then the outcome may or may not provide a viable product.
 I think this might take up to a week to do with an uncertain outcome.

 At this stage I think the dll /COM is a more viable option.

 On 15/12/2010 2:10 PM, Ian Thomas wrote:

 Peter

 Had you considered a Delphi to C# code converter?

 There’s one
 (TurnSharp) that
 supports .NET 4.0 Framework and money-back if not 90%+ (not a great
 metric, really), with a trial version.



 

 Ian Thomas
 Victoria Park, Western Australia

 

 From:
 ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Peter Maddin
 Sent: Wednesday, December 15, 2010 2:00 PM
 To: ozDotNet
 Subject: C# to Delphi



 I have some cipher units written for Delphi 7.
  

RE: Setting CMD-window title

2010-11-29 Thread John Li


Some thinking out loud:There is a compiled Windows DLL of the library version 
(librtmp); maybe that would suit your purposes?

John


 From: il.tho...@iinet.net.au
 To: ozdotnet@ozdotnet.com
 Subject: RE: Setting CMD-window title
 Date: Tue, 30 Nov 2010 13:59:56 +0800


 CMD.EXE - haha – I didn’t think it was open source ☺ Does Microsoft
 know that?



 No, it is something called rtmpdump.exe – sorry, I was “thinking out
 loud”, wordily. I’ll do what I wrote, rather than burbling on here.



 

 Ian Thomas
 Victoria Park, Western Australia

 

 From: ozdotnet-boun...@ozdotnet.com
 [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of mike smith
 Sent: Tuesday, November 30, 2010 1:08 PM
 To: ozDotNet
 Subject: Re: Setting CMD-window title



 On Tue, Nov 30, 2010 at 3:49 PM, Ian Thomas wrote:
  meski – the Notepad was cited as an example, I think. If you follow the
  StackOverflow discussion, one person just would not back down on the
 general
  statement that it is necessary for the called application to accept / not
  update its title text. The other person pointed this out, and gave the
  example of CMD.EXE that can accept and retain the WM_SETTXT.
 
  I need to either compile a new version of the application I am using (with
  the free MinGW or the not-free WinGDB), or convince the OS folks that
  release the Windows version (it’s for Linuxes, Mac, “etc” and comes out of
  the *ix fraternity) to do so, for everyone’s benefit.
 
  More sophisticated code injection is feasible – but I want a simple, quick
  (and not dirty) remedy.
 
  Perhaps you know (from your C experience) why Microsoft won’t support the
  particular C99 extensions that prevent me from porting / converting this to
  something .NET (in-process DLL, for example)?

 You're wanting to recompile a version of cmd.exe, or want MS to?

 --
 Meski

 Going to Starbucks for coffee is like going to prison for sex. Sure,
 you'll get it, but it's going to be rough - Adam Hills
  

RE: F# Help

2010-10-27 Thread John Li

 
Not a F# expert by any means, but just playing around in VS, there seem to be 
two possible causes:
 
1. The order the files appear in the project matters. The file defining 
ShareEntity needs to come first (you can right click in Solution Explorer and 
Move Up/Down).
 
2. The type is in a module of the same name, so you either need to do a open 
ShareEntity or use ShareEntity.ShareEntity.
 
Hope this helps,
John
 
 From: t...@tomgao.com
 To: michaelsli...@gmail.com; ozdotnet@ozdotnet.com
 Subject: RE: F# Help
 Date: Wed, 27 Oct 2010 21:52:32 +1100
 
 Thanks my understanding is that modules are like classes. I intended them to
 be in different modules.
 
 Any other suggestions?
 
 -Original Message-
 From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
 On Behalf Of silky
 Sent: Wednesday, 27 October 2010 10:14 AM
 To: ozDotNet
 Subject: Re: F# Help
 
 On Wed, Oct 27, 2010 at 12:09 AM, Tom Gao t...@tomgao.com wrote:
  Hi guys,
 
 [...]
 
  At the moment the compiler is complaining that on the line
 
  let lagrangeInterpolatingPolynomial(share : ListShareEntity, degree,
  desiredPos) =
 
  in Lib.fs it isn't able to find ShareEntity.
 
 Is the problem that they are in different modules?
 
 http://msdn.microsoft.com/en-us/library/dd233221.aspx
 
 
  Anyone have any ideas?
 
  Thank you in advance,
 
  Tom
 
 --
 silky
 
 http://dnoondt.wordpress.com/
 
 Every morning when I wake up, I experience an exquisite joy - the joy of
 being this signature.