Questions

How to delete an element from a Slice in Golang

``` fmt.Println("Enter position to delete::") fmt.Scanln(&pos) new_arr := make([]int, (len(arr) - 1)) k := 0 for i := 0; i < (len(arr) - 1); { if i != pos { new_arr[i] = arr[k] k+...

5 May at 06:32

How do you add a file as a link in a .NET Core library?

I've added a .NET Core RC2 class lib to my solution (for fun) and the first thing I usually do is add a link to a shared `GlobalAssemblyInfo.cs` and edit the existing `AssemblyInfo.cs` down to the ass...

Splitting a pandas dataframe column by delimiter

i have a small sample data: ``` import pandas as pd df = {'ID': [3009, 129, 119, 120, 121, 122, 130, 3014, 266, 849, 174, 844], 'V': ['IGHV7-B*01', 'IGHV7-B*01', 'IGHV6-A*01', 'GHV6-A*01', 'IGHV6-A...

19 Feb at 14:40

Concatenate two PySpark dataframes

I'm trying to concatenate two PySpark dataframes with some columns that are only on one of them: ``` from pyspark.sql.functions import randn, rand df_1 = sqlContext.range(0, 10) +--+ |id| +--+ | 0| ...

how to setup ssh keys for jenkins to publish via ssh

Jenkins requires a certificate to use the publication and commands. It can be configured under `"manage jenkins" -> "Configure System"-> "publish over ssh"`. The question is: How does one create th...

5 Jul at 14:49

Working with DirectoryServices in ASP.NET Core

I am upgrading my ASP.NET Core RC1 application to RC2. I have some references to `System.DirectoryServices` and `System.DirectoryServices.AccountManagement` in some *.cs files so that I can query LDAP...

How to list indexes created for table in postgres

Could you tell me how to check what indexes are created for some table in postgresql ?

2 Jul at 17:7

How to use IHttpContextAccessor in static class to set cookies

I am trying to create a generic `addReplaceCookie` method in a static class. The method would look something like this ``` public static void addReplaceCookie(string cookieName, string cookieValue) {...

ServiceStack - As passthru to another ServiceStack service

I currently have an ServiceStack Service that does nothing but relay requests to an internal ServiceStack service. The relay service is setup something like this (code made brief as an example): ```...

19 May at 16:27

React Native Change Default iOS Simulator Device

When I run this command: ``` react-native run-ios ``` My app runs by default in the iPhone6 simulator device: ``` Found Xcode project RN.xcodeproj Launching iPhone 6 (9.2)... ``` How can I have ...

14 Sep at 07:31

ASP.NET Core RC2 Area not published

So I just updated my app to use ASP.NET Core RC2. I published it using Visual Studio and noticed that my Area is not published: This snapshot is from `src\MyProject\bin\Release\PublishOutput`: [](ht...

Node Sass does not yet support your current environment: Linux 64-bit with false

Getting this error on Arch Linux with node-sass. I'm using it with [gulp-sass](https://github.com/dlmanning/gulp-sass). ``` Node Sass does not yet support your current environment: Linux 64-bit with ...

Injection of IUrlHelper in ASP.NET Core

In , `IUrlHelper` could be injected in services (with `services.AddMvc()` in startup class) This doesn't work anymore in . Does anybody know how to do it in as just newing up a `UrlHelper` requires ...

EntityFramework not generating C# files properly (some enums are incomplete, so build fails)

At work I just installed a brand new copy of my OS and a brand new copy of VS2015. When I clone my solution for the first time, I cannot build it anymore, even if I've generated the C# files like I al...

Class App\Http\Controllers\UserController Does Not Exist

Having the issue when loading the route /users or /user/add and being return an error of; > ReflectionException in Route.php line 280: Class App\Http\Controllers\App\Controllers\UserController does...

19 May at 12:13

Differences between ConstraintLayout and RelativeLayout

What is the difference between `ConstraintLayout` and `RelativeLayout`?

How to set the cookie validateInterval in ASP.NET Core?

I'm trying to set the `validateInterval` for an ASP.NET 5 RC1 application which makes use of `ASP.NET Identity 3` I am trying to implement the code in [this](https://stackoverflow.com/questions/334637...

How to make ConstraintLayout work with percentage values?

With a Preview 1 of Android Studio 2.2 Google released a new layout in its support library: [ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout.html)...

Unable to cast object of type 'ServiceStack.OrmLite.OrmLiteDataParameter' to type 'Oracle.DataAccess.Client.OracleParameter'

I am using this code ``` using (var db = OpenDbConnection()) if (db != null) db.Run(dbCnx => { var trans = dbCnx.BeginTransaction(); ...

React Native absolute positioning horizontal centre

It seems that with `position:absolute` in use an element cannot be centred using `justifyContent` or `alignItems`. There's a workaround to use `marginLeft` but does not display the same for all device...

How to register an instance to the ServiceCollection in ASP.NET Core 1.0 RC2

I'm migrating my web app from ASP.NET Core RC1 to RC2. In RC2 the `IServiceCollection` doesn't have the `AddInstance` method anymore. How do I get the Configuration registered? Here how it was done i...

How to automatically close mysql connection in ServiceStack ormlite

I used ServiceStack OrmLite to access AWS MySQL , when a API request returned the data. There are lots of MySql connections in sleep state. How to close those db connections when ending a request ? ...

19 May at 06:40

How to do a nested if else statement in ReactJS JSX?

I wanted to know if its possible to do nested if else if in ReactJS JSX? I have tried various different ways and I am unable to get it to work. I am looking for ``` if (x) { loading screen } else { ...

Overriding explicit interface implementations?

What is the proper way to override explicit implementations of an interface in a child class? ``` public interface ITest { string Speak(); } public class ParentTest : ITest { string ITest.Sp...

18 May at 22:23

Identity Server 4 Authorization Code Flow example

I'm trying to implement Identity Server 4 with AspNet Core using Authorization Code Flow. The thing is, the [IdentityServer4](https://github.com/IdentityServer/IdentityServer4.Samples) repository on ...

14 Jun at 15:19