Questions

Why should you remove unnecessary C# using directives?

For example, I rarely need: ``` using System.Text; ``` but it's always there by default. I assume the application will use more memory if your code contains unnecessary [using directives](http://ms...

23 May at 10:31

What's the easiest way to install a missing Perl module?

I get this error: `Can't locate Foo.pm in @INC` Is there an easier way to install it than downloading, untarring, making, etc?

11 May at 00:47

How to deactivate or override the Android "BACK" button, in Flutter?

Is there a way to deactivate the Android back button when on a specific page? ``` class WakeUpApp extends StatelessWidget { @override Widget build(BuildContext context) { return new Material...

3 Jan at 00:23

Class has no objects member

``` def index(request): latest_question_list = Question.objects.all().order_by('-pub_date')[:5] template = loader.get_template('polls/index.html') context = {'latest_question_list':latest_que...

11 Apr at 12:53

Get YAML for deployed Kubernetes services?

I am trying to deploy my app to running in . The app can be found at: [https://github.com/Industrial/docker-znc](https://github.com/Industrial/docker-znc). The is built into an image on . I have ...

AccessDenied for ListObjects for S3 bucket when permissions are s3:*

I am getting: > An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied When I try to get folder from my S3 bucket. Using this command: ``` aws s3 cp s3://bucket-...

How to get current available GPUs in tensorflow?

I have a plan to use distributed TensorFlow, and I saw TensorFlow can use GPUs for training and testing. In a cluster environment, each machine could have 0 or 1 or more GPUs, and I want to run my Ten...

26 Jul at 02:37

Calling a JavaScript function in another js file

I wanted to call a function defined in a file in file. Both files are defined in an HTML file like: ``` <script type="text/javascript" src="first.js"></script> <script type="text/javascript" src="se...

30 Jul at 01:29

How can I create a text box for a note in markdown?

I am writing a document in markdown. I am using the wonderful pandoc to create docx and tex files from the markdown source. I would like to have a textbox for tips and notes to readers the way program...

3 Sep at 22:52

How can I define an interface for an array of objects?

I have the following interface and code. I thought I was doing the definitions correctly but I am getting an error: ``` interface IenumServiceGetOrderBy { id: number; label: string; key: any }[]; ```...

25 Sep at 09:34

What are the dangers when creating a thread with a stack size of 50x the default?

I'm currently working on a very performance critical program and one path I decided to explore that may help reduce resource consumption was increasing my worker threads' stack size so I can move most...

23 May at 12:26

Convert JSON String to JSON Object c#

I have this String stored in my database: ``` str = "{ "context_name": { "lower_bound": "value", "upper_bound": "value", "values": [ "value1", "valueN" ] } }" ``` This string is already in the JSON...

16 Sep at 03:10

Entity Framework rollback and remove bad migration

I'm using EF 6.0 for my project in C# with manual migrations and updates. I have about 5 migrations on the database, but I realised that the last migration was bad and I don't want it. I know that I c...

How to add a new row to an empty numpy array

Using standard Python arrays, I can do the following: ``` arr = [] arr.append([1,2,3]) arr.append([4,5,6]) # arr is now [[1,2,3],[4,5,6]] ``` However, I cannot do the same thing in numpy. For examp...

14 Mar at 14:21

datetime dtypes in pandas read_csv

I'm reading in a csv file with multiple datetime columns. I'd need to set the data types upon reading in the file, but datetimes appear to be a problem. For instance: ``` headers = ['col1', 'col2',...

19 Oct at 14:39

npm not working - "read ECONNRESET"

I'm having a problem with npm, I cant install anything. Here is the error messages: ``` C:\Windows\system32>npm install -g yo npm http GET https://registry.npmjs.org/yo npm http GET https://registry....

24 Aug at 13:34

IE8 issue with Twitter Bootstrap 3

I am creating a site using the new Twitter Bootstrap. The site looks fine and works in all required browsers except IE8. In IE8 it seems to be displaying elements of the mobile version but stretched...

How to use z-index in svg elements?

I'm using the svg circles in my project like this, ``` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 120"> <g> <g id="one"> <circle fill="green" cx="100" cy="105" r...

18 Feb at 11:12

What is the difference between .text, .value, and .value2?

What is the difference between `.text`, `.value`, and `.value2`? Such as when should target.text, target.value, and target.value2 be used?

23 Jul at 19:32

CMake not able to find OpenSSL library

I am trying to install a software that uses cmake to install itself. When I run `cmake ..` on the command line, it gives me following error in the `CMakeLists.txt` on the line that says `find_package...

2 Dec at 15:18

How do I catch a numpy warning like it's an exception (not just for testing)?

I have to make a Lagrange polynomial in Python for a project I'm doing. I'm doing a barycentric style one to avoid using an explicit for-loop as opposed to a Newton's divided difference style one. The...

Child with max-height: 100% overflows parent

I'm trying to understand what appears to be unexpected behaviour to me: I have an element with a max-height of 100% inside a container that also uses a max-height but, unexpectedly, the child overflow...

18 Jan at 11:25

Create a completed Task

I want to create a completed `Task` (not `Task<T>`). Is there something built into .NET to do this? A related question: [Create a completed Task<T>](https://stackoverflow.com/questions/4245968/create...

How to gzip all files in all sub-directories into one compressed file in bash

> [gzipping up a set of directories and creating a tar compressed file](https://stackoverflow.com/questions/3341131/gzipping-up-a-set-of-directories-and-creating-a-tar-compressed-file) [This p...

23 May at 12:2

How can I set the focus (and display the keyboard) on my EditText programmatically

I have a layout which contains some views like this: ``` <LinearLayout> <TextView...> <TextView...> <ImageView ...> <EditText...> <Button...> </linearLayout> ``` How can I set the focus (display th...

31 Mar at 19:26