How To Use Classes Written In IronPython
Jul 23, 2010
I have a class (e.g. MksMath) written in IronPython using SharpDevelop 3.2. After compiling it for class library, it produced the following output:
IronPython.dll
IronPython.Modules.dll
Microsoft.Dynamic.dll
[code]....
View 2 Replies
ADVERTISEMENT
Feb 20, 2009
I have recently written a few TCP Client/Server classes for an application. The main thing I am worried about is if the server class is built efficient enough; I don't have any previous experience with tcp networking so I need someone to give constructive criticism and feedback on the design. I'll explain the server design below.At the very bottom of my framework is a ServerClient class, which is pretty much a TCP client with some extra methods, properties, and events. Each ServerClient continiously read for packets, once one in received, they raise a packet received event... this will come in later on.
The actual server class is simple, it uses another thread to endlessly loop waiting for connections. When a connection is found, it converts the TCP Client into one of the above ServerClients then adds event handlers for the packet received and disconnected events. Finally, it stores the newly created ServerClient into a hashtable with all of the other people who are connected to the server.
When a packet is received by one of the ServerClients it is forwarded to the server(because the event handler was set when the connection was established) and then in turn forwarded onto the application with the sender's ID.Just a brief overview, I'm not attaching any code because I don't like doing that. If you want to see it then send me a PM. I'm just looking for constructive feedback on the design; will this system work, will it scale with a lot of users, and how do large servers handle so many clients at one time?
View 6 Replies
Jun 10, 2009
how F# is a language which allows you to approach problems in a different way than in C#/VB.NET, i.e. instead of "pushing bits around" you "chain together data transformations", and that how F# will "become like XML", something that you use in addition to your language of choice (C# or VB.NET) in order to solve certain problems in a more efficient way.This got me to thinking about the relationship of the .NET languages, here's how I understand them:C# and VB.NET are syntactically but not substantially different, i.e. a C# programmer would not learn VB.NET in order to "approach problems in a new way"however, a C# or VB.NET programmer would learn F# in order to "approach programming problems in a functional way"but what about IronPython and IronRuby? Chris mentioned that "F# learned a lot from Ruby and Python" so I would think that F# has a similar relationship to IronRuby/IronPython and C# has to VB.NET. However, a little googling around tells me that IronRuby and IronPython are both built on the DLR but F# is not.
How are the relationships between F#, IronRuby and IronPython to be best understood?
View 6 Replies
Nov 12, 2009
I tried to bring a previously done webform made in vb.net to an IronPython asp.net website with no luck. After seeing it didnt work, I tried to write the simplest codebehind vb.net webform to see if there was a problem with vb.net in an IronPython website and I got the following usual error "be sure that the defined class in this file matchs with the one in the attribute inherits and that it extends the right base page (page or control)" (sorry if the translation isnt the most accurate I get that message in spanish)but if I create a vb.net webform in the same website, with the sourcecode in the same file (with the vb.net code between script runat="server" tags in the same page) I get no problem. Do I have to configure something for both kind of sourcecode languages to run in such way in the same IronPython website, like configuring something in the webconfig file or is there some compatibility issue for doing that which can't be resolved?
View 2 Replies
Aug 18, 2011
I am struggling with this program which uses emgucv(an opencv wrapper for .net) for about 2 weeks. The problem is unfortunately not programming, but setting up emgucv in such a way that it works. I didn't manage to do so for vb.net so I tried doing it for ironpython(because I know python too). Emgucv seems to work perfectly when using ironpython, so I created a function that takes an image as an argument and analyses it in the way I want, returning another image with the results in it. The problem is I want to call this function, giving it the image argument(it could be a string containing the path) from within VB.net and become another string containing the result image as return. I later plan to package that project in a setup so I can redistribute it.
View 1 Replies
Oct 6, 2010
Since it's possible using the IsNumeric() and others VB.NET functions from IronPython by importing Microsoft.VisualBasic and using it as an object method, is it possible somehow to use the Year() VB.NET function from IronPython?
View 1 Replies
Oct 19, 2010
I created a Class Library project in Visual Studio 2010 and created added the following VB.Net class[code]...
View 1 Replies
Jan 23, 2012
I have two classes, one nested in the other. [code]Neither "Name" or "ID" are unique between operations and records.I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.
View 2 Replies
Jun 13, 2012
How can I structure my classes so that the user interfaces though a single class while the supporting classes are hidden from their view? I think its best understood in an example:
Public Class MyInterface
Public Economic as EconomicClass
Public Sub New()
MyBase.New()
[code].....
So you might ask why am I even separating them? It's strictly for others who will be working with this interface. I need to funnel them though a logical structure:
interface.Economic.MyMethod
interface.Currency.MyMethod
etc
This way everything is already handled for them in the background and they only need to run the method they need. I don't know if I can have it both ways in VB.NET.
View 23 Replies
Oct 24, 2009
Here is some example code of what I mean:
vb
Public Class Form1
Private Sub Button1_Click(ByVal sender as Object, e as systemEventArgs) Handles Button1.Click
[Code]....
View 5 Replies
Jul 10, 2009
I m trying to raise Click event of Textbox explictly but I m getting "Derived classes cannot raise base classes" error.[code]....
View 1 Replies
Sep 24, 2010
so far i got
code
For Each item As Reflection.FieldInfo In GetType(NameSpace.ClassWithNestedClasses).GetFields
rtfAppend(item.Name & ":" & Tab & item.GetValue(Me))
Next
For Each item As Reflection.PropertyInfo In GetType(NameSpace.ClassWithNestedClasses).GetProperties()
[code]...
which gets me the simple string vars and properties of my top class, but how can i apply this to loop through all sub classes and get there vars and props?
View 1 Replies
Oct 13, 2011
Searching the internet finds no less than 700 different ways and opinions to accomplish what I'm trying to do, and I would just like to know the simplest, most bullet-proof way possible.
[Code]...
I simply want to extract the string "bar," which is inside <hostName></hostName>I can do this easily enough with simple string functions, but I'd like to do it with one of the .NET XML classes/methods.
View 2 Replies
Nov 22, 2011
I have question to ask.
I have a dll file written for reading&writing data on USB.To use dll in VB.Net, one needs to integrate a .vb file which interface to that dll file to use its functions, properties etc..
What I need is to use this dll in a C# project. is this possible?[code]...
View 3 Replies
Jul 16, 2009
I am little bit confuse about using properties(Get and Set) in ASP.NET that when these Properties is used.Means How I come to know the exact use of Properties in application. And what is the advantages of using it? [code]
View 2 Replies
Jul 27, 2010
I have three classes Employee, Manager and Salesman. Manager and Salesman classes inherits Employee class.
Employee :
Public MustInherit Class Employee
' Field data.
Protected empName As String
Protected empID As Integer
Protected currPay As Single
[CODE]...
Manager :
Public Class Manager
Inherits Employee
[CODE]...
Salesman :
Public Class Salesman
Inherits Employee
[CODE]...
Now I have created a object of salesman and manager using the following code:
Dim objSalesMan as Employee=new Salesman("xyz",1,2000,5000)
Dim objManager as Employee=new Manager("abx",2,5000,"production")
Is this a good programming pratice or should I use:
Dim objSalesMan as new Salesman("xyz",1,2000,5000)
Dim objManager as new Manager("abx",2,5000,"production")
View 6 Replies
Jan 24, 2012
I found a very useful source code on how to make a fud cryptor, but the author didn't mention which coding language / software he used, please follow the link below, to see the full source code.
View 5 Replies
Aug 2, 2011
In java I would Write:
if (something != bla || something != bla){}
How is this written in visual basic?
View 3 Replies
Apr 14, 2010
iam trying to write information about customer from textboxes to a file.txt.when iam clicking save button, stream is opened, then i used method writeline(txtboxevalues)but no information are written to the txt file any help in that??
View 2 Replies
May 18, 2010
I have written a program and it seems to work fine when i am running it in the environment.When I create a program to distrubute to another computer it will not run.I thought it might be a problem with the other computer but I tried to install it on the same computer I designed it on and it will not run there either.When I run it a message box pops up saying "Application cannot be started. Contact to application vendor."[code]
View 5 Replies
Sep 21, 2011
I want to access a socket that has been opened for me by my service providers. Their socket is written in PHP and I don't understand PHP at all. Themselves they don't understand VB.Net
The Code in PHP as as below
<?
$num = $_GET['num'];
$ext = $_GET['ext'];
[Code].....
View 2 Replies
Jan 2, 2010
I just want to know whether I can use "Reflector" to disassemble a Program written in DOS and go through all the Codes of that program to learn how that program was made? If the "Reflector" is not the one for DOS Program, could you recommend a Free Disassemler for DOS Program?
View 5 Replies
Dec 8, 2009
Trying to dissect a very badly written ASP.NET app. Can someone tell me what this assembly (ProAspCompLib.dll) is used for?
View 1 Replies
Oct 3, 2011
I'm using JdSoft's APNS-Sharp library in my ASP.NET web app. The library is written in C#, and makes extensive use of Delegate Functions and Events for threading purposes. My application is written in VB.NET, and I'm a little confused on about how to translate the following sample code' [code....]
View 3 Replies
Sep 10, 2011
I want to check at runtime if an assembly was probably written in VB. It doesn't have to be a bullet-proof method. Maybe call GetReferenced Assemblies() and check for an assembly that all VB projects reference?
View 2 Replies
Jun 9, 2011
I've got a C#.NET background and due to circumstances I'm trying to make a plugin written in VB.NET. I've created a new class project which gives me a DLL. This class implements a C# interface which all works.My only question is this... In my C# code I've got an implemented DLL (which loads at runtime) with the following declaration before the class...
[Plugin(PluginType.Storage)]
public class XmlPlugin<T> : IStoragePlugin<T>
{
[code]....
How do I write [Plugin(PluginType.Storage)] in VB syntax?
View 2 Replies
Jan 11, 2010
I have an OCX that I wrote in VB6.I added it to the vb.net toolbox and can drag the control onto a form and use it in code without any problems and it works just fine.But I can't see the control's design-time properties. In VB6 there's a small window on the right where I can set the properties of a control. In VB.Net I can see the standard properties such as Location, size, name etc but none of the control's own properties.
Do I need to register msstkprp.dll or a property page or something ?
Can I see design time properties of a vb6 ocx in the vb.net IDE ?
View 1 Replies
Jan 19, 2009
I'm trying to read a *.txt file and see if it has anything written on it. This is my
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim line As String = Nothing
[Code]....
But when i use it doesn't pop the MsgBox. What's wrong with it?
View 15 Replies
Jun 23, 2009
I am redesigning an application that I have previously written which accesses an SQL database, pulls records, creates an object hierarchy based on a bunch of custom classes that I created, and displays them in a TreeView control. When the user selects a node, a tabbed page displays the information about the object underlying the TreeNode selected.
I have since begun experimenting with Databinding to my Objects as I have recently redigned the objects to communicate directly with the datarow that each object is based on instead of storing the values in a private variable thus:
[Code]...
Allowing the databinding management objects to do the heavy lifting of getting the values, displaying them in the controls and writing new values as needed back to the objects (and thus the DataSet) i think is preferable. How can I accomplish this? I have added the Objects as datasources to the DataSources window, added the objects elements to the tabbed pages. How do I bind those controls to the item that is specified by selecting the TreeNode?
View 7 Replies
Dec 21, 2011
I want to check at runtime if an assembly was probably written in VB. It doesn't have to be a bullet-proof method. Maybe call GetReferencedAssemblies() and check for an assembly that all VB projects reference?
View 3 Replies