|
I agree; it has the potential to be very useful. Incidentally, dynamic types are determined at runtime. var types are determined at compile time. However, you can see matter from the point of view of the original comment - C# and VB appear to be merging (VB# ?)
|
|
|
|
|
Of course you are right that dynamic and var are totally different things, but both are introduced in c# to handle some things (for var it would be anonymous types and useful inferring when using LINQ), and when I see code full of var x = 5; var y = FooFunc(); etc, I'm lost, just like if someone would put dynamic y = FooFunc(); everywhere (which btw would be much slower then using var ). I hope that, if there is some merging going on behinf our back, C# will remain C-like language, especially that I still have to use c++/c often.
|
|
|
|
|
I agree. It's difficult to read, and unsafe. However, it has its uses. I'm with you on the C-like language though. From a certain viewpoint (i.e. mine), it is beyond just machine code and becomes a work of beautiful art
|
|
|
|
|
Computafreak wrote: From a certain viewpoint (i.e. mine), it is beyond just machine code and becomes a work of beautiful art
True, True...
|
|
|
|
|
Well, the primary intent is to enable interfacing with dynamic languages like Python and Ruby, along with COM interop (IDispatch).
The CLR itself stays type safe, so for .NET types atleast, I'd imagine that runtime type checking would still happen.
|
|
|
|
|
1) How can we apply cosine transformation on color images using vb.net or c#
2) How to apply diffie hellman key exchange algorithm on images for encrypting it with a text message
|
|
|
|
|
For example by coding it yourself. Or by saving image as JPEG, which relies on Cosine transformation, but that's not what you have in mind propably .
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
So, as we all know, trying to access a control on any thread other than the one that created it is very bad. This tends to lead to applications which have just one GUI thread with background threads doing 'work' and 'Invoking' their changes back to the main thread.
Not content with this, I'm playing around trying to get two forms to display each running seperate gui threads. Easy enough it seems, just put the Application.Run() for each in seperate threads. Now, should the GUI thread in one form lock up the other can continue running freely. This works and I'm happy and its virtue in a system which is full of windows all over the shop is easy to see.
The next stage would be to do this in an MDI type set up so that the child windows each have their own thread. Anyone see any issue with this? I'm concerned by the fact that each child form belongs to the parent 'mainframe' window as we used to call them, but in principle can't see any fault with it.
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: Anyone see any issue with this?
Yep. Each form is told WHEN to render by the MdiClient control, running on the "GUI Thread" in the MdiParent. So how is the MdiClient going to jump the thread boundry without ever leaving the GUI thread??
|
|
|
|
|
That's a good question. It can't be done it seems, I think all the MDI child windows share the same message pump. Oh well, there we go. Thanks for the reply.
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: I think all the MDI child windows share the same message pump.
Yes, they do.
|
|
|
|
|
Hi,
I'm just about to start on a new project and while I've written stuff that uses web services, I'm thinking I should probably use a different approach.
Can anyone point me in the direction of when to use web services and when not to?
Also, if I don't want to use a web service (I need high perforamance), what do I do? Should I write a load of DLLs or Windows services? Does .NET offer me a component-based system I could use instead?
My application will have a SQL database which will contain my own entities. The system must be able to create, read, update and delete the entities via a published interface that other applications can use.
Should I present the interface via web service, a DLL or a Windows Service?
All opinions welcome and thanks for looking
|
|
|
|
|
Hi.
I am trying learn c# and doing an application to select data from a Dataset "productDataSet" table [Valve] with a list of products to be selected and copyed in a table inside the same.
How can I do the selection process ?
I found this [1], but I don't see DataRow.
Thanks
Stefano
[1] http://msdn.microsoft.com/it-it/library/kax0zhe7(VS.80).aspx[^]
|
|
|
|
|
But I can see 'DataRow' in the end of that page...will you try explain more ? As far as I understood that you're trying to Select some product rows and make their copies in that table. Is that you want ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I will be not enough clear, you are right.
The matter is that I have added using "Add Data Source" wizard a file mdb with 2 tables inside.
"Valvole"
"Selezione"
the first, "Valvole", is a DB with allk products, the second, "Selezione", is a DB empty with the same structure of "Valvole". My intention is to select products and copy in the "Selection" table. After I will display in a DataGridView.
Now by default there is added in the Form1_Load and is
this.valvoleTableAdapter.Fill(this.valvoleDataSet.Valvole);
and the DataGrid is populated.
Is inside the code I write.
this.selezioneTableAdapter.Fill(this.valvoleDataSet.selezione);
I got error :
http://msdn.microsoft.com/en-gb/library/bb383961.aspx[^]
Thanks
Stefano
|
|
|
|
|
If you're using .NET Framework >= 3 I suggest using LINQ
|
|
|
|
|
|
You can also use dataview ...
just keep the datasource as the productds
And there is a filter where you can give some filtering or selection . . .
Might be this helps you ..
But still you are unclear with your question ????
|
|
|
|
|
Hi All!
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FinalEventsDLL
{
public delegate void ControlEventHandler(string redirectUrl);
[Guid("E819B536-D64F-4fed-BCE7-F21650364211")]
public interface DBCOM_Interface
{
[DispId(1)]
void Hello1(string userid, string password);
[DispId(2)]
bool Hello2(string selCommand);
}
[Guid("E72E89DB-788B-4f6d-BFB1-679CC103D13A"),
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface DBCOM_Events
{
[DispId(0x60020001)]
void OnClose(string redirectUrl);
}
[Guid("EC393ACC-37A5-44da-B316-E4E367517D1C"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(DBCOM_Events))]
public class FinalDLL : DBCOM_Interface
{
public FinalDLL() { }
public event ControlEventHandler OnClose;
public void Hello1(string userid, string password)
{
return;
}
public bool Hello2(string selCommand)
{
Close();
return true;
}
[ComVisible(true)]
public void Close()
{
if (OnClose != null)
{
OnClose("http://otherwebsite.com");
}
else
{
MessageBox.Show("No Event Attached");
}
}
}
}
Above is the code for my C# DLL
REGISTERED
I have registered it using
regasm D:\FinalEventsDLL.ddl /codebase /tlb
IN JAVASCRIPT
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <title>C# ActiveX Test</title> </head>
<body onload="myload();">
<h1>This is Our ActiveX Test Page h1>
<script type="text/javascript" >
function myload{
var myAx = new ActiveXObject("FinalEventsDLL.FinalDLL");
if(myAx != null)
{
myAx.Hello2("sd")
}
else
{
alert("NOOOO... we failed");
}
}
</script>
</body></html>
Everything is working fine so far ,problem is
myAx.Hello2("sd")
when I call this event OnClose DLL event is fired, But how can I catch this in Javascript
I tried GOOGLE and Other Stuff's but not getting any proper answer
I also tried
function myAx::OnClose(redirectionUrl)
{alert();}
But this doesn't seems to work
Can you please help me get the proper way to Catch DLL Event in Javascript
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
Hi,
I have a (straight) line between two Point's. I want to find the nearest point on that line to another arbitrary point. How can I do this?
Thanks,
Steve
|
|
|
|
|
off top of head just loop through all points in the line and calulate the distance from that point to the 'other point' with pythagorus theory or something. shortest distance = nearest point
maybe would be easier to apply roation to the line and point first so the line is completely vertical then just use the yPos of the point and match it to the yPos within the line
Life goes very fast. Tomorrow, today is already yesterday.
modified on Wednesday, March 18, 2009 11:19 AM
|
|
|
|
|
loop through all points in the line
How to do that?
Kelvin
|
|
|
|
|
hmmm... well do a search for 'line drawing algorithm'[^] or something like that.
instead of drawing each pixel, you use each pixel to check distance with other point
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|