Wouldn't really work for Internet accessible IPv4 addresses, but IPv6 would be fine.
229 karma · joined March 17, 2015
Wouldn't really work for Internet accessible IPv4 addresses, but IPv6 would be fine.
"Memory mapped files are new feature in Java nio package"
They were introduced in Java 1.4, 15 years ago.
But to the people saying use Vulkan for the web API, that wouldn't be a good idea. Vulkan is a very verbose low level API.
Here[1] is a sample for the most basic of renderers (renders a single triangle). That's 1,000 lines of (commented) code. It's not a good fit for web development. A far better solution would be to evolve the current WebGL API, than shoehorn Vulkan into somewhere it was never meant to be.
[1] https://github.com/SaschaWillems/Vulkan/blob/master/triangle...
For example, the Chinese character for the word Biang[1] can be describe with:
⿺辶⿳穴⿲月⿱⿲幺言幺⿲長馬長刂心
[1] https://en.wikipedia.org/wiki/Biangbiang_noodles#Chinese_cha...
Iterator<String> it = names.iterator();
while (it.hasNext())
{
if (it.next().startsWith("B"))
{
it.remove();
}
}It basically counts continuation bytes (which all start 10xxxxxx) and substracts, rather than trying to count characters.
Additionally, if you know how many bytes are in the string, you can remove the check for the null terminator.
The correct version is:
for (int i = 0; i < string.length(); i = string.offsetByCodePoints(i, 1))
{
int codepoint = string.codePointAt(i);
}
Java 8 seems to have acquired a codePoints() method on the CharSequence interface which seems to do the same thing.But this just adds to the fact, proper Unicode string processing is a pain :).