Questions

How to prevent a click on a '#' link from jumping to top of page?

I'm currently using `<a>` tags with jQuery to initiate things like click events, etc. Example is `<a href="#" class="someclass">Text</a>` But I hate how the '#' makes the page jump to the top of th...

3 Oct at 06:36

What is the preferred syntax for initializing a dict: curly brace literals {} or the dict() function?

I'm putting in some effort to learn Python, and I am paying close attention to common coding standards. This may seem like a pointlessly nit-picky question, but I am trying to focus on best-practices...

24 Nov at 04:0

How to jump back to NERDTree from file in tab?

I usually: 1. Choose the needed file. 2. Open it in a tab(t character, by default). But how I can jump back to NERDTree to open one more file in a tab? Temporary solution I use now in my .vimrc ...

30 Jan at 22:27

How to force garbage collection in Java?

Is it possible to force garbage collection in Java, even if it is tricky to do? I know about `System.gc();` and `Runtime.gc();` but they only suggest to do GC. How can I force GC?

8 Apr at 02:14

How to remove a lambda event handler

I recently discovered that I can use lambdas to create simple event handlers. I could for example subscribe to a click event like this: ``` button.Click += (s, e) => MessageBox.Show("Woho"); ``` But ...

20 Nov at 10:35

find filenames NOT ending in specific extensions on Unix?

Is there a simple way to recursively find all files in a directory hierarchy, that do end in a list of extensions? E.g. all files that are not *.dll or *.exe UNIX/GNU find, powerful as it is, doesn'...

1 Jul at 11:9

MySQL - Rows to Columns

I tried to search posts, but I only found solutions for SQL Server/Access. I need a solution in MySQL (5.X). I have a table (called history) with 3 columns: hostid, itemname, itemvalue. If I do a sele...

20 Apr at 19:19

GUI-based or Web-based JSON editor that works like property explorer

This is a request for something that may not exist yet, but I've been meaning to build one for a long time. First I will ask if anyone has seen anything like it yet. Suppose you have an arbitrary JSO...

29 Mar at 16:5

Unzip files programmatically in .net

I am trying to programatically unzip a zipped file. I have tried using the `System.IO.Compression.GZipStream` class in .NET, but when my app runs (actually a unit test) I get this exception: > Syst...

24 Sep at 13:56

How do I convert a string to a double in Python?

I would like to know how to convert a string containing digits to a double.

17 Jun at 13:24

How best to determine if an argument is not sent to the JavaScript function

I have now seen 2 methods for determining if an argument has been passed to a JavaScript function. I'm wondering if one method is better than the other or if one is just bad to use? ``` function Test...

23 May at 12:3

Create an instance of a class from a string

Is there a way to create an instance of a class based on the fact I know the name of the class at runtime. Basically I would have the name of the class in a string.

11 Dec at 04:28

How do you create a REST client for Java?

With JSR 311 and its implementations we have a powerful standard for exposing Java objects via REST. However on the client side there seems to be something missing that is comparable to Apache Axis fo...

9 Mar at 07:10

How do I analyze a .hprof file?

I have a production server running with the following flag: - Last night it generated a java-38942.hprof file when our server encountered a heap error. It turns out that the developers of the system ...

13 Jun at 11:55

How to check for file lock?

Is there any way to check whether a file is locked without using a try/catch block? Right now, the only way I know of is to just open the file and catch any `System.IO.IOException`.

30 Apr at 10:33

How to call a function after delay in Kotlin?

As the title, is there any way to call a function after delay (1 second for example) in `Kotlin`?

11 Apr at 14:33

Tomcat: java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens

I am getting below stack trace when I am deploying my application in a multi-server Apache Tomcat 8 environment. I am getting this error frequently, and it seems it is blocking the tomcat thread: ``` ...

14 Oct at 09:11

How to read values from the querystring with ASP.NET Core?

I'm building one RESTful API using ASP.NET Core MVC and I want to use querystring parameters to specify filtering and paging on a resource that returns a collection. In that case, I need to read the ...

Why is Docker installed but not Docker Compose?

I have installed docker on CentOS 7 by running following commands, ``` curl -sSL https://get.docker.com/ | sh systemctl enable docker && systemctl start docker docker run hello-world ``` however whe...

8 Dec at 02:19

Rendering raw html with reactjs

So is this the only way to render raw html with reactjs? ``` // http://facebook.github.io/react/docs/tutorial.html // tutorial7.js var converter = new Showdown.converter(); var Comment = React.create...

15 Oct at 16:37

Coloring Buttons in Android with Material Design and AppCompat

Before the `AppCompat` update came out today I was able to change the color of buttons in Android L but not on older versions. After including the new AppCompat update I am unable to change the color ...

How to keep Docker container running after starting services?

I've seen a bunch of tutorials that seem do the same thing I'm trying to do, but for some reason my Docker containers exit. Basically, I'm setting up a web-server and a few daemons inside a Docker con...

No EditorOptionDefinition Export Found Error

In Visual Studio 2013 I started getting the following error when trying to open C# files: ``` No EditorOptionDefinition export found for the given option name: Tabs/ConvertTabsToSpaces Parameter name...

27 May at 15:34

Check if two lists are equal

I have a class as follows: ``` public class Tag { public Int32 Id { get; set; } public String Name { get; set; } } ``` And I have two lists of tag: ``` List<Tag> tags1; List<Tag> tags2; ``` ...

20 Jun at 09:12

Error: The processing instruction target matching "[xX][mM][lL]" is not allowed

This error, > The processing instruction target matching "[xX][mM][lL]" is not allowed occurs whenever I run an XSLT page that begins as follows: ``` <?xml version="1.0" encoding="windows-1256"?> ...

10 Apr at 11:52