Android Studio SDK location

Download the SDK from here: http://developer.android.com/sdk/ to C:\android-sdk\. Then when you launch Android Studio again, it will prompt you for the SDK path just point it to: C:\android-sdk\. Update: new download location, https://developer.android.com/studio/#command-tools

How to check if object is null or not except == null

The easiest way to check is entity == null. There is no shorter way to do that. Note that there is a method for this in the standard lib: Objects.isNull(Object obj) And another one which is the opposite of the above one: Objects.nonNull(Object obj) And there is yet another one which can be used to force … Read more

jQuery: outer html()

Just use standard DOM functionality: Or a bit simpler with .prop(): outerHTML is well supported – verify at Mozilla or caniuse.

Error: free(): invalid next size (fast):

It means that you have a memory error. You may be trying to free a pointer that wasn’t allocated by malloc (or delete an object that wasn’t created by new) or you may be trying to free/delete such an object more than once. You may be overflowing a buffer or otherwise writing to memory to which you shouldn’t be writing, causing heap corruption. Any … Read more

Why doesn’t height: 100% work to expand divs to the screen height?

In order for a percentage value to work for height, the parent’s height must be determined. The only exception is the root element <html>, which can be a percentage height. . So, you’ve given all of your elements height, except for the <html>, so what you should do is add this: And your code should work fine. JsFiddle example.

Is there a ceiling equivalent of // operator in Python?

No, but you can use upside-down floor division:¹ This works because Python’s division operator does floor division (unlike in C, where integer division truncates the fractional part). Here’s a demonstration: Why this instead of math.ceil? math.ceil(a / b) can quietly produce incorrect results, because it introduces floating-point error. For example: In general, it’s considered good practice to avoid … Read more