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...
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| ...
- Modified
- 25 Dec at 16:26
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...
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...
- Modified
- 3 May at 19:14
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 ?
- Modified
- 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) {...
- Modified
- 17 Jul at 16:32
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): ```...
- Modified
- 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 ...
- Modified
- 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...
- Modified
- 19 May at 14:20
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 ...
- Modified
- 19 Oct at 13:0
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...
- Modified
- 4 Jun at 13:33
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...
- Modified
- 19 May at 12:13
Differences between ConstraintLayout and RelativeLayout
What is the difference between `ConstraintLayout` and `RelativeLayout`?
- Modified
- 28 Feb at 02:8
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...
- Modified
- 10 Nov at 09:7
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)...
- Modified
- 21 May at 06:21
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(); ...
- Modified
- 19 May at 21:52
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...
- Modified
- 13 Jul at 14:23
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...
- Modified
- 21 Mar at 12:16
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 ? ...
- Modified
- 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 { ...
- Modified
- 1 Aug at 10:4
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...
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 ...
- Modified
- 14 Jun at 15:19
How to make AsyncLocal flow to siblings?
This is a very simple example I expect to work but... ``` static AsyncLocal<bool> _value = new AsyncLocal<bool>(); static void Main(string[] args) { A().Wait(); } static asy...
- Modified
- 18 May at 17:14
How do I convert PascalCase to kebab-case with C#?
How do I convert a string value in PascalCase (other name is UpperCamelCase) to kebab-case with C#? e.g. `"VeryLongName"` to `"very-long-name"`