Topics
-
Having problems building github CMAKE repository (error code C1083)
by Guest E Bowes- 0 replies
- 586 views
Hey there. I'm trying to build this repository: https://github.com/jmarshall23/IcedTech/tree/master/code/Engine/MayaImport It has the CMAKE files, so I'm using Visual Studio 2019 to open them. When I build all, I get the error message: C1083 Cannot open include file 'afxwin.h' No such file or directory I've tried compiling other source codes such as Doom 3, but I get the same error message. Any idea on how to fix this? Thank-you Continue reading...
-
AVX512 in ML64.EXE (MASM) with Visual Studio 2019 Community
by Guest rcgldr- 0 replies
- 305 views
I'm trying to assemble AVX512 code with Visual Studio 2019, but I'm getting invalid operands and other errors. Is there some directive I need to use to enable AVX512 assembly? Continue reading...
-
Visual Studio 2019 Pro | Command Window | Command Not Available
by Guest cottonema- 0 replies
- 441 views
Can anyone tell me why the following command is not available, when it's clearly displayed in the list of commands as I type it out..... >Project.IncludeInProject I get ---) Command "Project.IncludeInProject" is not available. ==================================================== I'm trying to add an existing folder to a project, via the command window! I'm aware of the the command ---) Project.NewFolder But this command does not take any argument. It does however creates a new folder with the name ---) NewFolder Continue reading...
-
F# usage
by Guest F_M_L- 0 replies
- 419 views
Hi, I'm pretty new in F# but I'm familiar to C# so i was wondering for what purposes, i can use F#, well i know its usage is mainly in data analysis and all, but mainly i was thinking to do some regular jobs using F# instead of C# so im asking if there is some areas that F# can overperformance C#, so i mean generally what are the usage of F# but not just in data analysis and big data tnx Continue reading...
-
Any good "F# under the hood" articles/blogs?
by Guest Ingram Barclay- 0 replies
- 370 views
Can anyone point me to some good blogs/articles on what exactly is happening under the hood when F# data structures are copied and updated? I think I know what's supposed to be happening but the specifics could alter how I define my records to get the behavior I want, which is for the result of a record copy-and-update to present a new structure that points to the unchanged members of the original record as well as a new allocation for each changed member, but NOT a full brand new copy of each record as they are modified. Thanks! Ingram Continue reading...
-
WPF Composites (WPF-CPS) for F#
by Guest Bryan Prendergast- 0 replies
- 383 views
FYI . . . I just added a basic 'Hello World' example of using my Fluent WPF API named WPF Composites (WPF-CPS) with F#. Just search for WPF Composites on CodePlex and search for the F Sharp Example link on its main home page. WPF Composites (WPF-CPS) is a project designed to provide an alternative, concise, C# (or IronPython or F#) code-behind approach to managing UI Framework Element composites. Composites are normally managed via XAML and DataTemplates but this library uses ID's and X-Y Coordinates instead to position elements on the screen. It works via 100% code-behind, zero XAML, has CSS-like Selectors, has Generators to generate multiple Framework Elements …
-
F# how to serialize records to nested JSon data
by Guest zydjohn- 0 replies
- 369 views
If I have some records in F#: type Coureur= { runner_name: string distance : string unit : string score: float } let stoppage = seq [ { runner_name= "No 1" ; distance = "100M"; unit = "seconds"; score = 10.0} { runner_name= "No 2" ; distance = "200M"; unit = "seconds"; score = 20.0} ] I want to serialize the records to the nested Json data, like the following: { "sports": { "measure-type": "Metric", "runner-type": "track-field", "runners": [ { "runner-name":"No 1" , "distance": "100M", "unit": "seconds", "score": 10.0 },{ "runner-name":"No 2" , "dis…
-
F# Dapper how to create connection string.
by Guest zydjohn- 0 replies
- 375 views
Hello: I recently want to learn Dapper for F#, in order to access SQL Server database. I found some article for this topic. And I created a simple database [myDB] using SQL Server 2017, and created a small table: USE [MyDB] GO CREATE TABLE [dbo].[users] ( [iD] [int] NOT NULL, [FirstName] [nvarchar](30) NOT NULL, [LastName] [nvarchar](30) NOT NULL, CONSTRAINT [PK_Users] PRIMARY KEY(ID)) GO Add some records: INSERT INTO USERS VALUES(1, 'Jo', 'Jo') INSERT INTO USERS VALUES(2, 'John', 'Doe') Now I want to use someone's code to retrieve records from [users]: module DapperFSharp = open System.Data.SqlClient open System.Dy…
-
Can the F# HtmlProvider access password protected pages?
by Guest Mr Yossu- 0 replies
- 340 views
I know how to grab data from a web page in F#... [color=#101094][font=inherit]let[/font][/color][color=#303336][font=inherit] url = @[/font][/color][color=#7d2727][font=inherit]"https://en.wikipedia.org/wiki/Doctor_Who"[/font][/color][color=#303336][font=inherit] [/font][/color][color=#101094][font=inherit]type[/font][/color][color=#303336][font=inherit] DoctorWhoData = HtmlProvider<url> [/font][/color][color=#101094][font=inherit]let[/font][/color][color=#303336][font=inherit] data = DoctorWhoData.GetSample()[/font][/color] ...which is really neat, but I want to be able to do this for a password protected page. I can't seem to find any documentation on how to…
-
Trouble connecting F# to an Entity Framework model
by Guest Mr Yossu- 0 replies
- 382 views
Hello, I've been trying out this MSDN walkthrough to connect F# to an edmx file. I started an empty solution, and added a C# class library, to which I added an Entity Framework model. I then added an F# console app to the solution. My solution now looked like this... Following what was in that MSDN article, I added the following line to my F# code file... type edmx = EdmxFile<"DonationsManagerModel.edmx", ResolutionFolder = @"..\EfModel"> However, the type name is underlined in red, and I get the error message... The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or p…
-
Await event to complete before continuing code
by Guest WojszaM- 0 replies
- 363 views
Hi, I have a question. I have a method that sends and receives messengers via serial port as a byte arrays, to SerialPort DataRecived I am adding an event that will read response and assign it to type so basically it should be easy and looks like this: async { let buffer = Array.zeroCreate<byte> port.ReadBufferSize let response = new Response(buffer) let data_recived = async{ let! read_buffer = port.AsyncReadLineAsByte() response.Data <- read_buffer printfn "Response Buffer: %A response type: %A" read_buffer response.Data …
-
F# Interactive Unresponsive
by Guest sbabaei- 0 replies
- 381 views
On Visual Studio 2017 15.9.9, I have encountered a weird issue recently. When I code directly in the Interactive windows, F# Interactive just freezes: It is OK when I send a piece of code to it from a script (ALT+ENTER) but not when I do it directly. It was pretty much the same with Python Interactive when I set it to use IPython. Since I have done a clean reinstall of my system, Python Interactive is fixed but not F# Interactive. So far as I can decipher, the Python issue relates to installed packages. I cannot figure out the reason for F#. Continue reading...
-
Render FrameworkElement (F#) without outside WPF application
by Guest This_display_name_is_already_in_use_They_all_are- 0 replies
- 397 views
Original Text from WPF Forum: (Still relevant) We have a Class, written in F# which is basically a FrameworkElement. Internal there is a VisualCollection which holds the rendered parts - for compositioning i guess. The class itself represent a Graphic-To-Be-Rendered, which in this special case, has to be done without a UI thread and outside of a WPF application. What we do is the following: Spawn an STA Thread - Instantiate the Graphics - Populate with Data - Render to Bitmap - Return Synchronized stream Outside the STA Thread - Write stream to File The file is empty but has the correct width & length. I believe that it is not possible to…
-
F# sample project can't build
by Guest Antoine Besnard- 0 replies
- 379 views
Hi, I'm having a strange behaviour with all my F# files They're all creating C# errors So I've just recreated a new F# project and here's what it look like namespace Test module Say = let hello name = printfn "Hello %s" name And errors are : { expected ; expected A namespace cannot directly contain members such as fields or methods Regarding to those errors it seems that Visual is trying to build F# with C# compiler. But the F# tools are installed : F# desktop language support F# language support F# language spport for web projects I don't really know what's wrong, bescause I already make it work on this computer …
-
Visual Studio F# function 'quickinfo' signature display
by Guest Barfarkle- 0 replies
- 406 views
Just checking if this problem has already been reported for Visual Studio 2019 (I am using Community Edition 16.2.5 on Windows 10). I tried searching and didn't see anything useful but I don't really know what to search for as I have no idea what this feature could be called. The 'quickinfo' function signature display in the source code (commented text in a smaller red only font to the right in the image below) is misaligned and overwritten in spots. It doesn't disappear if you scroll it out of view. Closing the file and re-opening clears it up, at least temporarily. This is the bug part. Although I find this display can be quite useful, sometimes I just want to…
-
nameof operator doesn't work
by Guest JohnyL- 0 replies
- 341 views
I'm learning F#. Here's the code: let f x = let m = nameof x m [<EntryPoint>] let main argv = let x = f "z" 0 However, I get the following error: The value or constructor 'nameof' is not defined. What I'm doing wrong? There is no knowledge that is not power. Continue reading...
-
Printed report doesn't show values
by Guest Natella A- 0 replies
- 348 views
Hi, i am experiencing "weird" problem. Previewed report looks different from printed report. Report preview shows perfectly correct information includes all fields and variables. On Printed report some of the fields/variables come out blank. Same report sent to pdf file from preview mode comes out correct. It is just printed version that looks half empty... so confused, please help! thank you! PS using FVP8 Continue reading...
-
How to write to a text file using Fable?
by Guest cschristine- 0 replies
- 404 views
I'm trying to use Fable to convert some f# code I wrote into a web project, but I'm having some trouble with writing file output. Previously, when I just had a net core project, I could just do something like this: [iCODE]File.WriteAllText("output.txt", "hello")[/iCODE] But now if I try that, I get this error: [iCODE]error FABLE: Cannot resolve System.IO.File.WriteAllText @ ./src/App.fsproj[/iCODE] Is there something I need to import/add to make this work? Or is there a different way to write files in Fable? I would really appreciate any help or suggestions. Thank you in advance! Continue reading...
-
I want to adapt or transform from C# code to F#.
by Guest Metaconta- 0 replies
- 386 views
Hello: I want to adapt or transform from C# code to F#. Code C#: using System; namespace radioButton_consola_02_cs { class Program { #region Variables. private static readonly string[] TEXTO = new string[] { "( ) Option A ", "( ) Option B ", "( ) Option C ", " EXIT" }; private static int itemSeñalado; private static int itemSeleccionado; #endregion static void Main(string[] args) { // Window title. Console.Title = "RadioButton"; // Window size. …
-
Read dll done in C++ with console F#
by Guest Metaconta- 0 replies
- 422 views
I want to make this code in C # console, adapt it to F #. What it does is read a dll made in C ++. using System; using System.Runtime.InteropServices; namespace Consola_cs { class Program { static void Main(string[] args) { Console.WriteLine(Marshal.PtrToStringAuto(SUPER_DLL.Mensaje())); Console.WriteLine(SUPER_DLL.Suma(1764, -764).ToString()); // Pulse cualquier tecla para salir. Console.ReadKey(); } internal class SUPER_DLL { [DllImport("Super_dll.dll")] extern static public int Suma(int a, int b); [DllImport("Super…
-
Who's Online 0 Members, 0 Anonymous, 56 Guests (See full list)
- There are no registered users currently online