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: mailto:boo...@cvsol.com davidboccabe...@anubis-systems.com This e-mail and it's contents is confidential to Anubis Systems. This e-mail, any attachments, or any part of can not be reproduced without the express written permission of Anubis Systems
Re: Name of process
Ask the experts : http://math.stackexchange.com/ On 14 October 2011 17:29, David Boccabella davidboccabe...@anubis-systems.com wrote: 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. This e-mail, any attachments, or any part of can not be reproduced without the express written permission of Anubis Systems
Re: Name of process
hahahahahaha snap! On 14 October 2011 19:43, Arjang Assadi arjang.ass...@gmail.com wrote: Ask the experts : http://math.stackexchange.com/ On 14 October 2011 17:29, David Boccabella davidboccabe...@anubis-systems.com wrote: 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. This e-mail, any attachments, or any part of can not be reproduced without the express written permission of Anubis Systems -- regards, Preet, Overlooking the Ocean, Auckland
RE: Name of process
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 http://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: mailto:boo...@cvsol.com davidboccabe...@anubis-systems.com This e-mail and it's contents is confidential to Anubis Systems. This e-mail, any attachments, or any part of can not be reproduced without the express written permission of Anubis Systems
[OT] Prime name testing
Tom's post a few days ago about turning strings into numbers made me wonder if the ASCII-to-number of a person's name is a prime number. This Friday evening I coded the console command below that asks for string names and tests if the resulting BigInteger class made from the ASCII bytes is probably prime. Some random sampling code (not shown) hints that the chance of a string composed from the typical frequency distribution of the English alphabet has about a 2% chance of being prime. So if your name is prime then you are 1 in 50 special. But seriously, the System.Numerics namespace in Framework 4.0 was a surprise arrival, but it's a shame it's so small with containing two classes. A BigDecimal class would have been an impressive addition. Greg using System; using System.Text; using System.Linq; using System.Numerics; namespace bigintplay { /// summary /// A bit of nonsense that takes a string (expected to be a person's name), gets the /// ASCII bytes, reverses the byte into little endian order, constructs a BigInteger /// from the reversed bytes and then checks if the result it a probable prime number. /// Primality testing is done by trial division of small primes and also by the Fermat /// probablistic test (look it up to see why it's probabilistic due to those damned /// Carmichael numbers). /// /summary public sealed class Program { const int FermatCount = 10; static int[] smallPrimes = { 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,1 03,107,109,113, 127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227, 229,233,239,241,251,257,263,269,271,277,281, 283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401, 409,419,421,431,433,439,443,449,457,461,463, 467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599, 601,607,613,617,619,631,641,643,647,653,659, 661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797, 809,811,821,823,827,829,839,853,857,859,863, 877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997 }; static void Main(string[] args) { NameChecker(); } private static void NameChecker() { while (true) { Console.ResetColor(); Console.Write(Enter a name to test: ); string name = Console.ReadLine(); if (name.Length == 0) { break; } Info(); Info(Processing name\n\u25ba {0}, name); byte[] rawbuff = Encoding.ASCII.GetBytes(name); Info(Raw ASCII bytes\n\u25ba {0}, Hex(rawbuff)); byte[] littlebuff = rawbuff.Reverse().ToArray(); Info(Little endian\n\u25ba {0}, Hex(littlebuff)); BigInteger bi = new BigInteger(littlebuff); Info(Number from little endian\n\u25ba {0}, bi); bool failed = false; var divs = (from s in smallPrimes where s bi BigInteger.Remainder(bi, s).IsZero select s); if (divs.Any()) { Console.ForegroundColor = ConsoleColor.Yellow; Info(Trivial factors: {0}, string.Join( , (from div in divs select div.ToString()).ToArray())); failed = true; } for (int i = 0; i FermatCount; i++) { int small = smallPrimes[i]; if (small (bi - 1)) { BigInteger mod = BigInteger.ModPow(small, bi - 1, bi); if (!mod.IsOne) { Console.ForegroundColor = ConsoleColor.Yellow; Info(Failed Fermat primality test for modulus {0}, small); Console.ResetColor(); failed = true; break; } } } if (failed) { Console.ForegroundColor = ConsoleColor.Red; Info(YOUR NAME IS NOT PRIME); } else { Console.ForegroundColor = ConsoleColor.Cyan; Info(Congratulations! Your name is probably prime); Info((the chance of this seems to be about 1 in 50)); } } } private static string Hex(byte[] buff) { return BitConverter.ToString(buff).Replace(-, ); } private static void Info(string format, params object[] args) { Console.WriteLine(format, args); } } }
Opening .MSI databases
I need to open an .MSI data package (installable file) to extract just the .CHM (Help) file. Does anyone know a simple utility? In the past, I used Les Mis - actually, lessmsierables written by Scott Willeke, but the last version he produced was 2005-11-10 and although it has C# source code, I suspect the package structure might have changed and I know (from trying it just now) it is not UAC-aware. I'd rather not change his code in an attempt to improve it, if there is something else. (I don't want to install WiX, either). _ Ian Thomas Victoria Park, Western Australia
Re: Opening .MSI databases
Orca http://support.microsoft.com/kb/255905 is the official tool, but I haven't used it in ages and I found it a bit painful. On Fri, Oct 14, 2011 at 7:36 PM, Ian Thomas il.tho...@iinet.net.au wrote: Bing! New versionhttp://blog.scott.willeke.com/2010/12/lessmsi-v108-is-now-available.html, 2010. But I’d like to know of other tools available. ** ** -- **Ian Thomas** Victoria Park, Western Australia -- *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ian Thomas *Sent:* Friday, October 14, 2011 4:33 PM *To:* ozdotnet@ozdotnet.com *Subject:* Opening .MSI databases ** ** I need to open an .MSI data package (installable file) to extract just the .CHM (Help) file. Does anyone know a simple utility? In the past, I used “Les Mis” – actually, *lessmsierables* written by Scott Willeke, but the last version he produced was 2005-11-10 and although it has C# source code, I suspect the package structure might have changed and I know (from trying it just now) it is not UAC-aware. I’d rather not change his code in an attempt to improve it, if there is something else. * *** (I don’t want to install WiX, either). -- **Ian Thomas** Victoria Park, Western Australia
RE: Opening .MSI databases
Yes, I should have mentioned that I have used WiX v2 and its tools, and of course Orca. I found that using Orca was quite awkward. Apart from its cute name, les msi erables (latest version) if very easy to use - latest version is nice (and actually it uses WiX DLLs). _ Ian Thomas Victoria Park, Western Australia _ From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Joseph Clark Sent: Friday, October 14, 2011 6:55 PM To: ozDotNet Subject: Re: Opening .MSI databases Orca http://support.microsoft.com/kb/255905 is the official tool, but I haven't used it in ages and I found it a bit painful. On Fri, Oct 14, 2011 at 7:36 PM, Ian Thomas il.tho...@iinet.net.au wrote: Bing! New version http://blog.scott.willeke.com/2010/12/lessmsi-v108-is-now-available.html , 2010. But I'd like to know of other tools available. _ Ian Thomas Victoria Park, Western Australia _ From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Ian Thomas Sent: Friday, October 14, 2011 4:33 PM To: ozdotnet@ozdotnet.com Subject: Opening .MSI databases I need to open an .MSI data package (installable file) to extract just the .CHM (Help) file. Does anyone know a simple utility? In the past, I used Les Mis - actually, lessmsierables written by Scott Willeke, but the last version he produced was 2005-11-10 and although it has C# source code, I suspect the package structure might have changed and I know (from trying it just now) it is not UAC-aware. I'd rather not change his code in an attempt to improve it, if there is something else. (I don't want to install WiX, either). _ Ian Thomas Victoria Park, Western Australia
Re: High performance logging control
i would create a logging control that collected the information and use async tcp to send the information to a console. Look at smartinspect , its pretty cool tool that does what you are explaining...i think On Fri, Oct 14, 2011 at 3:34 PM, Greg Keogh g...@mira.net wrote: Folks, back in 2002 the last significant C++ app I wrote had a “logging” control which looked and moved in a very similar way to the cmd.exe window. I was just looking at the 300 lines of code I wrote back then it’s quite complicated as I’m doing everything to paint the control contents. I’m creating the illusion of a cmd style window over a large buffer of messages (up to a few thousand), I maintain the positions of scrollbars, I draw lines in different colours, I can adjust the font and metrics and I use ScrollWindow API for fast motion. It created the illusion of blazing fast scrolling. I’ve pasted below a shot of what the C++ control used to look like. ** ** I’d like to create a similar control in Managed code, but quite honestly I don’t know how. I just don’t know what techniques to use to get the rapid scrolling feeling. If you were told to write a “logging” control that behaved like the cmd.exe window, what techniques would you consider? ** ** I could wrap the old C++ control code as an ActiveX control, but I’ve never needed to do that before and I’m not sure how tricky it is. I’ll evaluate that idea now.** ** ** Greg ** ** image001.png
Re: Opening .MSI databases
There is super-orca http://www.pantaray.com/msi_super_orca.html Not sure how it compares to les msi erables. AllI know is it is more super than the regular orca. Joseph On Fri, Oct 14, 2011 at 10:35 PM, Ian Thomas il.tho...@iinet.net.au wrote: Yes, I should have mentioned that I have used WiX v2 and its tools, and of course Orca. I found that using Orca was quite awkward. Apart from its cute name, les msi erables (latest version) if very easy to use – latest version is nice (and actually it uses WiX DLLs). -- **Ian Thomas** Victoria Park, Western Australia -- *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Joseph Clark *Sent:* Friday, October 14, 2011 6:55 PM *To:* ozDotNet *Subject:* Re: Opening .MSI databases ** ** Orca http://support.microsoft.com/kb/255905 is the official tool, but I haven't used it in ages and I found it a bit painful. ** ** On Fri, Oct 14, 2011 at 7:36 PM, Ian Thomas il.tho...@iinet.net.au wrote: Bing! New versionhttp://blog.scott.willeke.com/2010/12/lessmsi-v108-is-now-available.html, 2010. But I’d like to know of other tools available. -- Ian Thomas Victoria Park, Western Australia -- *From:* ozdotnet-boun...@ozdotnet.com [mailto: ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ian Thomas *Sent:* Friday, October 14, 2011 4:33 PM *To:* ozdotnet@ozdotnet.com *Subject:* Opening .MSI databases I need to open an .MSI data package (installable file) to extract just the .CHM (Help) file. Does anyone know a simple utility? In the past, I used “Les Mis” – actually, *lessmsierables* written by Scott Willeke, but the last version he produced was 2005-11-10 and although it has C# source code, I suspect the package structure might have changed and I know (from trying it just now) it is not UAC-aware. I’d rather not change his code in an attempt to improve it, if there is something else. * *** (I don’t want to install WiX, either). -- Ian Thomas Victoria Park, Western Australia ** ** -- w: http://jcooney.net t: @josephcooney