How to render HTML string as real HTML?
Here's what I tried and how it goes wrong. This works: ``` <div dangerouslySetInnerHTML={{ __html: "<h1>Hi there!</h1>" }} /> ``` This doesn't: ``` <div dangerouslySetInnerHTML={{ __html: this.pr...
- Modified
- 29 Jul at 06:52
Visual Studio Code: How to show line endings
How can I display lineendings (CR,LF) in Visual Studio Code (not in Visual Studio)? At the moment there is only the little statusbar menu which display/change the line ending if the actual file. But s...
- Modified
- 29 Oct at 14:58
Best HTTP Authorization header type for JWT
I'm wondering what is the best appropriate `Authorization` HTTP header type for [JWT tokens](http://jwt.io/). One of the probably most popular type is `Basic`. For instance: ``` Authorization: Basic...
- Modified
- 21 Oct at 17:55
Run JavaScript in Visual Studio Code
Is there a way to execute JavaScript and display the results using ? For example, a script file containing: ``` console.log('hello world'); ``` I assume that Node.js would be needed but can't work...
- Modified
- 26 Apr at 11:15
RecyclerView and java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder in Samsung devices
I have a recycler view that works perfectly on all devices except Samsung. On Samsung, I'm get > java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewH...
- Modified
- 25 Apr at 15:16
serialize/deserialize java 8 java.time with Jackson JSON mapper
How do I use Jackson JSON mapper with Java 8 LocalDateTime? > org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of type [simple type, class java.time.LocalDateTime] from JSON S...
In android app Toolbar.setTitle method has no effect – application name is shown as title
I'm trying to create simple application using android-support-v7:21 library. Code snippets: MainActivity.java ``` public class MainActivity extends ActionBarActivity { Toolbar mActionBarToolbar...
- Modified
- 13 Jan at 21:57
Extend data class in Kotlin
Data classes seem to be the replacement to the old-fashioned POJOs in Java. It is quite expectable that these classes would allow for inheritance, but I can see no convenient way to extend a data clas...
- Modified
- 8 Jan at 12:13
jQuery Event : Detect changes to the html/text of a div
I have a div which has its content changing all the time , be it `ajax requests`, `jquery functions`, `blur` etc etc. Is there a way I can detect any changes on my div at any point in time ? I dont ...
List submodules in a Git repository
I have a Git repository that has several submodules in it. How do I list the names of all the submodules after `git submodule init` has been run? The `git submodule foreach` command could echo the na...
- Modified
- 21 Aug at 10:36
Eclipse says: “Workspace in use or cannot be created, chose a different one.” How do I unlock a workspace?
When I start, Eclipse says "Workspace Cannot Be Locked" "Could not launch the product because the associated workspace is currently in use by another Eclipse application." or “Workspace in use or can...
- Modified
- 4 Jul at 11:29
How to check if a value exists in a dictionary?
I have the following dictionary in python: ``` d = {'1': 'one', '3': 'three', '2': 'two', '5': 'five', '4': 'four'} ``` I need a way to find if a value such as "one" or "two" exists in this dictio...
- Modified
- 1 Jun at 19:21
How to prevent column break within an element?
Consider the following HTML: ``` <div class='x'> <ul> <li>Number one</li> <li>Number two</li> <li>Number three</li> <li>Number four is a bit longer</li> <l...
- Modified
- 24 Apr at 05:43
CSS rule to apply only if element has BOTH classes
Let's say we have this markup: ``` <div class="abc"> ... </div> <div class="xyz"> ... </div> <div class="abc xyz" style="width: 100px"> ... </div> ``` Is there a way to select only the `<div>` whic...
- Modified
- 17 Sep at 00:53
How do I create and read a value from cookie with javascript?
How can I create and read a value from a cookie in JavaScript?
- Modified
- 7 Jul at 04:49
How to grant permission to users for a directory using command line in Windows?
How can I grant permissions to a user on a directory (Read, Write, Modify) using the Windows command line?
- Modified
- 5 Jun at 04:32
Rails: Check output of path helper from console
Rails defines a bunch of magic with named routes that make helpers for your routes. Sometimes, especially with nested routes, it can get a little confusing to keep track of what URL you'll get for a g...
- Modified
- 17 May at 01:44
How can I get the client's IP address in ASP.NET MVC?
I'm totally new to the ASP.NET MVC stack, and I was wondering what happened to the simple Page object and the Request ServerVariables object? Basically, I want to to pull out the client PC's IP addre...
- Modified
- 8 Mar at 20:14
How to get the filename without the extension in Java?
Can anyone tell me how to get the filename without the extension? Example: ``` fileNameWithExt = "test.xml"; fileNameWithOutExt = "test"; ```
Can anyone explain IEnumerable and IEnumerator to me?
Can anyone explain `IEnumerable` and `IEnumerator` to me? For example, when to use it over foreach? what's the difference between `IEnumerable` and `IEnumerator`? Why do we need to use it?
- Modified
- 6 Feb at 08:2
How to get time difference in minutes in PHP
How to calculate minute difference between two date-times in PHP?
How big can a MySQL database get before performance starts to degrade
At what point does a MySQL database start to lose performance? - - - I have what I believe to be a large database, with roughly 15M records which take up almost 2GB. Based on these numbers, is ther...
- Modified
- 27 Jan at 23:40
Mount current directory as a volume in Docker on Windows 10
I am using Docker version 1.12.5 on Windows 10 via Hyper-V and want to use container executables as commands in the current path. I built a Docker image that is running fine, but I have a problem to...
How to show uncommitted changes in Git and some Git diffs in detail
How do I show uncommitted changes in Git? I [STFW'ed](https://en.wiktionary.org/wiki/STFW#Verb), and these commands are not working: ``` teyan@TEYAN-THINK MINGW64 /d/nano/repos/PSTools/psservice (te...