Hi!
Something like
let f x = log(x)
and later I can apply f to matrix, vector or a float.
I guess it is not possible since F# is strictly static typed. Any other patters to overcome this problem?
Thanks!
...
Given a populated ListView how do I iterate through each bound 'template' and pluck out the contained ComboBox (or any other control contained in 'DataTemplate')?
<ListView x:Name="lstCommands">
<ListView.ItemTemplate>
<DataTemplate>
<Grid x:Name="gridInputs">
<Grid.ColumnDefinitions>
<ColumnDefin...
Hello!
I am trying to write an Expert System from scratch. I am a beginner at this and need some help with my project.
My UI is a .NET Windows application and now I want to connect to it to LISP to prepare the knowledge base.
Okay, so this is my plan... what do you guys think?
Any ideas or suggestions will help.
Thanks.
...
Updated Question Further Down
I've been experimenting with expression trees in .NET 4 to generate code at runtime and I've been trying to implement the foreach statement by building an expression tree.
In the end, the expression should be able to generate a delegate that does this:
Action<IEnumerable<int>> action = source =>
{
var...
Sorry I couldn't think of a better title. This is a two part question that only make sense together.
Say I have a constructor like this
public Fact(INotifyPropertyChanged observable, Func<bool> predicate)
{
this.predicate = predicate;
observable.PropertyChanged += (sender, args) =>
PropertyChanged(this, new Prope...
I would like to know if I can define custom assembly attributes. Existing attributes are defined in the following way:
[assembly: AssemblyTitle("MyApplication")]
[assembly: AssemblyDescription("This application is a sample application.")]
[assembly: AssemblyCopyright("Copyright © MyCompany 2009")]
Is there a way I can do the foll...
How do I implement an Delphi coded "ICollection" from a C# .NET collection defined within a 3rd Party Open API Tool.
I have a Laserfiche API toolkit where I am calling the code to return a collection of search hits.
--- This is the process to call it from VB# ---
search.BeginSearch(True)
set results = search.GetSearchHits() ' retrie...
I am writing an MFC application that doesn't use .NET (CLR support is set to No Common Language Runtime support in the project settings). However, I get an SEHException thrown when I quit the application in Release build. Debug build gives me an assertion error, but the error window disappears in about half a second after it pops up (so...
Hi
I have some linq to sql method and when it does the query it returns some anonymous type.
I want to return that anonymous type back to my service layer to do some logic and stuff on it.
I don't know how to return it though.
I thought I could do this
public List<T> thisIsAtest()
{
return query;
}
but I get this error
Error...
I solely work with web applications, so I have virtually no real experience with Windows Forms designed in .NET.
I'm reading up on assemblies, and there are two types; static, which comes in .dll form, and exectuable, which comes in .exe form.
As far as I can work out, an 'executable assembly' is just another name for a compiled applic...
Background
I'm learning the ropes around how to use ASP.NET MVC properly, and ran into this issue with models:
I have a model that describes a contact I can get that out of the form for creating a new contact, but say when we edit a form, I retrieve it from the repository, show the fields on the contact form and then get the contact ob...
I have a method that is only accessible if a certain criteria is fulfilled, if it's not, then the method won't be executed. Currently, this is how I code the thing:
public void CanAccessDatabase()
{
if(StaticClass.IsEligible())
{
return;
}
// do the logic
}
Now, this code is ugly because out of no where there is this...
How can I change the value of a number of keys in a dictionary.
I have the following dictionary :
SortedDictionary<int,SortedDictionary<string,List<string>>>
I want to loop through this sorted dictionary and change the key to key+1 if the key value is greater than a certain amount...
Thanks
...
I am curious. I run this in the background and i know when its done when i see the console disappear. I can check the status by clicking on it and see the output. Then i decided to add a quit button. It no longer disappears when done (it can stay alive for minutes or hours) but once i click on the console it ends. Why?
I wrote this to s...
Answer seems obvious but thought id ask ... don't have a 2.0 machine handy
...
Hi there,
I am new to Mocking and somewhat familiar with unit testing and finally have decided to bite the bullet on a new project starting up front with a strict TDD approach. However I have one service class and method I need to retrospectively add tests to as it has been promoted from a prototype.
I do not know where to start thoug...
Somewhat academic question, but: How do value types like Int actually work?
I've used Reflector on mscorlib to find out how System.Int32 is implemented, and it's just a Struct that inherits from System.ValueType. I was looking for something among the lines of an Array of Bits holding the value, but I only found a field that's declared i...
Is it possible to point to an xml file as a datasource in the same way you would with an .mdf file? Please let me know if I can clarify this question.
For example, let's say I have a datagrid and I want to connect a datasource to it and I want that datasource to be based on a local filesystem xml file.
...
I'm using the standard .NET FontDialog to allows users to select fonts, but it's not showing all available fonts. For example, we have installed Helvetica and that's not showing. The Helvetica is a TTF if that makes a difference.
Is there any way I can get it show all available fonts?
Thanks in advance.
P.S. I'm using .NET 3.5
...
Is the source code for Microsoft .net CLR and C# open? If yes, where can I download/browse it?
...