|
leppie wrote:
Isolatic Mouse cross pollenation subfrequency
Yes, but don't forget to cross-connect it to the third phase inducer plasma manifold. Otherwise the calibration of the dilithium crystal harmonisation routine will be ineffective and cause a phase variance feedback loop that will cause the automatic ejection of the mouse core.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Don't forget to engage the subatomic 3D hypogenerative mesh analyzer, otherwise all multi-axis cross pararllel calculations will be off by at least +/- 3 subneural nanometers.
- Nick Parker My Blog
|
|
|
|
|
Nick Parker wrote:
...will be off by at least +/- 3 subneural nanometers.
True, but at that error variance it is also possible to activate the heisenberg compensator in order to mitigate any misalignment of the multi-axis cross parallel interconnectors. Thus allowing a steady stream of negatively charged subatomic particles to pass freely through the integral data coupling array.
...
You know, I think we've all been watching too much Science Fiction.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Colin Angus Mackay wrote:
Thus allowing a steady stream of negatively charged subatomic particles to pass freely through the integral data coupling array.
Too true, but remember that by taking the integral of the guid generating function we can discern the total surface area of the applications UI in pixels.
Colin Angus Mackay wrote:
You know, I think we've all been watching too much Science Fiction.
Says who??
- Nick Parker My Blog
|
|
|
|
|
I'm uncertain whether this thread is supposed to be taken seriously or not (judging by other responses), but I have converted mouse coordinate X,Y into a ray from Point1(X,Y,Z) to Point2(X,Y,Z) in OpenGL. If that's any good to you, reply to me and I'll post the code.
Regards
Brewman
|
|
|
|
|
It is a serious thread. Some of us were just having some fun.
--Colin Mackay--
|
|
|
|
|
You should post your reply to me through the forum and not directly in my email. You might receive a broader response.
START EMAILED REPLY ----
hi
i am in virtual 3D room and i want to choose something from the wall
END EMAILED REPLY ----
--Colin Mackay--
|
|
|
|
|
sorry for disturbing u colin
|
|
|
|
|
This code is for CsGL, a C# wrapper for OpenGL, but I'm sure that the concept applies to other graphical 3D stuff.
In a 2D representation of a 3D scene (i.e. most pictures, TV, cinema, etc), a point on the 2D surface represents a line in 3D space. In openGL, this 3D space is bounded by clipping planes. The following code takes the mouse's X-Y coordinates and calculates a line (or ray) that passes through those clipping planes. Note that the OpenGL mouse Y coordinate is 'inverted' to Windows mouse Y Coordinate.
Note that the following code won't quite work 'out of the box' (I've removed some stuff to condense things), but you should be able to construct working code with little effort.
- You need the ModelView, ModelPort & Projection state, saved like the following code:
public class OGLMatrixState
{
public void Save()
{
GL.glGetDoublev(GL.GL_PROJECTION_MATRIX, savedProjectionMatrix);
GL.glGetDoublev(GL.GL_MODELVIEW_MATRIX, savedModelviewMatrix);
GL.glGetIntegerv(GL.GL_VIEWPORT, savedViewportArray);
}
private double[] savedProjectionMatrix = new double[16];
private double[] savedModelviewMatrix = new double[16];
private int[] savedViewportArray = new int[4];
}
- You need the built-in conversion routines that OpenGL provides:
public static SEG.Line ViewXYToRay(double vX, double mouseY, OGLMatrixState matrixState)
{
double vY = matrixState.Viewport[3] - mouseY;
double pX,pY,pZ;
SEG.Point nearPt = new SEG.Point();
SEG.Point farPt = new SEG.Point();
GL.gluUnProject(vX, vY, 0.0, matrixState.Modelview, matrixState.Projection, matrixState.Viewport, out pX, out pY, out pZ);
nearPt.X = pX;
nearPt.Y = pY;
nearPt.Z = pZ;
GL.gluUnProject(vX, vY, 1.0, matrixState.Modelview, matrixState.Projection, matrixState.Viewport, out pX, out pY, out pZ);
farPt.X = pX;
farPt.Y = pY;
farPt.Z = pZ;
SEG.Line rayFromNearToFar = new SEG.Line(nearPt, farPt);
return rayFromNearToFar;
}
Hope this helps
Regards
Brewman
|
|
|
|
|
would anybody tell me how to convert text to voice in .net
|
|
|
|
|
Try namespace Microsoft.Speech5 and class SpVoiceClass.Speak(string,SpeakFlags). Microsoft.Speech5 is located in external library "speech5.dll"
Wizard_01
|
|
|
|
|
heba_zien wrote:
would anybody tell me how to convert text to voice in .net
You will need to get the Microsoft Speech SDK[^].
- Nick Parker My Blog
|
|
|
|
|
When I use Microsoft's sproxy.exe (version 7.00.9466) to create a web reference in a Visual C++ application, I get an error message: SDL1000 : Not enough storage is available to complete this operation. If I remove the fault element from the operation element, the header is generated. See wsdl below. Any ideas?
Thanks,
Rick
<?xml version = '1.0'?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="http://xmlns.catch.com/ws/types"
xmlns:tns="http://xmlns.catch.com/ws"
name="RemoteAccess"
targetNamespace="http://xmlns.catch.com/ws">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://xmlns.catch.com/ws/types"
targetNamespace="http://xmlns.catch.com/ws/types">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="WebServiceException">
<sequence>
<element name="errorCode" type="int"/>
<element name="message" type="string"/></sequence></complexType>
</schema></types>
<message name="RemoteAccessProvider_endSession"/>
<message name="RemoteAccessProvider_endSessionResponse"/>
<portType name="RemoteAccessProvider">
<operation name="endSession" parameterOrder="">
<input message="tns:RemoteAccessProvider_endSession"/>
<output message="tns:RemoteAccessProvider_endSessionResponse"/>
<fault name="WebServiceException" message="tns:WebServiceException"/></operation>
</portType>
<binding name="RemoteAccessProviderBinding" type="tns:RemoteAccessProvider">
<operation name="endSession">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://xmlns.catch.com/ws"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://xmlns.catch.com/ws"/></output>
<!-- Offending Code, remove and sproxy.exe works.-->
<fault name="WebServiceException">
<soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://xmlns.catch.com/ws/"/></fault>
<!-- Offending Code End -->
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="RemoteAccess">
<port name="RemoteAccessProviderPort" binding="tns:RemoteAccessProviderBinding">
<soap:address xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" location="http://localhost/ws"/></port></service></definitions>
|
|
|
|
|
I have a fairly large XML document that I do not want to read into memory all at once with the XmlDocument object for parsing. Is there any way to keep the file on disk and simply conditionally read the nodes, depending on their attributes...
My XML file contains a small number of large CDATA sections, and thus, if there is a way for me to read the XML file STRUCTURE from disk without having to read the whole thing into memory, I can pick those CDATA sections out one by one, as needed....
But my guess is that it cant be done with the built in XML functionality?
--
Rob Hutchinson.
|
|
|
|
|
|
I'm trying to create a program that reads a "random" number of jpeg pictures into it and displays them like a slideshow..
but i'm not shure how to do it, since it maybe will be loaded from a cd I was thinking of buffer reading the jpeg files into memory, how do i do this?
and because there can be a different number of jpegs depending on whats passed in to the program, how do i dynamicly create the Image object?
has anyone got a hint?
Cheers
|
|
|
|
|
Leon, something like this should work:
Random r = new Random();
int imageCount = r.Next();
Image[] images = new Image[imageCount];
string[] files = Directory.GetFiles("D:\", "*.jpg");
for(int i = 0; i < imageCount; i++)
images[i] = Image.FromFile(files[i]);
A couple of thoughts though, you should clean this up, I just typed it from my head. You will want to do validation to confirm you have files by checking the length of the array and checking for null, you may also want to limit the size of the number of images you want to get where I am just generating a random number. Don't forget to check and make sure that you have enough images on the CD in relation to the random number of images you are going to display. Hope this is of some help.
[EDIT]
You may also want to make your selection of the images from the collection of images you return from Directory.GetFiles(...) more random instead of just iterating throuh the list of files. Your call, this is just the basic idea.
[/EDIT]
- Nick Parker My Blog
|
|
|
|
|
I don't thing this should be the best way, maybe you should read and draw image on demand. How does it take to load e.g. 100 jpegs ?!
in .NET is very easy :
<br />
public bool ThumbnailCallback()<br />
{<br />
return false;<br />
}<br />
public void Example_GetThumb(PaintEventArgs e)<br />
{<br />
Image.GetThumbnailImageAbort myCallback =<br />
new Image.GetThumbnailImageAbort(ThumbnailCallback);<br />
Bitmap myBitmap = new Bitmap("Climber.jpg");<br />
Image myThumbnail = myBitmap.GetThumbnailImage(<br />
40, 40, myCallback, IntPtr.Zero);<br />
e.Graphics.DrawImage(myThumbnail, 150, 75);<br />
}<br />
Wizard_01
|
|
|
|
|
I think Leon was looking for a way to generate a random collection of images in memory based on images already stored on a CD. You are simply creating a thumbnail image from an existing file, not the collection of images needed.
- Nick Parker My Blog
|
|
|
|
|
The aswers you gave me where great, I was able to make my first little program.
So Cheers, and happy coding =)
|
|
|
|
|
I need to Get the List of computers connected in the server
.
I am working in 2000 prof and my server is 2000 Advanced server. Any one having idea in c#
Aravind.S
|
|
|
|
|
check sample at .NET SKD : \Samples\Technologies\Interop\Basic\ActiveDS\
or namespace System.DirectoryServices
Wiizi
|
|
|
|
|
Hi,
I would like to fill subitems on the fly of a ContextMenu. But it seems like the dot net menuItem class does not support this. The Popup event is never fired.
I fill my contextmenu with menuitems, which only has one dummy sub menuitem. Now i need an event to remove the dummy and populate the real items.
Any hints?
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
Try this :
<br />
this.ContextMenu.Popup += new EventHandler(ContextMenu_Popup);<br />
<br />
...<br />
<br />
private void ContextMenu_Popup(object sender, EventArgs e) {<br />
this.ContextMenu.MenuItems.Add(new MenuItem("ContextMenuPopup"));<br />
}<br />
I tried and it worked.
|
|
|
|
|
Hi
thanks, i will try it, but it only works for me if the sub menuitems also fire this event.
.:[Greetz from Jerry Maguire]:.
|
|
|
|