Microsoft.Graph send mail with attachment
``` using Microsoft.Graph IMessageAttachmentsCollectionPage Message.Attachments ``` I can not seem to get this to take any "ContentBytes" which is in the FileAttachment.ContentBytes. My sample is ...
- Modified
- 5 Dec at 19:35
All com.android.support libraries must use the exact same version specification
After updating to android studio 2.3 I got this error message. I know it's just a hint as the app run normally but it's really strange. > All com.android.support libraries must use the exact same ver...
- Modified
- 21 Nov at 18:2
Memory usage of concatenating strings using interpolated vs "+" operator
I see the benefit of using interpolated strings, in terms of readability: ``` string myString = $"Hello { person.FirstName } { person.LastName }!" ``` over a concatenation done this way: ``` strin...
- Modified
- 28 Aug at 22:47
If setting a DataContext within a constructor, does it matter if I set it before or after the call to InitializeComponent()?
I have a WPF window that takes a few parameters in it's constructor. I then use these constructors to setup the state of the window. Part of that constructor process is instantiating my view model c...
Cannot read property 'style' of undefined -- Uncaught Type Error
I would like to change the color, fontsize and font weight of the text in a span element of the html page. I am using the following code: ``` if(window.location.href.indexOf("test") > -1){ var s...
- Modified
- 21 Feb at 13:52
Selenium - 'ITimeouts.ImplicitlyWait(TimeSpan)' is obsolete
I use the C # project settings implicity: ``` driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); ``` Everything worked. When I installed the new version of selenium-dotnet-3.1.0 m...
- Modified
- 21 Feb at 13:32
Installing a new middleware at runtime in ASP.Net Core
When my application starts, I have a bunch of modules (module1, module2 …). For each of this module I have a bunch of controller actions : ``` /myModuleController/module1/action1 /myModuleController/...
- Modified
- 21 Feb at 11:58
CefSharp - Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies
I've been working on a CefSharp WinForms app for a few weeks and I've had no issues with it. This morning, while adding a few things to the application, I tried to run it to test something and got the...
How to stop docker under Linux
My version of OS `Ubuntu 16.04`. I want to stop docker, so I run in the terminal: ``` sudo systemctl stop docker ``` But this commands doesn't help me: ``` gridsim1103 ~: ps ax | grep docker 1134...
How to implement a "pure" ASP.NET Core Web API by using AddMvcCore()
I've seen a lot of ASP.NET Core Web API projects that use the default `AddMvc()` service without the realizing that using `AddMvcCore()` is a superior option due to the control over services. How exa...
- Modified
- 25 Feb at 14:46
Call another rest api from my server in Spring-Boot
I want to call another web-api from my backend on a specific request of user. For example, I want to call send message api to send a message to a specific user on an event. Does have any method to...
- Modified
- 19 Mar at 16:37
C#, multiple == operator overloads without ambiguous null check
: I have a few classes which do the same work, but with different value types (e.g. Vectors of floats or integers). Now I want to be able to check for equality, this equality should also work in betwe...
- Modified
- 21 Feb at 10:55
How can I implement unit tests in big and complex classes?
I'm implementing unit tests in a finance system that involves several calculations. One of the methods, receives an object by parameter with more than 100 properties, and based on this object's proper...
- Modified
- 22 Feb at 00:24
How to find the size of the file in Node.js?
I am using multer for uploading my images and documents but this time I want to restrict uploading if the size of the image is >2mb. How can I find the size of the file of the document? So far I tried...
- Modified
- 25 Jan at 22:27
Web Pushnotification 'UnauthorizedRegistration' or 'Gone' or 'Unauthorized'- subscription expires
I have developed a push notification service for my web site. the service worker is: ``` 'use strict'; self.addEventListener('push', function (event) { var msg = {}; if (event.data) {...
- Modified
- 25 Mar at 21:18
Unable to get request header in asp net core web API
I am trying to create a custom filter in asp net core web api which is as below but unable to get header info. ``` internal class BasicAuthFilterAttribute : ActionFilterAttribute { private StringVa...
- Modified
- 21 Feb at 08:28
ASP.NET Core return JSON with status code
I'm looking for the correct way to return JSON with a HTTP status code in my .NET Core Web API controller. I use to use it like this: ``` public IHttpActionResult GetResourceData() { return this....
- Modified
- 17 May at 10:5
In ASP.net core Identity (UserManager & SignInManager) is it possible to ban a user immediately?
I'm trying to find a way to provide an administrator of the application I'm developing with an effective way to quickly lockout a user who has either left the company or has been identified as behavin...
- Modified
- 21 Feb at 09:1
How to design a Repository Pattern with Dependency Injection in ASP.NET Core MVC?
Being fairly new to ASP.NET Core 1.0 MVC, I have decided to use a Repository Pattern for an MVC Core app; I'm using a SQL DB for the Data Layer `SampleDbContext`, and I want to have a Repository class...
- Modified
- 21 Feb at 00:15
How to auto create database on first run?
My application being ported to .NET Core will use EF Core with SQLite. I want to automatically create the database and tables when the app is first run. According to documentation this is done using m...
- Modified
- 6 Nov at 22:12
How I add Headers to http.get or http.post in Typescript and angular 2?
``` getHeroes (): Observable<Heros[]> { return this.http.get(this.heroesUrl) .map(this.extractData) .catch(this.handleError); } ``` Where I add the headers and how? looking for a s...
- Modified
- 20 Feb at 19:32
How to update an existing Conda environment with a .yml file
How can a pre-existing conda environment be updated with another .yml file. This is extremely helpful when working on projects that have multiple requirement files, i.e. `base.yml, local.yml, producti...
How To Set Startup Route In ASP.NET Core
My ASP.NET core app startup route is set as: /api/values I want to change this startup route to be: / Looking through the documentation there is lots of specification on route constraints but I'm ...
- Modified
- 7 May at 03:58
Reference .NET 4.5 dll in .NET Core 1.1 csproj?
I'm running VS 2017 RC4. I add a reference in my .NET Core app to my .NET 4.5 dll and it compiles. When a line that references the dll is called at runtime, I get: ``` System.IO.FileNotFoundExceptio...
- Modified
- 20 Feb at 16:49
Use ObjectId.GenerateNewId() or leave MongoDB to create one?
In C# I can use the ObjectId.GenerateNewId() to generate ObjectId values. Most of the time when I insert a document in a collection I do not set the value of _id fields. MongoDB creates the ObjectId ...