Favorite Tags
View questions based on your favorite tags across the Stack Exchange network

0 answers

Can I add params to computation expressions constructors in F#

Given the following code type Init<'a> = Init of 'a type Right<'a> = Right of 'a type Left<'a> = Left of 'a type MovesBuilder(init) = member x.Yield(()) = Init init ...

3 answers

Is there a shortcut to open resharper menu?

When i type something and i want to open the little menu integrated in visual studio i press CTRL + . Unfortunately this menu has very few options, and the things I need are in the Resharper menu ...

0 answers

Resample time serie with Deedle

I want to resample a TimeSerie to a greater time granularity. I'm not sure which is the best way in Deedle to do so under the condition below. Let's assume I've a daily time serie from 2014-03-15 to ...

6 answers

Cannot edit checked out file (TFS) in Visual Studio 2013

Since I changed my windows password I can no longer type into a checked out file in Visual Studio 2013! Where before I just needed to start typing and it would check out the file in the background, ...

2 answers

Remove element from list in f#

Suppose I have a sorted list l, with possible duplicate values - and I want to return a list with the value n removed from l, but only once. - eg for inputs [1,2,3,3,3,4] and 3, return [1,2,3,3,4]. ...

2 answers | 7 hours ago by user3677952 on Stack Overflow stackoverflow.com
1 answer

F# map and distinct objects

I have some nondescript but distinct objects (specifically, unnamed variables in logic expressions) that I want to put in a map that associates them with their values. As I understand it, map needs to ...

1 answers | 16 hours ago by rwallace on Stack Overflow stackoverflow.com
1 answer

Check for divisibility by a three digit number in F#

I want a function isDiv to return true if a number x is divisible by some number i between 100 and 999, and x/i is between 100 and 999; I attempted to write the method below; let isDiv x = for i ...

1 answers | 18 hours ago by user3677952 on Stack Overflow stackoverflow.com
3 answers

Why does Kaliningrad belong to Russia?

Kaliningrad: former name is Königsberg. I always wondered about why and how Russia kept Kaliningrad (located between Poland and Lithuania on the seaside). I see the strategic point of the city, it can ...

1 answer

Using optional query parameters in F# Web Api project

I was converting a C# webapi project to F# using the F# ASP.NET templates. Everything is working great except optional query parameters. I keep getting this error { "message": "The request is ...

1 answers | 19 hours ago by Pavel on Stack Overflow stackoverflow.com
2 answers

How do multiple .. operators work in a for expression?

I'm new to F# and I had trouble searching for the .. operator. Can someone explain why this function works? let oddsUnderN n = seq {for i in 1 .. 2 .. n -> i} How do multiple .. operators work?

2 answers | 19 hours ago by ConditionRacer on Stack Overflow stackoverflow.com
1 answer

Resharper extract interface from object passed to method

I have a question if Resharper can help me with below problem. Let's say there is a class with many properties inside: public class TestClass { public string variableA {get; set;} ...

1 answer

FsLexYacc : Tests/MiniProject “incorrect Import in .fsproj”

On github, FsLexYacc project has a test dir. I try to set up the simplest one ("LexAndYaccMiniProject"). I follow these steps : 1/ Create an F# console app named "LexAndYaccMiniProject" 2/ Install ...

1 answers | 20 hours ago by FZed on Stack Overflow stackoverflow.com
3 answers

What plans do European countries have if Russia closed gas pipelines to them?

Now that Crimean crisis is at its peak, US and EU are trying there best to force Moscow to pull back from Crimea.But all there efforts seem to have no effect on Russia. But if these situations ...

0 answers

Nancy returns the wrong Content Type from an F# controller

I've been working up an F# Nancy application using the F# Nancy Application Visual Studio Extension. All has been going well with getting a C# Razor View to render until I tried passing in a model ...

1 answer

How do you use tokens instead of strings for targets?

I found that you can use tokens instead of strings for target names in FAKE scripts. Could you translate my sample script into one that uses provided operators? // include Fake lib #r ...

2 answers

Resharper live templates in sql files

I created live template for creation of a stored procedure and I set availability in *.sql files. But when I'm in SQL file I don't have possibility to use live template by typing live template ...

2 answers | yesterday by YoYo on Stack Overflow stackoverflow.com
1 answer

Comparison to FALSE is equivalent to negating value. Is it a ReSharper bug?

I'm using ReSharper 9, and its TypeScript features. I'm writing typescript code. I have an interface like this: interface Test { A?: boolean; ... } And then I write an if statement like this, ...

2 answers

How to destructure a constructor argument?

In F# I can use pattern matching in a variety of places within the syntax. For example: // Given this type... type SingleCaseUnion = | SingleCaseUnion of int /// ...I can do this: let ...

1 answer

Consolidate Redundant Condition

In a project that I am maintaining, Visual Studio is flagging some code for a high complexity. The code is creating raw RTF for a print preview, and has numerous lines with the same condition, If ...

3 answers

Process UDP packet by two clients connected to IPAddress.Any and

I'm trying to connect two UdpClients to one port so they read the data in parallel and handle the requests in two separate queues. But for some reason only one of the clients receives the packets. ...

0 answers

Resharper “join declaration and assignment” don't convert to “var”

When using Resharper and editing C# code, when I choose to apply a "join declaration and assignment" suggestion, it changes my explicit type declaration to "var". Example: If I have: int myNumber; ...

1 answer

Localizable string warning R#

I'm a beginner in c# syntax, been programming in vb.net for quite a few years. ToolStripMenuItem setPriorityDropdown = new ToolStripMenuItem {Text = "Set priority"}; In this code, R# warns that ...

2 answers

Access to Modified Closure

string [] files = new string[2]; files[0] = "ThinkFarAhead.Example.Settings.Configuration_Local.xml"; files[1] = "ThinkFarAhead.Example.Settings.Configuration_Global.xml"; //Resharper complains this ...

1 answer

Is it possible to use F# record's labels as functions like in Haskell, or something similar?

In Haskell, given this record: data ARecord { labelA :: String, labelB :: Int } we get this functions: labelA :: ARecord -> String labelB :: ARecord -> Int F# doesn't seem to work this ...

11 answers

Visual Studio 2010: Editor stops responding to keyboard

I've got this very odd bug that appears to be a quirk in Visual Studio 2010: Sometimes, when moving the cursor into double quotes of a CSS style="" attribute the cursor refuses to move. I can't type ...

2 answers

Assignment: this expression was expected to have the type unit

I'm writing some thing really easy, a program that finds all factors of an int. Here is what I have let factor n= let ls=[] for i=1 to n do if i % n =0 then ls = i::ls l If I do this ...

2 answers | yesterday by verticese on Stack Overflow stackoverflow.com
1 answer

F#, Json, WebApi Serialization of Option Types

I am using record types in a F# project that I am exposing to a C# WebApi project. For example: type Account = {Amount:float; Number:int; Holder:string} Based on this post and this post, the json ...

1 answers | yesterday by Jamie Dixon on Stack Overflow stackoverflow.com
1 answer

UdpClient receives packets to but fails to get them for interface IP address

I have a strange issue when the packets sent to loopback interface are received successfully, but the same packets sent to the local network interface are lost and never received: let test ...

1 answers | 2 days ago by AlexAtNet on Stack Overflow stackoverflow.com
1 answer

Show public c# property description on hover in VS2012

When you hover over a property in VS it shows the datatype and the origin/name. I would like it to show a description. ///<summary> only works in the intellisense when you browse your ...

2 answers

F# TypeProvider cannot load type

I am trying to write a simple SOAP client using an F# type provider. The complete program is: open System open System.Runtime.Serialization open System.ServiceModel open ...

15 30 50 per page
1 2 3