Questions

How can I view network requests (for debugging) in React Native?

I'd like to view my network requests in React Native to help me debug - ideally in the 'Network' tab of Chrome's devtools. There are some closed issues about this on GitHub ([https://github.com/faceb...

"You may need an appropriate loader to handle this file type" with Webpack and Babel

I am trying to use Webpack with Babel to compile ES6 assets, but I am getting the following error message: ``` You may need an appropriate loader to handle this file type. | import React from 'react'...

How do you style a TextInput in react native for password input

I have a TextInput. Instead of showing the actual text entered, when the user enters text I want it to show the password dots / asterisks (`****`) you typically see in apps when typing a password. How...

30 May at 03:55

Datetime current year and month in Python

I must have the current year and month in datetime. I use this: ``` datem = datetime.today().strftime("%Y-%m") datem = datetime.strptime(datem, "%Y-%m") ``` Is there maybe another way?

19 Sep at 13:48

Android SDK location

I have Xamarin Studio, and I need to specify the Android SDK Location. I have previously had Xamarin Studio working on my pc, and for some reason, I need to enter this again. I have entered the follo...

6 Apr at 14:54

How to test Spring Data repositories?

I want a repository (say, `UserRepository`) created with the help of Spring Data. I am new to spring-data (but not to spring) and I use this [tutorial](http://spring.io/guides/tutorials/data/3/). My c...

How to fix Hibernate LazyInitializationException: failed to lazily initialize a collection of roles, could not initialize proxy - no Session

In the custom AuthenticationProvider from my spring project, I am trying read the list of authorities of the logged user, but I am facing the following error: ``` org.hibernate.LazyInitializationExce...

how to check the dtype of a column in python pandas

I need to use different functions to treat numeric columns and string columns. What I am doing now is really dumb: ``` allc = list((agg.loc[:, (agg.dtypes==np.float64)|(agg.dtypes==np.int)]).columns)...

26 Dec at 23:29

What is the overhead of creating a new HttpClient per call in a WebAPI client?

What should be the `HttpClient` lifetime of a WebAPI client? Is it better to have one instance of the `HttpClient` for multiple calls? What's the overhead of creating and disposing a `HttpClient` pe...

Could not load file or assembly 'System.Net.Http.Formatting' or one of its dependencies. The system cannot find the path specified

I have a small MVC app that I use for practice reasons, but now I am encountering an error every time I try to debug: ``` Could not load file or assembly 'System.Net.Http.Formatting' or one of its de...

25 Oct at 13:42

Convert base64 string to ArrayBuffer

I need to convert a base64 encode string into an ArrayBuffer. The base64 strings are user input, they will be copy and pasted from an email, so they're not there when the page is loaded. I would like ...

13 Jun at 20:42

Summarizing multiple columns with dplyr?

I'm struggling a bit with the dplyr-syntax. I have a data frame with different variables and one grouping variable. Now I want to calculate the mean for each column within each group, using dplyr in R...

12 Feb at 03:3

Bootstrap 3 Flush footer to bottom. not fixed

I am using Bootstrap 3 for a site I am designing. I want to have a footer like this sample. [Sample](http://wrapbootstrap.com/preview/WB0B348C6) Please note that I don't want it FIXED so bootstrap n...

24 Jan at 04:37

How can I find out if I have Xcode commandline tools installed?

I need to use gdb. ``` ps-MacBook-Air:AcoustoExport pi$ gdb -bash: gdb: command not found ps-MacBook-Air:AcoustoExport pi$ sudo find / -iname "*gdb*" Password: /usr/local/share/gdb /usr/local/Cellar...

23 May at 11:47

Catch-22 prevents streamed TCP WCF service securable by WIF; ruining my Christmas, mental health

I have a requirement to . It should authenticate incoming calls against our token server. The service is streamed because it is designed to transfer large amounts of data n stuff. And if I can't ...

22 Aug at 05:39

How to get a number of random elements from an array?

I am working on 'how to access elements randomly from an array in javascript'. I found many links regarding this. Like: [Get random item from JavaScript array](https://stackoverflow.com/questions/5915...

6 Jul at 18:59

Pip freeze vs. pip list

Why does `pip list` generate a more comprehensive list than `pip freeze`? ``` $ pip list feedparser (5.1.3) pip (1.4.1) setuptools (1.1.5) wsgiref (0.1.2) ``` ``` $ pip freeze feedparser==5.1.3 wsgir...

11 Oct at 06:33

Convert number to month name in PHP

I have this PHP code: ``` $monthNum = sprintf("%02s", $result["month"]); $monthName = date("F", strtotime($monthNum)); echo $monthName; ``` But it's returning `December` rather than `August`. `$r...

4 Jun at 19:45

Gradle: Execution failed for task ':processDebugManifest'

I'm getting a gradle error at building since yesterday - it just came randomly.... Full stacktrace here: My project depends on multiple libraries and it built without any problems until yesterday (e...

Python list iterator behavior and next(iterator)

Consider: ``` >>> lst = iter([1,2,3]) >>> next(lst) 1 >>> next(lst) 2 ``` So, advancing the iterator is, as expected, handled by mutating that same object. This being the case, I would expect: `...

4 Sep at 15:5

How to get the first five character of a String

I have read this [question to get first char](https://stackoverflow.com/q/3878820/1716774) of the string. Is there a way to get the first n number of characters from a string in C#?

23 May at 12:34

Find maximum value of a column and return the corresponding row values using Pandas

![Structure of data;](https://i.stack.imgur.com/a34it.png) Using Python Pandas I am trying to find the `Country` & `Place` with the maximum value. This returns the maximum value: ``` data.groupby([...

14 Jan at 08:52

Git: Cannot see new remote branch

A colleague pushed a new remote branch to origin/dev/homepage and I cannot see it when I run: ``` $ git branch -r ``` I still see preexisting remote branches. I assume this is because my local re...

6 Oct at 19:6

Replacing instances of a character in a string

This simple code that simply tries to replace semicolons (at i-specified postions) by colons does not work: ``` for i in range(0,len(line)): if (line[i]==";" and i in rightindexarray): ...

14 Dec at 06:33

Throw HttpResponseException or return Request.CreateErrorResponse?

After reviewing an article [Exception Handling in ASP.NET Web API](http://www.asp.net/web-api/overview/web-api-routing-and-actions/exception-handling) I am a bit confused as to when to throw an except...