How is yield an enumerable?
I was toying around with `yield` and `IEnumerable` and I'm now curious why or how the following snippet works: ``` public class FakeList : IEnumerable<int> { private int one; private int two;...
- Modified
- 13 Jun at 08:47
OrmLite-named in memory database throwing exception
I am trying to use in memory database for unit test. following is set up for resolving apphost dependency of database ``` OrmLiteConfig.DialectProvider = SqliteDialect.Provider; var ...
- Modified
- 31 May at 16:27
Is there a programmatic way to identify .Net reserved words?
I am looking for reading .Net, C# reserved key words programmatically in VS 2015. I got the answer to read C# reserved words in the [link][1]. ``` CSharpCodeProvider cs = new CSharpCodeProvider(); v...
- Modified
- 13 Oct at 17:52
Where are logs located?
I'm debugging a JSON endpoint and need to view internal server errors. However, my `app/storage/logs` dir is empty and it seems there are no other directories dedicated to logs in the project. I've tr...
Passing command line arguments to argv in jupyter/ipython notebook
I'm wondering if it's possible to populate `sys.argv` (or some other structure) with command line arguments in a jupyter/ipython notebook, similar to how it's done through a python script. For insta...
- Modified
- 25 Apr at 10:16
How to return data from promise
I need to get the `response.data` out of the promise so it can be returned by the enclosing function. I know, I probably can't do it the way I've coded it because of normal JavaScript scope. Is there ...
- Modified
- 29 May at 08:34
How to tell Application Insights to ignore 404 responses
ApplicationInsights has recently started mailing me a Weekly Telemetry Report. My problem is that it tells me that I have a bunch of Failed Requests, Failed Dependencies, and Exceptions, but when I c...
- Modified
- 24 Oct at 18:47
Use MemoryStream and ZipArchive to return zip file to client in asp.net web api
I am trying to return zip file from asp.net web api to client using The following Code: ``` private byte[] CreateZip(string data) { using (var ms = new MemoryStream()) { using (var ar...
- Modified
- 30 May at 19:12
How do I solve a "view not found" exception in asp.net core mvc project
I'm trying to create a ASP.NET Core MVC test app running on OSX using VS Code. I'm getting a 'view not found' exception when accessing the default Home/index (or any other views I tried). This is th...
- Modified
- 16 Oct at 21:57
Is there default way to get first task that finished successfully?
Lets say that i have a couple of tasks: ``` void Sample(IEnumerable<int> someInts) { var taskList = someInts.Select(x => DownloadSomeString(x)); } async Task<string> DownloadSomeString(int x) {....
- Modified
- 30 May at 20:8
Entity Framework: The context is being used in Code First mode with code that was generated from an EDMX file
I am developing an WPF application with EF 6 database first approach, I am have 1 project in my solutions, if i run my project this error always appear. [http://go.microsoft.com/fwlink/?LinkId=394715...
- Modified
- 30 May at 14:43
Get SQL code from an Entity Framework Core IQueryable<T>
I am using Entity Framework Core and I need to see which SQL code is being generated. In previous versions of Entity Framework I could use the following: ``` string sql = ((System.Data.Objects.Object...
- Modified
- 3 Feb at 09:16
Compiling and running code at runtime in .NET Core 1.0
Is it possible to compile and run C# code at runtime in the new .NET Core (better .NET Standard Platform)? I have seen some examples (.NET Framework), but they used NuGet packages that are not compati...
- Modified
- 10 Jul at 20:15
run single *.cs script from command line
Is there at last a easy way to execute c# script file from command line? I saw that [discussion on github](https://github.com/dotnet/cli/issues/59) and according to this thread i think `dotnet run T...
- Modified
- 30 May at 13:6
Visual Studio Code, #include <stdio.h> saying "Add include path to settings"
I'm trying to build C/C++ in Visual Studio Code. I installed C/C++ and all the relevant extensions. ``` #include <stdio.h> int main() { printf("Test C now\n"); return 0; } ``` But there's a...
- Modified
- 25 Aug at 21:51
How to install mcrypt extension in xampp
how to install mcrypt in xampp on windows? My PHP Version 7.0.5 and xampp pack have not so how can i install mcrypt on xampp ?
react-router getting this.props.location in child components
As I understand `<Route path="/" component={App} />` will gives `App` routing-related props like `location` and `params`. If my `App` component has many nested child components, how do I get the child...
- Modified
- 23 Dec at 14:45
How to create an associative array in JavaScript literal notation
I understand that there are no in JavaScript, only . However I can create an with string keys using like this: ``` var myArray = []; myArray['a'] = 200; myArray['b'] = 300; console.log(myArray); //...
- Modified
- 11 Jul at 06:14
Converting Pandas dataframe into Spark dataframe error
I'm trying to convert Pandas DF into Spark one. DF head: ``` 10000001,1,0,1,12:35,OK,10002,1,0,9,f,NA,24,24,0,3,9,0,0,1,1,0,0,4,543 10000001,2,0,1,12:36,OK,10002,1,0,9,f,NA,24,24,0,3,9,2,1,1,3,1,3,2,...
- Modified
- 20 Mar at 06:43
What is the purpose of remarks tag in c#
I understand that remarks tag is used to provide additional information about the class but it is not displayed in intellisense while hovering / calling that class. I would like to know Where exactly ...
- Modified
- 29 May at 07:29
Elvis (?.) Extension Method in C# 5.0
Is it possible to create some extension method in C# 5.0 to give the same results as the C# 6.0 Elvis (?.) operator? For example: ``` //C# 6.0 way var g1 = parent?.child?.child?.child; if (g1 != nu...
- Modified
- 29 May at 08:34
Visual Studio not showing IntelliSense descriptions anymore
Since a month ago, my VS doesn't seem to want to display the summary info in tooltips for any system methods or classes when I hover them with my mouse. I had ReSharper installed and started noticing...
- Modified
- 12 Mar at 19:59
no target device found android studio 2.1.1
i'm using in ubuntu 14.04.Now my question is,i want to run the program through my phone without emulator. so i chose the target as usb device but whenever i run this,below mentioned error is rasing. ...
- Modified
- 29 May at 03:11
AccessDeniedException: User is not authorized to perform: lambda:InvokeFunction
I'm trying to invoke a lambda function from node. ``` var aws = require('aws-sdk'); var lambda = new aws.Lambda({ accessKeyId: 'id', secretAccessKey: 'key', region: 'us-west-2' }); lambda...
- Modified
- 3 Sep at 21:47
C# readonly vs Get
Are there any differences between the readonly modifier and get-only properties? Example: ``` public class GetOnly { public string MyProp { get; } } public class ReadOnly { public readonly ...
- Modified
- 20 Jun at 20:18