I am trying to use FSharp.Charting for visualisation. However a stumbling block for me is that I am using the tutorial at Try F#, but the FSharp.Charting dll is different - has different methods signatures etc.
I am trying to translate the following line found on Try F#:
Chart.Point(data).WithXAxis(MajorTickStep=1.0)
However, I can't find a way of setting the major tick step on the X-Axis - the following code of mine does not it:
Chart.Point(data).WithXAxis(MajorTickMark=ChartTypes.TickMark(Interval=1.0))
Can anyone help?
Related
i am reading swift from apple docs and learning about statements. but couldnot find any information about the Line Control Statements.
According to the docs
A line control statement is used to specify a line number and filename
that can be different from the line number and filename of the source
code being compiled. Use a line control statement to change the source
code location used by Swift for diagnostic and debugging purposes.
A line control statement has the following forms:
#sourceLocation(file: filename, line: line number)
#sourceLocation()
My question is when should i use it? The docs lags an example about the topic.Any links or some hints would be helpful.
This isn't the sort of thing you'd ever need as a beginner, and you could probably go through an entire career without using it. It seems to be meant for use in tools that generate source code. See the comments in the original feature proposal for the complete story.
TL/DR: Don't worry about it, you'll never need it.
I like using .fsi signature files to control visibility. However, if I have both Foo.fsi and Foo.fs files in my solution, and #load "Foo.fs" in a script, it doesn't seem like the corresponding signature file gets used. If I do:
#load "Foo.fsi"
#load "Foo.fs"
... then the desired visibility control happens. Is this the recommended way to achieve this, or is there a better way to do it? In a perfect world, one would like to see the signature file automatically loaded, too.
Not a final answer, but a better way.
From reading Expert F# 4.0 one can do
#load "Foo.fsi" "Foo.fs" "Foo.fsx"
All three loads are on one line.
TL;DR
The link to the book is via WolrdCat just put in a zip code and it will show you locations near there where the book can be found.
Could someone provide a simple example using getopt.pas with short and long command line switches use case?
Getopt.pas is a delphi unit for parsing command line switches.
I've found more than one version of it.
from fpc http://www.koders.com/delphi/fid428067C2ABEF87A674F64BF48FD6E2278E322A18.aspx
The following is another SO question regarding this subject but no example is given; beside it this links to a source that alike the previous links is not self-contained
Is there an implementation of "getopt" for Delphi?
Here is a demo of the GPC code that you link to: getoptdemo.pas [koders.com]
I am looking for a library or utility that can parse the msi launch conditions. Basically i want to take these statements and translate them into our own langauge, but before i do that i need to parse it up.
I can already pull a list conditions out of an MSI, for example:
NOT VersionNT OR (VersionNT = 501 AND ServicePackLevel >= 2) OR (VersionNT > 501)
But i was hoping there was already something that can break this up into a more interpretable format.
Additional question, what is this language called? I can figure out how to refer to it or search for it.
Cheers
See:
Conditional Statement Syntax
Windows Installer exposes a Win32 function and an Automation Method for evaluating conditions.
MsiEvaluateCondition Function
Session.EvaluateCondition Method
Try the Wine source code. They have the following grammar file for conditions:
http://source.winehq.org/source/dlls/msi/cond.y
I'm getting the error: wintypes.dcu not found several times a day in the Delphi 2009 IDE, after this error code completion stops working, also I can't open any unit's source code with Ctrl + Click, then I have to reopen the IDE to fix it.
Anyone has a clue about what can be causing this?
The only IDE extension I have installed is GExperts.
wintypes.pas and winprocs.pas has been replaced with windows.pas (since a long time). You should use Unit Aliases to replace all wintypes with windows.
You must be still using the ancient (pre-Delphi 2) names for what is now the Windows unit. I recommend that you search and replace all your uses lists and replace WinTypes and WinProcs with Windows.
Alternatively, you can make sure you have "WinTypes=Windows" and "WinProcs=Windows" in the Unit Aliases section of your project options, but still, after all these decades, I'd move on to the 32-bit world! (16-bit being the prime limitation that meant WinTypes and WinProcs were two separate units.)
Open Project - Options, Delphi Compiler ,into Unit aliases insert:
WinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BDE;DbiErrs=BDE
Do you use the Decision Cube component? So look for references on the unit MXQEDCOM.pas in your sources.
On BDS 2006, is the only reference for Wintypes and Winprocs I found.
By the way, make sure that the Unit Aliases included the values that Barry Kelly wrote.
Why wintypes.dcu cannot be found any longer, I do not know. But the other two are obvious follow up errors: if Delphi cannot compile the code due to syntax errors (and a missing file is considered a syntax error), it stops code completion and cannot locate source code any longer using Ctrl + Click.