Questions

How to get feature importance in xgboost?

I'm using xgboost to build a model, and try to find the importance of each feature using `get_fscore()`, but it returns `{}` and my train code is: ``` dtrain = xgb.DMatrix(X, label=Y) watchlist = [(...

4 Jun at 08:5

C# .net MVC, set path to Google Application Credentials JSON file

I've just got this Google Sample Project to work on my VS2015, However, after I published to "IIS" and host it, when I opened the link, the web page kept showing this message as the picture showed !...

4 Jun at 06:17

Android Studio Error: Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running

Installed Android Studio 2.2 Preview 2 and getting this error: > Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's ...

"Uncaught (in promise) undefined" error when using with=location in Facebook Graph API query

I am currently developing a web application with the Facebook Graph API. My current goal is to retrieve only posts which have a location attached. While retrieving posts with and without location is...

ASP.net Identity Framework - Resend Confirmation Email

I'm setting Identity Framework (2?) for my ASP.net site. I have the confirmation email working, but I can't figure out where or how to allow the user to request a resend of the confirmation email. I...

“No 'Access-Control-Allow-Origin' header is present” for redirected request to https://login.microsoftonline.com/

I'm trying to get response with an access code and getting: > XMLHttpRequest cannot load "h...://login.microsoftonline.com/d331431b-899c-4666-8094-e82e6bfc3964/oaut…auth%2faad&scope=user_impersonatio...

18 Jun at 05:47

How to bound a circle inside an ellipse?

The title for this post was quite hard to think of, so if you can think of a more descriptive title please tell me. Anyway, my problem is quite specific and requires some simple maths knowledge. I am ...

4 Jun at 19:6

Mapping expressions in LINQ-to-sql abstract class

I have an abstract class that is inherited by two classes. Both classes represent tables in the database. I am having troubles mapping expressions though in the abstract class and therefore I keep get...

3 Jun at 18:27

Serilog's ILogger injected using Log.ForContext<T>, where T is the consumer

Serilog allows creating a context-aware logger: `Log.ForContext<T>()` I would like to register Serilog with SimpleInjector in such a way that `T` is the type of the consumer, i.e. it is which class ...

4 Jun at 08:42

Why do I get "List index out of range" when trying to add consecutive numbers in a list using "for i in list"?

Given the following list ``` a = [0, 1, 2, 3] ``` I'd like to create a new list `b`, which consists of elements for which the current and next value of `a` are summed. It will contain less element t...

22 Feb at 14:20

Install a certificate for a local cluster

I have some code to authenticate with Azure Key Vault in order to retrieve some secrets. I am authentication using a client id and certificate instead of a client id and secret. This code works great ...

3 Jun at 16:20

How to check if a "lateinit" variable has been initialized?

I wonder if there is a way to check if a `lateinit` variable has been initialized. For example: ``` class Foo() { private lateinit var myFile: File fun bar(path: String?) { path?.le...

27 Nov at 12:3

Xamarin .jar binding - 'Bitmap could not be found'

I have a `.jar` file with a Java interface called `MyService`, which has a method: ``` boolean printBitmapObject(android.graphics.Bitmap bitmap, byte[] result); ``` I would like to use this `.jar` ...

13 Jun at 13:1

How to insert TIMESTAMP into my MySQL table?

In the MySQL table I have a field called date its type is called timestamp and the default is `CURRENT_TIMESTAMP`. However, if I leave the field blank in MySQL I get an error. When I try to insert som...

8 Sep at 19:48

How to create a foreign key in phpmyadmin

I want to make doctorid a foreign key in my patient table. So I have all of my tables created - the main problem is that when I go to the table > structure > relation view only the primary key comes ...

3 Jun at 13:22

I cannot create any web project in Visual Studio 2015

For some reason I cannot create a new web project after having installed the latest [.NET Core SDK/CLI](https://github.com/dotnet/cli). In the dialog window I selected an project and checked the ch...

23 May at 12:8

Unable to start debugging. The startup project could not be launched. VS2015

I have started a new console project in VS2015. I only have this code : ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ...

3 Jun at 11:12

react-native run-android is unrecognized

I've installed react-native-cli globally: ``` npm install -g react-native-cli ``` Then run: ``` react-native init AwesomeProject cd AwesomeProject ``` I got the following structure: ...

15 Sep at 09:41

Access Jira API using OAuth2.0 2-legged approach in .NET

How to create access token for JIRA Rest API? Of relevant data I have - - Jira's Rest API Oauth [example](https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/j...

When to use TaskCreationOptions.LongRunning?

I've wondered this for quite a while, but never really found the answer. I understand that it's a hint for the task scheduler where the task will run on, and that the task scheduler can (or nowadays...

EntityFramework : Invalid column name *_ID1

I am trying to implement DbContext for couple of tables called '`Employee`' and '`Department`' Relationship between Employee and Department is many to one. i.e. department can have many employees. B...

3 Jun at 05:28

Is there a way to remove the "/json/reply/" section of the url?

I would like the URL for a request to be `/AmazingRequest` (or even `/AmazingService`) instead of `/json/reply/AmazingRequest`. I've tried the `Route` attribute, but it seems to have no effect. Is i...

2 Jun at 22:21

Get total amount of GPU memory?

Is there an easy and reliable way to get the total amount of the physical GPU memory? I have tried this, but the problem is it returns 4096MB and I'm using a GTX 780 with 6144MB, so yeah not displayi...

2 Jun at 20:6

docker - how do you disable auto-restart on a container?

I can enable auto-restart with `--restart=always`, but after I stop the container, how do I turn off that attribute? I normally run a webserver and typically map port 80: ``` docker run -d --restart...

2 Jun at 18:3

Create a hyperlink using Xamarin.Forms (xaml and c#)

I basically want to create a hyperlink in Xamarin.Forms using the label class. Basically, I want to following link to take the user to google.com in a web browser: ``` <Label Text="http://www.google.c...